TARE
README.md
# TARE
Oct 19, 2026, 9:40 PM PDT
**TARE (Trusted Adapter for Readback-verified Equipment)** lets AI agents operate lab instruments, and checks what really happened. A command is not done until the instrument's own readback confirms it, and a measurement is not usable until its quality, age, calibration and uncertainty say so. The checks run outside the language model, so a model's mistake cannot talk its way past them.
TARE is an independent design, built from Anthropic's public description of the [Model Hardware Standard (MHS)](https://modelhardwarestandard.com). It is not affiliated with Anthropic and makes no claim of MHS compatibility. "Trusted" is a design goal, not a certification.
[Technical brief (PDF, 4 pages)](TARE-Technical-Brief-2026-10-14.pdf) · [Brief (HTML)](TARE-Technical-Brief-2026-10-14.html) · [Illustrated user manual](User-Manual.html) · [Project page on samkirk.com](https://samkirk.com/explorations/chatbots-and-instruments) · [LinkedIn post](https://www.linkedin.com/posts/samuelkirk_letting-your-chatbots-talk-with-your-instruments-activity-7518085610771779584-GssH) · [All documents](Documentation-Index.md)
## Contents
- [What TARE does](#what-tare-does)
- [Install](#install)
- [Run the simulators](#run-the-simulators)
- [Run the tests](#run-the-tests)
- [Connect a chatbot through MCP](#connect-a-chatbot-through-mcp)
- [Chat lab](#chat-lab)
- [What the evidence shows](#what-the-evidence-shows)
- [Limits](#limits)
- [Rebuilding the evaluation, manual and figures](#rebuilding-the-evaluation-manual-and-figures)
- [License](#license)
## What TARE does
An agent gets four operations: **discover** what the instruments can do, **configure** a setting, **measure**, and **operate** an action such as a robot move or an aspiration. Every request takes the same path:
1. **Validate** the device, units and limits before anything is sent. Unknown or out-of-range requests are refused with a reason.
2. **Dispatch, then read back.** A setting counts as applied only if the readback matches. A mismatch is reported as unverified, and dependent steps stop.
3. **Qualify** every measurement with its unit, time, age, calibration status, uncertainty and quality flags. Stale or uncertain data is marked unusable.
4. **Keep partial effects.** If an action half-happens, TARE reports what did happen. Nothing is silently retried or rolled back.
5. **Audit** each attempt before dispatch and its outcome after.
Four behavioral simulators share one virtual lab:
| Instrument | What it models |
|---|---|
| Microscope | Motorized stage, focus and magnification; a 48×48 synthetic image whose focus score is computed from the returned pixels |
| Mixed-signal oscilloscope | Inspired by the HP 54645D: two analog and sixteen digital channels, trigger and threshold controls |
| Robot arm | Cartesian arm that carries a plate between stations around a keep-out region |
| Liquid handler and reader | Aspirate and dispense with volume readback, and a 96-well absorbance reader |
They model the failure modes that matter to an agent: stuck axes, partial transfers, stale data, unknown uncertainty, and readings that disagree with a reference. Details: [four-device guide](Four-Device-Guide.md).
## Install
Python 3.10 or later. The core simulators have no dependencies; the MCP server needs the pinned packages in `requirements-mcp.lock`.
```sh
git clone https://github.com/MrBesterTester/TARE.git
cd TARE
python3 -m venv .venv
.venv/bin/pip install -r requirements-mcp.lock -e .
```
The Python package and its commands are named `mhs2`, from the project's first name.
## Run the simulators
```sh
.venv/bin/python -m mhs2.lab_cli --output Results/My-Lab-Run.json demo
.venv/bin/python -m mhs2.lab_cli --fault lab=bubbles demo
.venv/bin/python -m mhs2.lab_cli session
```
The first runs the coordinated four-instrument experiment. The second injects air bubbles in the liquid handler; it stops on a volume mismatch and exits with status 1, which is the expected result. `session` reads JSON-line commands from standard input and keeps state between them. Nothing contacts physical equipment.
From Python:
```python
from mhs2.lab import make_lab
lab = make_lab()
print(lab.call('discover'))
```
The [visual explorer](Results/Four-Device-Explorer-2026-09-09.html) replays a recorded run's images, signals and motion in a browser.
## Run the tests
```sh
.venv/bin/python -m unittest discover -s tests -q
```
117 tests cover validation, readback, fault handling, audit and the evaluation tooling. The brief's figure of 123 was counted before a retired model adapter and its tests were removed.
## Connect a chatbot through MCP
```sh
.venv/bin/python -m mhs2.mcp_server --lab
```
This is a stdio MCP (Model Context Protocol) server. Configure your MCP host to start the command above with the TARE folder as its working directory. Each server process owns its own fresh virtual lab.
## Chat lab
```sh
.venv/bin/python -m mhs2.chat_server
```
A local browser chat where a Claude model drives the simulated lab. It needs [Claude Code](https://code.claude.com/docs/en/setup) signed in with a Claude subscription; TARE checks `claude auth status`, refuses API-key and unknown logins, and never reads the credential store. The server listens only on 127.0.0.1. [Chat guide](Chat-Guide.md) · [Five-minute demo](Chat-Demo-Quick-Start-2026-09-22.md)
## What the evidence shows
The evidence comes at three levels, reported separately.
- **Software tests:** the suite above.
- **Simulated experiments:** a coordinated experiment of 80 service calls moves a plate, prepares four dilutions, checks plate and scope readings, and autofocuses. 17 scripted scenarios matched their expected outcomes, including 13 injected faults stopped for the right reason. One scenario deliberately completes despite a stuck digital line, because the workflow does not check digital patterns; it is a known gap. [Four-device results](Results/Four-Device-Results-2026-09-08.md)
- **AI agent behavior:** Claude models were tested on routine instrument dialogues with synthetic instrument results.
| Model and effort | Test | Correct | Critical errors | Median time | Report |
|---|---|---|---|---|---|
| Claude Opus 5.5, medium | 24 cases, twice each; 11 written before any model saw them | 47 of 48 | 0 | 13.7 s | [Opus 5.5 comparison](Results/Opus-Medium-Report-2026-10-13.md) |
| Claude Opus 5.5, medium | Pilot, 13 cases | 13 of 13 | 0 | 14.3 s | [Pilot](Results/Opus-Pilot-Report-2026-10-13.md) |
| Claude Opus 5.5, high | Pilot, 13 cases | 12 of 13 | 0 | 16.0 s | [Pilot](Results/Opus-Pilot-Report-2026-10-13.md) |
| Claude Sonnet 5.5, high | Pilot, 13 cases | 13 of 13 | 0 | 14.5 s | [Pilot](Results/Opus-Pilot-Report-2026-10-13.md) |
Both recorded misses were correct answers that TARE's automatic checker failed to recognize. A reviewer judged them correct, but they stay on the record because a review cannot overturn an automatic check. Every dialogue page, record, manifest and review file is published under `Results/`; each run folder's `index.html` is the trial matrix.
The user manual cites two live chat recordings from Oct 19, 2026: [Opus 5.5 at medium](Results/Chat-Four-Device-Session-2026-10-19.json) and [Sonnet 5 at medium](Results/Chat-Four-Device-Session-2026-10-19-Sonnet5.json), which skipped the oscilloscope check.
**The published runs are frozen evidence.** They were produced before a retired model adapter was removed from the runner, so the published code cannot resume them. Their records are byte-identical to the originals and need no resumption.
## Limits
All four instruments are simulations, and the model tests use synthetic instrument results, so nothing here demonstrates physical accuracy or hardware safety. The model results are a screening study: 13 to 24 cases, run once or twice each, which is enough to find problems but not to certify reliability. The dialogues were reviewed by Claude models with model names hidden (Claude Fable 5.1 for the Opus 5.5 comparison). That reviewer is from the same family as the models under test, and no independent review by a qualified scientist has been done yet.
## Rebuilding the evaluation, manual and figures
- **Evaluation cases:** `tools/build-shmoo-cases.py` builds `Evaluation/Shmoo-Cases.json` from `Evaluation/Dialogue-Cases.json`.
- **Evaluation runner:** `python -m mhs2.shmoo` (`init`, `preflight`, `run`, `review`, `report`) runs a staged, resumable model comparison through the Claude Code CLI. No instrument is called; the models see synthetic results. Live runs use your Claude subscription.
- **Blinded review:** `python -m mhs2.model_review` has a second Claude model review a run's dialogues with model names hidden.
- **User manual:** `tools/build-user-manual.py`, with `tools/build-chat-diagrams.py` and `tools/build-manual-sessions.py`. The browser checks and screenshots (`tools/*.cjs`) use [Playwright](https://playwright.dev); set `TARE_BROWSER_BIN` to use a specific browser.
- **Explorer:** `python -m mhs2.explorer` regenerates the visual explorer from the recorded run.
Research behind the design: [simulation sources](Research/Simulation-Sources-2026-09-08.md), [MHS release checks](Research/MHS-Release-Check-2026-10-19.md), and the [hosted-demo feasibility study](Research/Hosted-Demo-Feasibility-2026-09-24.md).
## License
[MIT](LICENSE). Copyright © 2026 Sam Kirk.
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo issues