Skip to main content
AutoGen tools extend agent capabilities by connecting to external services, APIs, and specialized search systems.

Installation

Install the tools you need:

MCP Servers

The Model Context Protocol (MCP) provides a standardized way to connect AI systems to external tools and data sources.

McpWorkbench

The McpWorkbench wraps MCP servers and provides access to their tools:

Server Types

MCP supports multiple server connection types:

Stdio Servers

Connect to servers running as subprocesses:
string
required
Command to execute
list[string]
required
Command arguments
float
default:"30"
Timeout for reading from the process
dict[str, str]
Environment variables for the process

SSE Servers

Connect to servers using Server-Sent Events:
string
required
SSE endpoint URL
string
Authentication API key
float
default:"30"
Connection timeout in seconds

Streamable HTTP Servers

Connect to HTTP-based MCP servers:

Tool Overrides

Customize tool names and descriptions:

Using with Agents

MCP Resources

Access server resources:

MCP Prompts

Access server prompts:

HTTP Tools

The HttpTool wraps HTTP/REST APIs as AutoGen tools:

Basic Usage

Configuration Options

string
required
Tool name
string
Tool description
'http' | 'https'
default:"http"
URL scheme
string
required
API host
int
required
API port
string
default:"/"
Request path. Can include path parameters like /{param}
'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH'
default:"POST"
HTTP method
dict[str, Any]
Request headers
dict[str, Any]
required
JSON schema for request parameters
'text' | 'json'
default:"text"
Response format
float
default:"5.0"
Request timeout in seconds

Path Parameters

Define path parameters in the URL:

Headers and Authentication

Add authentication headers:

Using with Agents

LangChain Tools

The LangChainToolAdapter wraps LangChain tools for use with AutoGen:

Basic Usage

Using with Agents

SQL Database Tools

GraphRAG

GraphRAG tools enable semantic search over document corpora using graph-based retrieval.

Setup

Before using GraphRAG tools:
  1. Initialize GraphRAG project:
  2. Configure settings.yaml with your LLM and embedding settings
  3. Add documents to the input directory
  4. Run indexing:

Global Search Tool

Global search finds broad patterns across the entire corpus:

Local Search Tool

Local search finds specific information related to entities:

Using Both Search Types

Configuration

Customize GraphRAG behavior:

Best Practices

Security

Always validate tool inputs:

Error Handling

Handle tool errors gracefully:

Timeout Configuration

Set appropriate timeouts:

Resource Cleanup

Always clean up resources:

Next Steps

Custom Extensions

Build your own custom extensions

Model Clients

Configure LLM providers