recall at the entry of a graph node and store at the exit, your agent carries relevant context from previous runs into every new execution — without relying on LangGraph’s built-in checkpoint mechanism or any external database daemon. sovseal-sdk’s store/recall talk to the local ONEBRAIN engine over framed IPC, so recall adds no network latency to your graph.
Installation
State graph with recall-on-entry and store-on-exit
The example below defines aStateGraph with a single chatbot node. On entry, the node calls recall to fetch the top-3 relevant memories and injects them into the system prompt. On exit, it calls store to persist the latest interaction. No MCP server or subprocess is spawned — AgentStateClient talks to the native host directly.
agent.py
How the pattern works
store/recall require the native host launcher at ~/.sovseal/native-host/run.sh. Run npx -y @sovseal/mcp-server once to provision it — see SDK Reference: Overview. Initialize AgentStateClient() once at module level, as shown above, rather than per node invocation — the native-host subprocess is spawned lazily on first call and reused across calls.