Skip to main content

AutoGen

Use the Adaline AutoGen observer to send AutoGen runner activity into Adaline. The integration wraps an existing runner or agent and observes its run lifecycle without changing the task logic itself.
adaline-autogen is currently in early access and is not yet published on PyPI. Contact support@adaline.ai to get access.

Prerequisites

Before you start, make sure you have:
  • An Adaline account.
  • A workspace API key — create one under Settings → API keys.
  • Your project ID — copy it from Monitor → Copy Project ID.
See Integrate your AI Agent for a full walkthrough. Set both as environment variables before running the examples on this page:

Install

Install the AutoGen packages your application already uses alongside the Adaline integration package. If you use the OpenAI model client shown below, make sure the corresponding AutoGen OpenAI extension package is also installed in your environment.

Initialize Adaline

Create an Adaline client, then initialize a monitor for the target project.
For production guidance — buffering, batching, retries, serverless flushing, and graceful shutdown — see Instrument with the Adaline SDK.

Wrap an AutoGen runner

Create an AdalineAutoGenObserver, then wrap the runner or agent you want to observe.

Basic example

This example keeps the integration intentionally small: one AssistantAgent run observed through wrap_runner.

Use an existing parent trace or span

The AutoGen observer accepts:
  • parent_trace
  • parent_span
Pass one or the other, but not both.

What the observer captures

The AutoGen integration is designed to capture observed runner activity, including:
  • runner-level roots created when a wrapped run starts
  • task input passed into the observed runner
  • child spans emitted during the wrapped run
  • framework and runner metadata stored as Adaline attributes
This page focuses on how to wrap the runner. The exact span tree depends on the AutoGen runner behavior and the events emitted during the run.

Next steps

Instrument with the Adaline SDK

Monitor lifecycle, buffering and batching, retries, serverless flushing, and graceful shutdown.

SDK reference

Full class and type reference for the TypeScript and Python SDKs.

All integrations

Browse every framework and AI-provider integration Adaline supports.

View your logs

Open Adaline to see traces and spans land in your project.