Catalog PyPI
PACKAGE EXPLORERView in registry

agentmetrics-autogen

PyPI

AgentMetrics observability integration for AutoGen agents

agentmetricsai-agentsautogenmonitoringobservability
Versions collected1
Direct dependencies3From release 0.2.0
Last observed20 Oct, 22:43 UTC

README

Version 0.2.0 documentation

agentmetrics-autogen

PyPI License: MIT

AgentMetrics integration for AutoGen. Wrap team.run_stream() with one async context manager and every run reports back to your dashboard showing latency, tool calls, and errors. Token counts are not available from AutoGen's streaming events and are not tracked.


Install

pip install agentmetrics-autogen

Quickstart

from agentmetrics_autogen import AgentMetricsRunStream

tracker = AgentMetricsRunStream(
    agent_id="my-autogen-team",
    base_url="http://localhost:8099",
)

async with tracker.run(team, task="Analyze this dataset") as stream:
    async for event in stream:
        pass  # handle events as normal

tracker.flush()

API

AgentMetricsRunStream(agent_id, base_url)

ParameterDefaultDescription
agent_id"autogen-agent"Label shown in the dashboard
base_url"http://localhost:8099"AgentMetrics server address

.run(team, **kwargs)

Returns an async context manager. Calls team.run_stream(**kwargs) internally. Yields a tracking iterator that intercepts ToolCallRequestEvent, ToolCallExecutionEvent, and TaskResult events to collect run metrics.

Emits a run summary to /v1/events on context exit (success or exception).

.flush(timeout=10.0)

Blocks until all in-flight HTTP requests complete.


What gets tracked

Each .run() call emits one event to /v1/events on completion or exception:

FieldDescription
statussuccess or failed
duration_msWall-clock run duration
tool_callsNumber of ToolCallRequestEvent events
tool_errorsNumber of tool results with is_error=True
tool_namesSet of tool names from request events
errorError message if TaskResult.stop_reason contains "error"

License

MIT

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.2.020 Jun 20263

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
andalabx/agentmetrics

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 22:43 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:0cc0b684fd21a63c96264c74ead5fa0dc6345e2bd2d04e6b83d4cc252edbb089