Skip to main content
The original AutoGen API (autogen.ConversableAgent, initiate_chat, and related classes) is now maintained by AG2. Trace that API with the supported AG2Instrumentor, which captures chats, replies, and tool execution as OpenInference AGENT and TOOL spans in Arize AX. The deprecated openinference-instrumentation-autogen package is not supported.
This page is for applications using the legacy autogen API. Install AG2, which exposes that module, rather than the original AutoGen package. For Microsoft’s current autogen-agentchat package, use the separate AutoGen AgentChat tracing guide.

Prerequisites

  • Python 3.10+
  • An Arize AX account (sign up)
This offline example does not require an LLM provider key.

Launch Arize AX

  1. Sign in to your Arize AX account.
  2. From Space Settings, copy your Space ID and API Key.

Install

Configure credentials

Setup tracing

Initialize the instrumentor before importing autogen.

Run legacy AutoGen API

Expected output

Verify in Arize AX

  1. Open project autogen-tracing-example.
  2. You should see AGENT spans for the chat and reply, plus a TOOL span named get_weather.

Check from the skill, CLI, or SDK

Confirm spans are actually reaching your Arize AX project. Use whichever fits your workflow — the skill and CLI work for any framework; the SDK check is shown for each language.
Install the Arize Skills plugin and let your coding agent check for you:
Then prompt your agent:
Use the arize-trace skill to export and analyze recent traces from my project. Confirm spans are arriving, and summarize any errors or latency issues.

More patterns

For group chats, sequential chats, structured outputs, context propagation, masking controls, and optional OpenAI LLM child spans, see the AG2 tracing guide.

Resources

OpenInference AG2 Instrumentor

AG2 repository

AutoGen AgentChat tracing