The agent sessions that used each credential (owner only), read from the change feed: harness, model, tool calls, row changes, operations and tables, the most recent first.
const url = 'https://example.com/datanotes/sessions/';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"token":"example","since":"example","limit":100}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/datanotes/sessions/ \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "token": "example", "since": "example", "limit": 100 }'Each session groups the change feed’s events of one credential (owner or a token’s name) and one agent session (compared on its first 16 characters); a credential’s work without a session is one entry with session: null. Hand edits and background work have no credential and are left out. A named token is refused (403), even with maintain.
Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”object
Only this credential: owner or a token’s name.
ISO date-time: the earliest event to look at. Default: 7 days ago.
The most sessions to return.
Responses
Section titled “Responses”Done.
object
The earliest time looked at (ISO date-time).
object
The credential: owner or a token’s name.
The session id (its longest form seen); null for work without a session.
Inserts, updates, deletes, moves and unreadable rows.
Distinct journal operations.
The tables of its row changes (sorted).
Its tools by calls, most first (at most 20).
object
Example generated
{ "since": "example", "sessions": [ { "token": "example", "session": "example", "harness": "example", "model": "example", "first_at": "example", "last_at": "example", "first_seq": 1, "last_seq": 1, "tool_call_count": 1, "failed_tool_call_count": 1, "row_change_count": 1, "migration_count": 1, "tables": [ "example" ], "tools": [ { "tool": "example", "call_count": 1 } ] } ]}Bad input: the body is not a JSON object, or an argument is unknown, missing or of the wrong type.
object
What went wrong, for a person or an agent.
Example generated
{ "error": "example"}Missing or wrong bearer token.
object
What went wrong, for a person or an agent.
Example generated
{ "error": "example"}A named token beyond its permissions (the engine’s administration, tables outside its write patterns, schema changes without ddl).
object
What went wrong, for a person or an agent.
Example generated
{ "error": "example"}Unexpected error.
object
What went wrong, for a person or an agent.
Example generated
{ "error": "example"}The change feed is not running.
object
What went wrong, for a person or an agent.
Example generated
{ "error": "example"}