See who did what
Every write records its actor: the credential that made it, and, when the caller says so, the program or agent behind it, its model and its session. The journal, the history and the change feed show it, so you can tell who changed what and undo one agent’s work without touching the rest.
What the actor records
Section titled “What the actor records”The actor has these fields:
auth: the credential,owneror the name of a named token; the engine sets it, and no header can claim itharnessandharness_version: the program or MCP client, such asclaude-codemodel: the model behind an agentsession: the agent’s sessiontool: the tool the agent called
A program sends the other fields with the X-Datanotes-Actor header, or the client’s actor option, as Record who makes each write shows. datanotes mcp fills them from the MCP connection, as Every write names the agent that made it explains.
See which token made a change
Section titled “See which token made a change”Every write records the credential as auth in its actor: owner, or the token’s name. When a program forwards an agent’s X-Datanotes-Actor header, the engine records both, as “harness / model via token”. A program that writes for itself, without the header, appears under its token’s name.
list_migrations shows this name in the by field of each change, and list_changes shows the whole actor.
Report what an agent does
Section titled “Report what an agent does”A program that serves its own Model Context Protocol (MCP) server can report its agents to the engine, with any token:
POST /datanotes/sessions/identify/: names the model and harness behind an agent’s session; later writes that carry the session inX-Datanotes-Actorrecord themPOST /datanotes/tool-calls/record/: records a tool call on the change feed, withserved_bynaming who served it
Tool calls appear on the change feed as events with kind: "tool_call", sent only to consumers that ask for that kind. The call field holds tool, ok, served_by, duration_ms, summary and session, the arguments cut at 300 characters, the value cut at 1,000, and the result’s size in result_chars and result_tokens.
Read who did what
Section titled “Read who did what”Three operations read the record:
list_migrations: the journal, newest first, each write withby, the actor’s namedescribe_history: the commits of one table or of every table, with the full actor; it needs history onlist_changes: every change with its actor, and withkinds: ["tool_call"]every tool call an MCP server reported
restore_database with before_migration brings every table back to the moment before an agent’s first write: Restore a table or the database shows it.