bodhi-realtime-agent / SubagentConfig
Interface: SubagentConfig
Defined in: src/types/agent.ts:81
Configuration for a background subagent that runs via the Vercel AI SDK. Subagents handle long-running tool calls asynchronously while Gemini continues speaking.
Extended by
Properties
createInstance?
optionalcreateInstance?: () =>SubagentConfig
Defined in: src/types/agent.ts:111
Optional factory that returns an isolated subagent config instance per handoff. Use this when tool state must not be shared across concurrent background runs.
Returns
SubagentConfig
dispose?
optionaldispose?: () =>void|Promise<void>
Defined in: src/types/agent.ts:113
Optional cleanup function called when the subagent run ends (success, error, or abort).
Returns
void | Promise<void>
instructions
instructions:
string
Defined in: src/types/agent.ts:85
System instructions for the subagent's LLM call.
interactive?
optionalinteractive?:boolean
Defined in: src/types/agent.ts:106
When true, a SubagentSession with user interaction capabilities is created.
lifetime?
optionallifetime?:SubagentLifetimeMode
Defined in: src/types/agent.ts:119
Subagent lifetime mode.
'ephemeral'(default): one instance per tool call, disposed after completion.'persistent_session': instance persists across multiple tool calls within the same VoiceSession.
maxSteps?
optionalmaxSteps?:number
Defined in: src/types/agent.ts:89
Maximum number of LLM steps before stopping (default 5).
model?
optionalmodel?:string
Defined in: src/types/agent.ts:104
Deprecated
A model name, kept so configs that set it still compile. It is accepted but ignored, as it was by the builds that declared it: the subagent runs on reasoningModel when set, otherwise on the session default, and a session logs one warning per subagent that sets model without reasoningModel. Set reasoningModel instead.
name
name:
string
Defined in: src/types/agent.ts:83
Unique name identifying this subagent configuration.
persistentFactory?
optionalpersistentFactory?:PersistentSubagentFactory
Defined in: src/types/agent.ts:126
Optional factory for runtime-managed persistent instances.
Used by actor-mode orchestration when lifetime is 'persistent_session'. If unset, the runtime falls back to normal handoff execution.
reasoningModel?
optionalreasoningModel?:LanguageModelV1
Defined in: src/types/agent.ts:96
Optional Vercel AI SDK text model for this subagent’s generateText relay. When omitted, the session default (VoiceSessionConfig.model) is used.
timeout?
optionaltimeout?:number
Defined in: src/types/agent.ts:91
Timeout in milliseconds for the entire subagent run.
tools
tools:
Record<string,unknown>
Defined in: src/types/agent.ts:87
Vercel AI SDK tool() definitions available to the subagent.