Basic Usage
Signature
Configuration Options
Required Properties
| Property | Type | Description |
|---|---|---|
name | string | Unique agent identifier |
llm | AgentLlmAdapterConfig | LLM provider configuration |
Optional Properties
| Property | Type | Description |
|---|---|---|
description | string | Agent description |
inputSchema | ZodShape | Input validation schema |
outputSchema | ZodType | Output validation schema |
tools | ToolType[] | Tools available to the agent |
systemInstructions | string | System prompt for the agent |
id | string | Stable identifier |
tags | string[] | Categorization tags |
LLM Configuration
LLM Providers
OpenAI
Anthropic (Claude)
Google (Gemini)
Agent Loop
By default, agents run an automatic loop:- Send input to LLM with available tools
- If LLM requests tool call, execute tool and return result
- Repeat until LLM returns final response
- Parse and return output
Custom Execution
Overrideexecute() for custom behavior:
Function-Based Alternative
Context Methods
LLM Completion
Tool Execution
Notifications
Elicitation
Agent Visibility
Agents can invoke other agents:Full Example
Related
AgentContext
Context class details
AgentRegistry
Agent registry API
Agent Errors
Agent-related errors
@Tool
Define tools