Skip to main content
AgentChat provides several pre-built agent types for common use cases. All agents implement the BaseChatAgent interface.

AssistantAgent

The most commonly used agent type. It uses an LLM to generate responses and can call tools.

Parameters

str
required
Unique identifier for the agent
ChatCompletionClient
required
The LLM client (OpenAI, Anthropic, etc.)
str
Defines the agent’s behavior and persona
str
Description used by other agents to understand this agent’s role
List[BaseTool]
Tools the agent can use. Can be functions, MCP servers, or custom tools
List[Handoff | str]
Other agents this agent can transfer tasks to
bool
default:"False"
Enable streaming responses from the model
bool
default:"False"
Whether the agent should reflect on tool results before responding
int
default:"10"
Maximum number of tool calling rounds before stopping
List[Memory]
Memory systems for context retrieval

CodeExecutorAgent

An agent specialized in executing code safely in isolated environments.
CodeExecutorAgent requires a code executor backend (Docker, local, or Jupyter). See Code Executors for more details.

Parameters

str
required
Agent identifier
CodeExecutor
required
The code execution backend (Docker, local, or Jupyter)
str
Description for other agents

UserProxyAgent

An agent that requests human input for decision-making.
When used in a team, the UserProxyAgent will prompt for human input when it’s the agent’s turn to respond.

SocietyOfMindAgent

An agent that encapsulates a team of agents, presenting them as a single agent to the outside.

MessageFilterAgent

An agent that filters messages based on configurable criteria.

Creating custom agents

To create a custom agent, inherit from BaseChatAgent:
See Custom Agents Guide for more details.

Agent comparison

Next steps

Teams

Combine agents into teams

Tools

Add tools to your agents

Custom Agents

Build your own agent types

Examples

See agents in action