Documentation Index
Fetch the complete documentation index at: https://docs.ixo.world/llms.txt
Use this file to discover all available pages before exploring further.
Overview
MainAgentGraphState is a LangGraph annotation-based state. Every node in the graph reads it and may return a partial update; the runtime merges updates via per-field reducers and checkpoints the result to per-user SQLite (backed by Matrix).
rtCtx.history.state (typed as ReadonlyState) or via specific helpers like rtCtx.history.messages / rtCtx.history.userContext.
Fields
messages
messages
- Type: LangChain
BaseMessage[] - Reducer:
MessagesAnnotationdefault (append, dedupe by id). - Owner: runtime + agent loop.
rtCtx.history.messages (readonly) or rtCtx.history.recent(n).config
config
- Type:
{ wsId?: string; did: string } - Owner: runtime.
client
client
- Type:
'portal' | 'matrix' | 'slack' - Owner: runtime.
rtCtx.session.client.editorRoomId
editorRoomId
- Type:
string | undefined - Owner: Editor plugin.
spaceId
spaceId
- Type:
string | undefined - Owner: runtime / plugins.
currentEntityDid
currentEntityDid
- Type:
string | undefined - Owner: Domain Indexer plugin.
browserTools
browserTools
- Type:
BrowserToolCallDto[] | undefined - Owner: Portal client.
agActions
agActions
- Type:
AgActionDto[] | undefined - Owner: Portal client (AG-UI).
userContext
userContext
- Type:
UserContextData(Record<string, unknown>) - Owner: Memory plugin (writes via enrichment middleware).
rtCtx.shared.userProfile (registered by Memory’s getSharedState).mcpUcanContext
mcpUcanContext
- Type:
{ invocations: Record<string, string> } | undefined - Owner: runtime / UCAN service.
userPreferences
userPreferences
- Type:
UserPreferences | undefined - Owner: user-preferences plugin.
loadedPlugins
loadedPlugins
- Type:
string[] - Reducer: union via Set (deduplicating).
- Default:
[]. - Owner: runtime — written by the
load_capabilitymeta-tool.
on-demand plugins the agent has loaded for this thread. Monotonically growing across turns. Cleared on new thread.This is the single new field the plugin runtime added to the state — every other field above pre-dates the plugin rewrite.ReadonlyState
Plugins access the state viartCtx.history.state, which is typed as ReadonlyState:
[key: string]: unknown), so plugins can read field names they know exist but the type doesn’t enforce it. For fully-typed reads, declare the field on SharedAccessors via shared state, or check existence at runtime.
Reducers
Each field has a reducer that merges partial updates from agent nodes:messages— append + dedupe by ID (LangGraph default for the messages channel).loadedPlugins— union via Set; never removes.- Most other fields use last-write-wins or “merge if present” semantics; consult the source for the exact reducer when authoring middleware that mutate state.
Checkpointing
State is checkpointed per thread to per-user SQLite viaUserMatrixSqliteSyncService + SqliteSaver. The DB lives under SQLITE_DATABASE_PATH, synced to Matrix in the background.
The runtime exposes hooks.checkpointerForUser(userDid) so hosts can override the default per-user checkpointer with an alternate implementation — pass via createOracleApp({ hooks }).
Related references
- RuntimeContext —
rtCtx.historyfield. - Meta-tools concept — how
loadedPluginsis populated.