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.10+
  • Model/provider credentials configured
  1. Start SideSeat

    Terminal window
    npx sideseat
  2. Install dependencies

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

    from sideseat import SideSeat, Frameworks
    from autogen_agentchat.agents import AssistantAgent
    from autogen_ext.models.openai import OpenAIChatCompletionClient
    SideSeat(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)
  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 "autogen-ext[openai]" 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_agentchat.agents import AssistantAgent
from 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 chats are traced end-to-end:

from autogen_agentchat.agents import AssistantAgent
from autogen_agentchat.conditions import MaxMessageTermination
from 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)

| Attribute | Description | |-----------|-------------| | autogen.agent.name | Agent name | | autogen.chat.round | Conversation round | | autogen.message.sender | Message sender | | autogen.code.execution | Code 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