The unique name of the agent within the swarm.
Optional
callbacksOptional lifecycle callbacks for the agent, allowing customization of execution flow.
Optional
completionThe name of the completion mechanism used by the agent. REQUIRED WHEN AGENT IS NOT OPERATOR
Optional
connectOperator connection function to passthrough the chat into operator dashboard
Optional
dependsOptional array of agent names this agent depends on for transitions (e.g., via changeToAgent).
Optional
docOptional description for documentation purposes, aiding in agent usage understanding.
Optional
keepOptional maximum number of messages to maintain context size
Optional
mapOptional function to map assistant messages, e.g., converting JSON to tool calls for specific models.
The assistant message to process.
The ID of the client interacting with the agent.
The name of the agent.
The transformed assistant message.
Optional
mapOptional function to filter or modify tool calls before execution.
The array of tool calls to process.
The ID of the client interacting with the agent.
The name of the agent.
The filtered or modified tool calls.
Optional
maxOptional maximum number of tool calls allowed per completion cycle.
Optional
mcpOptional array of mcp names managed by the agent
Optional
operatorFlag means the operator is going to chat with customer on another side
Optional
promptThe primary prompt guiding the agent's behavior. REQUIRED WHEN AGENT IS NOT OPERATOR
Optional
statesOptional array of state names managed by the agent.
Optional
storagesOptional array of storage names utilized by the agent.
Optional
systemOptional array of system prompts, typically used for tool-calling protocols.
Optional
systemOptional dynamic array of system prompts from the callback
Optional
systemOptional array of system prompts, alias for system
Optional
toolsOptional array of tool names available to the agent.
Optional
transformOptional function to transform the model's output before further processing.
The raw input from the model.
The ID of the client interacting with the agent.
The name of the agent.
The transformed output string.
Optional
validateOptional function to validate the agent's output before finalization.
The output string to validate.
A promise resolving to the validated output or null if invalid.
Optional
wikiOptional array of wiki names utilized by the agent.
Interface representing the configuration schema for an agent. Defines the agent's properties, tools, and lifecycle behavior.