Skip to main content

Basic Usage

Signature

Configuration Options

Required Properties

Optional Properties

LLM Configuration

LLM Providers

OpenAI

Anthropic (Claude)

Google (Gemini)

Agent Loop

By default, agents run an automatic loop:
  1. Send input to LLM with available tools
  2. If LLM requests tool call, execute tool and return result
  3. Repeat until LLM returns final response
  4. Parse and return output

Custom Execution

Override execute() for custom behavior:

Function-Based Alternative

Context Methods

LLM Completion

Tool Execution

Notifications

Elicitation

Agent Visibility

Agents can invoke other agents:

Full Example

AgentContext

Context class details

AgentRegistry

Agent registry API

Agent Errors

Agent-related errors

@Tool

Define tools