Skip to main content
YAML tools: under framework: autogen (v0.2) are now fully wired into the AutoGen chat — the assistant advertises them to the LLM and the user_proxy executes them.

Quick Start

1

Declare the tool in YAML

Reference the tool by name under a role’s tools: list.
2

Define the tool and run

Define get_weather as a plain callable with a __name__ and a docstring, then run the YAML.

How It Works

The adapter registers each callable on both AutoGen v0.2 agents so the LLM can call it and the user_proxy can run it.

Skip Rules

Tools that cannot be wired are logged and skipped — never silently dropped. Duplicate handling prevents AutoGen’s last-write-wins _function_map from silently overwriting an earlier tool when two agents declare a same-named callable.

Timeout Translation

AutoGen v0.2 runs tools inside its chat loop and expects a string to hand back to the LLM. When a per-call tool timeout raises ToolTimeoutError, the adapter’s _wrap_tool_for_execution catches it and returns "Error: tool '<name>' timed out (…)." so the conversation keeps moving instead of aborting. See Tool Configuration → Wrapper-Level Tool Timeout for the full timeout contract.

Best Practices

The tool name comes from __name__ (or a name attribute), and the LLM-facing description is the first line of the docstring. Named functions with a one-line docstring wire cleanly.
Lambdas have no __name__, so the adapter cannot resolve a name and skips them with a warning. Use def.
Two agents declaring a tool with the same __name__ share one user_proxy; only the first callable is registered for execution. Give each tool a distinct name.

AutoGen Tool Registry Migration

Migrate tool registries into AutoGen

AutoGen LLM config_list

Configure the AutoGen LLM config_list