AutoGen
AutoGen is Microsoft’s framework for building multi-agent conversational systems. SideSeat captures runs (traces) from agent interactions.
Prerequisites
Section titled “Prerequisites”- SideSeat running locally (
sideseat) - Python 3.10+
- Model/provider credentials configured
Quick Start
Section titled “Quick Start”-
Start SideSeat
Terminal window npx sideseat -
Install dependencies
Terminal window pip install autogen-agentchat "autogen-ext[openai]" "sideseat[autogen]"Terminal window uv add autogen-agentchat "autogen-ext[openai]" "sideseat[autogen]" -
Add telemetry
from sideseat import SideSeat, Frameworksfrom autogen_agentchat.agents import AssistantAgentfrom autogen_ext.models.openai import OpenAIChatCompletionClientSideSeat(framework=Frameworks.AutoGen)model_client = OpenAIChatCompletionClient(model="gpt-5-mini", api_key="sk-xxx")assistant = AssistantAgent("assistant", model_client=model_client)result = await assistant.run(task="Hello!")print(result.messages[-1].content) -
View runs
Open http://localhost:5388 to see your runs.
Without SideSeat SDK
Section titled “Without SideSeat SDK”-
Start SideSeat
Terminal window npx sideseat -
Set the endpoint
Terminal window export OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:5388/otel/default -
Install dependencies
Terminal window pip install autogen-agentchat "autogen-ext[openai]" openinference-instrumentation-autogen-agentchat opentelemetry-exporter-otlpTerminal window uv add autogen-agentchat "autogen-ext[openai]" openinference-instrumentation-autogen-agentchat opentelemetry-exporter-otlp -
Add telemetry
from opentelemetry import tracefrom opentelemetry.sdk.trace import TracerProviderfrom opentelemetry.sdk.trace.export import BatchSpanProcessorfrom opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporterfrom openinference.instrumentation.autogen_agentchat import AutogenAgentChatInstrumentorprovider = TracerProvider()provider.add_span_processor(BatchSpanProcessor(OTLPSpanExporter()))trace.set_tracer_provider(provider)AutogenAgentChatInstrumentor().instrument(tracer_provider=provider, skip_dep_check=True) -
View runs
Open http://localhost:5388 to see your runs.
Agent Configuration
Section titled “Agent Configuration”Configure AutoGen agents with LLM settings:
from autogen_agentchat.agents import AssistantAgentfrom autogen_ext.models.openai import OpenAIChatCompletionClient
model_client = OpenAIChatCompletionClient(model="gpt-5-mini", api_key="sk-xxx")
assistant = AssistantAgent( name="assistant", model_client=model_client, system_message="You are a helpful coding assistant.",)
result = await assistant.run(task="Write a Python hello world")print(result.messages[-1].content)Multi-Agent Conversations
Section titled “Multi-Agent Conversations”Multi-agent chats are traced end-to-end:
from autogen_agentchat.agents import AssistantAgentfrom autogen_agentchat.conditions import MaxMessageTerminationfrom autogen_agentchat.teams import RoundRobinGroupChat
coder = AssistantAgent("coder", model_client=model_client)reviewer = AssistantAgent("reviewer", model_client=model_client)
team = RoundRobinGroupChat( [coder, reviewer], termination_condition=MaxMessageTermination(max_messages=6),)
result = await team.run(task="Write and review a sorting function")print(result.messages[-1].content)Extracted Attributes
Section titled “Extracted Attributes”| Attribute | Description |
|-----------|-------------|
| autogen.agent.name | Agent name |
| autogen.chat.round | Conversation round |
| autogen.message.sender | Message sender |
| autogen.code.execution | Code execution status |
Code Execution
Section titled “Code Execution”AutoGen’s code execution is traced:
user = UserProxyAgent( name="user", code_execution_config={ "work_dir": "coding", "use_docker": False })SideSeat shows:
- Code generation spans
- Execution spans with output
- Error spans if execution fails
What You’ll See
Section titled “What You’ll See”SideSeat shows a trace timeline with:
- A parent span for each agent conversation
- Child spans for each LLM call with model, tokens, and cost
- Code generation and execution spans with outputs
- Error spans with exception details when failures occur
Next Steps
Section titled “Next Steps”- Python SDK — SDK reference
- Core Concepts — understanding runs, steps, and messages