Run state
Current step, status and checkpoint data.
run_id · session_id · statusAI agents
Keep run state, useful memories and tool outcomes in one database. Retrieve the context your agent needs, with records you can inspect.
Your agent runtime controls the loop. OriginChainDB stores the state and context it reads and writes along the way.
session-84 / run-12Your runtime starts the next turn.
agent.memoriesRows, embeddings and text indexes use separate writes.
Illustrative records. Select a stage to inspect its role; no agent or tool is executed.
A suggested data model
Use session, run and record IDs to connect observations with their source. These are application tables you define, not a required agent framework.
Current step, status and checkpoint data.
run_id · session_id · statusA focused observation with its time and source.
memory_id · agent_id · textThe attempted action and recorded outcome.
call_id · run_id · outcomeAdd embeddings and full-text entries under the memory's ID. Row, vector and text writes are separate calls; track which steps have completed.
See the memory schema and writesUse structured lookups for state, similarity for related memories, keywords for exact terms and graph references for provenance.
Tools with a clear contract
Expose focused database tools through your application. ASK accepts a question, table scope and optional plan inspection, then returns database rows.
It is a query interface. Your runtime still chooses tools, calls models and decides whether an action needs approval.
Read the ASK contractPOST /v1/tenants/:tenant/ask{
"nl": "agent.memories where session_id = 'session-84' limit 5",
"schemas": ["agent.memories"],
"show_plan": true
}Scope the request to the memory table and review its returned plan.
Durable records are the starting point. Define how your application handles partial writes, stale context and access to each session.