Interface: MemoryHookContext
Defined in: packages/agentos/src/api/agent.ts:95
Who a memory hook serves: filled by the runtime on every call of getContext and observe.
Properties
agentId?
readonlyoptionalagentId:string
Defined in: packages/agentos/src/api/agent.ts:108
The agent's stable id: its soul's id, else a named agent's id; undefined when the agent has none.
call
readonlycall:"session"|"one-shot"
Defined in: packages/agentos/src/api/agent.ts:110
'session' for a session turn, 'one-shot' for generate() and stream().
providerUserId?
readonlyoptionalproviderUserId:string
Defined in: packages/agentos/src/api/agent.ts:106
The user id the caller passed; undefined when none was passed.
sessionId
readonlysessionId:string
Defined in: packages/agentos/src/api/agent.ts:97
The session the caller opened; for a one-shot generate() or stream(), the call's own id.
subject
readonlysubject:object
Defined in: packages/agentos/src/api/agent.ts:104
The subject memory is keyed by: { kind: 'user', id: userId } when the session named a user, else
{ kind: 'session', id: sessionId }. Two kinds, two keys: a user and a session of the same name never share memory.
id
id:
string
kind
kind:
"user"|"session"
userId
readonlyuserId:string
Defined in: packages/agentos/src/api/agent.ts:99
The session's user: AgentSessionOptions.userId, else sessionId. Never 'system' or another anonymous id.