How it works
How AI harnesses work, shown on one research workbook
A language model only writes text. Everything that turns that text into work, like looking something up, saving a draft, stopping when it is done or asking a person before it does something risky, is done by the program around the model. That program is the harness.
hedwigAI’s MCP server gives the agent you already use (Claude, ChatGPT, Cursor or any other MCP client) a harness built for one job: drafting a spreadsheet or a Word document from primary sources, and keeping it current. You call it with tools such as create_workbook, read_workbook and update_workbook. Behind those tools, a run does the research with its own harness.
Below are the six terms you need, each shown on one real workbook from our own account: early-stage US AI companies that filed an SEC Form D in the last 30 days, researched on 28 September 2026.
| First run (version 1) | After review (version 4) | |
|---|---|---|
| Model calls | 112 | 120 |
| Wall clock | 12 min 39 s | 11 min 50 s |
| Prompt tokens | 4,774,812 | 6,165,991 |
| Prompt tokens per call | 42,632 | 51,383 |
| Tokens written | 12,638 | 14,485 |
| Companies kept, each cited to its Form D | 7 | 7 |
| Corrections a person asked for afterwards | 13 | — |
Term 1 of 6
The agent loop
The harness runs the loop: it calls the model, carries out the tools the model asks for, hands back the results, and calls the model again. It stops when the work is done, when a person is needed, or when a limit is reached.
One sentence started this workbook. From there the run went round its loop 112 times in 12 min 39 s, against a limit of 40 minutes. Your agent does not have to wait through that: update_workbook answers at once with a run id, and stop_run ends a run early.
create_workbook({
instruction: "Early-stage AI companies in the US that filed a Form D in the last 30 days.",
folder: "Sales/Funds"
})Term 2 of 6
Tool calling
The model asks for an action by naming a tool and its arguments. The harness checks the request, runs it and returns the result, and the model writes with that result in front of it.
There are two levels here. Your agent calls hedwigAI’s MCP tools, 33 of them, from list_workbooks to link_workbook. Inside the run, the model calls data programs in a shell. Every company in this workbook came from one such call, and the call is written into the document next to what it found:
$ funding search "Meadow AI" SEC Form D accession 0002156007-26-000002, filed 2026-09-25 $ ucc search "Meadow AI" searched CO, CT; 0 active filings found
Term 3 of 6
Context management
The model sees only what the harness puts in front of it: your instructions, the conversation so far and the tool results. When that fills the window, older material is compacted, and the harness decides what is kept.
The first run read 4,774,812 prompt tokens across 112 calls, about 42,632 a call. It could not have held the whole run at once, so it compacts as it goes. What it can never lose is the draft itself, which lives in a file and not in the conversation.
Your agent has the same problem with a finished workbook, and the tools are built for it. list_sections with a few words returns only the sections they are about, and an address for that set. get_sections reads just those. pick_table returns one table as rows and columns. Your agent never has to load a 20-page document to change one figure.
list_sections({ workbook, prompt: "OpsMate AI and Perceptiq profiles" })
→ address "72e736f3b8db2e1f591109d5"
Companies › Company Profiles › OpsMate AI, Inc. 0.92
Companies › Company Profiles › Perceptiq Inc. 0.90
get_sections({ address: "72e736f3b8db2e1f591109d5" })Term 4 of 6
Checkpointing
A harness saves the state of the work outside the model, so that an interruption costs nothing and a bad step can be undone.
In a workbook every write is a new version, and the one before is kept. This workbook has four. Version 2 came from a correction list pasted in starting at item 5. The run wrote nothing new and finished in 10 seconds. Version 3 restored version 1, and version 4 is the full correction run. Nothing was lost along the way.
Two rules stop work being overwritten. write_workbook and commit_workbook take the base_version you read, and are refused if the workbook has moved since. A run stopped halfway keeps what it had written as a new, unfinished version.
Term 5 of 6
Permissions and sandboxing
The harness sets what the agent can touch, meaning which tools, files and actions it may use, and where code runs.
A run’s shell can read your connected drives and the data programs, and can write only to its own /tmp. No tool deletes a workbook: removing a folder moves its workbooks up a level.
Every tool tells your MCP client what it does before it runs. Reading tools are marked read-only. The tools that start a billed run, which are create_workbook from a sentence, update_workbook and answer_question, are marked as reaching the open web, so a client that asks before such calls will ask you.
Term 6 of 6
Guardrails, and what they miss
A harness can check inputs, outputs and tool requests, and can pause for a person to approve a step. These checks still miss errors, and this workbook shows that.
Every company in version 1 was real and cited to its own Form D. A person reading it against the filings still found 13 things to fix:
- The summary said all seven companies had raised equity. Three had raised through SAFEs, and one through revenue participation interests, which are not equity.
- One filing was under Rule 506(c), not 506(b).
- Investor counts were wrong in four of the seven filings.
- Business descriptions had been cited to a form that gives only an industry group.
Version 4 made each fix as its own cited change, and lowered the confidence of every row it touched. No automatic check caught these errors. A person did.
What the harness does do is notice when the world moves. recheck_sources re-reads every source the document cites, and a workbook whose source has changed is marked stale. It then asks one question, and answer_question takes a person’s yes or no before anything is rewritten. The answer is kept, so the same question is never asked twice.
Drafting the .xlsx or .docx itself
Research usually ends in a file someone opens in Excel or Word, and the harness edits that file rather than a copy of it. checkout_workbook puts the workbook in your agent’s shell. For a spreadsheet that means current.xlsx, which the xlsx program edits the way Excel does, recalculating every formula on save. commit_workbook saves it as the next version.
link_workbook goes further and makes a file in Google Drive or Dropbox the document of record. Every run starts from the file as it stands, including edits someone made in Excel since, and writes back over it in place. A spreadsheet keeps its formulas, formats and untouched sheets. A Word document keeps its styles, headers and footers.
A spreadsheet workbook, edited from your agent. The sheet and cell names here are only an example.
checkout_workbook({ workbook })
$ xlsx current.xlsx insert-rows Companies 9 + set Companies!A9 "Perceptiq Inc."
$ xlsx current.xlsx errors
commit_workbook({ workbook, base_version, note: "Added Perceptiq from its Form D" })Try it on your own question
Add hedwigAI to your MCP client from mcp.hedwigai.com, or sign in with a work email and start a workbook from one sentence. Writing a workbook yourself with create_workbook or write_workbook costs nothing. Only runs are billed.
- Figures are what
read_workbookreports for the workbook: model calls, prompt and completion tokens and wall clock for each run, and its list of versions. Both runs were started on 28 September 2026. - UCC lien searches covered Colorado and Connecticut only. All seven companies are Delaware corporations, and Delaware was not searched. The workbook says so.
More head-to-head evals
| Measure | ask | Apollo | treg |
|---|---|---|---|
| Usable leads | 13 of 40 | 7 of 40 | 6 of 28 |
| Cost per usable lead | $0.037 | $0.27 | $0.23 |
| Measure | ask with jev | ask with Decider |
|---|---|---|
| Questions right, of 92 | 89 | 89 |
| Wrong answers | 1 | 2 |
| Measure | jev | ask |
|---|---|---|
| Our 370 clinical decisions, right | 94.6% | 93.0% |
| PubMedQA, right (best EdgeEvals scored: 62.2%) | 77.0% | 74.4% |
| Measure | ask | Claude Opus 5.5 |
|---|---|---|
| Questions right, of 95 | 59 | 63 |
| Small companies right, of 20 | 13 | 9 |
| Measure | realestate-us | Best of four assistants |
|---|---|---|
| Floor-plan rents right, of 26 | 26 | 23 |
| Amenities claimed the listing doesn't state | 12 | 129 |
| Measure | ask | jev |
|---|---|---|
| Right, of the questions answered | 98% | 79% |
| Wrong answers, of 92 | 2 | 19 |
| Measure | Trained localiser | Best of four frontier models |
|---|---|---|
| Mean overlap with the defect (IoU, 0 to 1) | 0.421 | 0.109 |