Skip to content

AutoGen

AutoGen is Microsoft’s framework for building multi-agent conversational systems. SideSeat captures runs (traces) from agent interactions.

  • SideSeat running locally (sideseat)
  • Python 3.9+
  • Model/provider credentials configured
  1. Start SideSeat

    Terminal window
    npx sideseat
  2. Install dependencies

    Terminal window
    pip install autogen-agentchat "sideseat[autogen]"
  3. Add telemetry

    from sideseat import SideSeat, Frameworks
    from autogen import AssistantAgent, UserProxyAgent
    SideSeat(framework=Frameworks.AutoGen)
    llm_config = {"config_list": [{"model": "gpt-5-mini", "api_key": "sk-xxx"}]}
    assistant = AssistantAgent("assistant", llm_config=llm_config)
    user = UserProxyAgent("user", human_input_mode="NEVER")
    user.initiate_chat(assistant, message="Hello!")
  4. View runs

    Open http://localhost:5388 to see your runs.

  1. Start SideSeat

    Terminal window
    npx sideseat
  2. Set the endpoint

    Terminal window
    export OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:5388/otel/default
  3. Install dependencies

    Terminal window
    pip install autogen-agentchat openinference-instrumentation-autogen-agentchat opentelemetry-exporter-otlp
  4. Add telemetry

    from opentelemetry import trace
    from opentelemetry.sdk.trace import TracerProvider
    from opentelemetry.sdk.trace.export import BatchSpanProcessor
    from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter
    from openinference.instrumentation.autogen_agentchat import AutogenAgentChatInstrumentor
    provider = TracerProvider()
    provider.add_span_processor(BatchSpanProcessor(OTLPSpanExporter()))
    trace.set_tracer_provider(provider)
    AutogenAgentChatInstrumentor().instrument(tracer_provider=provider, skip_dep_check=True)
  5. View runs

    Open http://localhost:5388 to see your runs.

Configure AutoGen agents with LLM settings:

from autogen import AssistantAgent, UserProxyAgent
config_list = [
{"model": "gpt-5-mini", "api_key": "sk-xxx"}
]
assistant = AssistantAgent(
name="assistant",
llm_config={"config_list": config_list}
)
user = UserProxyAgent(
name="user",
human_input_mode="NEVER",
code_execution_config={"work_dir": "coding"}
)
user.initiate_chat(assistant, message="Write a Python hello world")

Multi-agent chats are traced end-to-end:

from autogen import AssistantAgent, UserProxyAgent, GroupChat, GroupChatManager
# Create agents
coder = AssistantAgent("coder", llm_config={"config_list": config_list})
reviewer = AssistantAgent("reviewer", llm_config={"config_list": config_list})
user = UserProxyAgent("user", human_input_mode="NEVER")
# Create group chat
groupchat = GroupChat(
agents=[user, coder, reviewer],
messages=[],
max_round=10
)
manager = GroupChatManager(groupchat=groupchat)
# Start conversation
user.initiate_chat(manager, message="Write and review a sorting function")
AttributeDescription
autogen.agent.nameAgent name
autogen.chat.roundConversation round
autogen.message.senderMessage sender
autogen.code.executionCode execution status

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

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