Skip to content

bodhi-realtime-agent / AgentContext

Interface: AgentContext

Defined in: types/agent.ts:11

Runtime context passed to agent lifecycle hooks (onEnter, onExit, onTurnCompleted). Provides read access to session state and the ability to inject messages.

Properties

agentName

agentName: string

Defined in: types/agent.ts:15

Name of the agent receiving this context.


sessionId

sessionId: string

Defined in: types/agent.ts:13

Current session identifier.

Methods

getMemoryFacts()

getMemoryFacts(): MemoryFact[]

Defined in: types/agent.ts:21

Retrieve all memory facts currently stored for this user.

Returns

MemoryFact[]


getRecentTurns()

getRecentTurns(count?): ConversationItem[]

Defined in: types/agent.ts:19

Retrieve the most recent conversation turns (default 10).

Parameters

count?

number

Returns

ConversationItem[]


injectSystemMessage()

injectSystemMessage(text): void

Defined in: types/agent.ts:17

Inject a system-level message into the conversation (visible to the model on next turn).

Parameters

text

string

Returns

void

Built with VitePress