Knolo MCP Quote Check: Reread the Exact Bytes Another Agent Cited
Knolo can catch an edited quote between agents: pass the hit's image, object, state root and byte offsets, verify the mount, and reread the span with knolo_get.
Knolo is the open-source, local-first Knowledge Image runtime and format from Hive AI (Apache-2.0, published as @knolo/core on npm). When one agent quotes a Knolo Knowledge Image to another, the second agent should not have to trust the quote. This week the Knolo core repository merged a runnable way to check it: reread the exact bytes the first agent cited and compare.
This post walks through the merged changes. They are on main in GitHub and not yet in an npm release; the latest published @knolo/mcp is still 0.2.4.
What a Knolo search hit carries
A knolo_search hit from the Knolo MCP server is more than text. Alongside the excerpt it carries the imageId, objectId, stateRoot, and the byte offsets start and end (end is exclusive). Those five location fields name one span of bytes inside one pinned Knowledge Image. See Knolo excerpts and Knolo evidence identity for how those fields are defined.
The Knolo quote check, step by step
The updated two-agent guide in the repo (docs/guides/agents-sharing-knowledge.md, PR #229) describes the flow:
- The sender searches the image and hands off the hit's
excerptplusimageId,objectId,stateRoot,startandend. - The receiver, with read access to the same pinned image under the same mount ID, calls
knolo_verifyfor that image. - The receiver passes the five location fields to
knolo_getand compares the returnedcontentwith the quote.
The receiver does not need the sender's local receipt file. It only needs the same pinned image.
Knolo catches an edited quote, not just a broken image
The guide's example quote is "Annual enterprise refunds are available within 30 days." If the quote is changed to "14 days", the image still verifies, because nothing about the image changed. The text comparison is what catches the edit.
That distinction matters. knolo_verify proves which bytes you mounted. Rereading the cited span proves whether the words you were handed are the words in those bytes. A query receipt is an integrity check; it does not mean a claim is true.
The OpenAI Agents SDK smoke test in examples/openai_agents_js now runs both cases in a second MCP session against the local refund-policy fixture. Its reported output includes imageVerified: true, originalMatches: true, editedMatches: false and modelCalled: false: no model and no API key are involved.
A Knolo fix that keeps byte offsets honest
A quote check only works if the returned text matches the cited bytes exactly. PR #255 fixed a case where it didn't. The shared UTF-8 decoder behind knolo_search and knolo_get treated U+FEFF at the start of a slice as a byte order mark and dropped it. A page starting partway through an object could lose a real character while the reported byte range still counted its three bytes. The decoder now keeps U+FEFF (it still rejects malformed UTF-8), and a regression test checks text and offsets across pages.
A zero-dependency Knolo MCP smoke client
PR #237 added examples/mcp-stdio-client/: a small Node.js JSON-RPC client with no dependencies. It spawns the Knolo MCP server over stdio against a local fixture and checks initialize, tools/list, knolo_status and knolo_search, asserting the expected refund excerpt and a qr_ receipt ID. It is a quick way to confirm a Knolo MCP build works before wiring it into an agent host.
Try Knolo
- Docs: Knolo docs on knolo.dev and the Knolo MCP guide
- Source: Knolo core on GitHub
- Open technology and specifications: Knolo on knolo.org
knolo · mcp · knowledge-image · verification · open-source