Skip to content

bodhi-realtime-agent / createAgentContext

Function: createAgentContext() ​

createAgentContext(options): AgentContext

Defined in: src/agent/agent-context.ts:99

Factory that builds an AgentContext object for agent lifecycle hooks. Wires injectSystemMessage and getRecentTurns to the live ConversationContext.

Parameters ​

options ​

agentName ​

string

conversationContext ​

ConversationContext

hooks ​

HooksManager

memoryFacts? ​

MemoryFact[]

requestTransfer? ​

(toAgent) => void

sendAudioToClient? ​

(data) => void

sendJsonToClient? ​

(message) => void

sessionId ​

string

setExternalAudioHandler? ​

(handler) => void

stopBufferingAndDrain? ​

(handler) => void

Returns ​

AgentContext

Built with VitePress