agentmetrics-autogen
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)
| Parameter | Default | Description |
|---|---|---|
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:
| Field | Description |
|---|---|
status |
success or failed |
duration_ms |
Wall-clock run duration |
tool_calls |
Number of ToolCallRequestEvent events |
tool_errors |
Number of tool results with is_error=True |
tool_names |
Set of tool names from request events |
error |
Error message if TaskResult.stop_reason contains "error" |
License
Metadata
Release files for agentmetrics-autogen 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| agentmetrics_autogen-0.2.0.tar.gz | 4.3 kB | Without provenance | Details for agentmetrics_autogen-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| agentmetrics_autogen-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for agentmetrics_autogen-0.2.0-py3-none-any.whl |
Total release size: 9.1 kB
Release files / agentmetrics_autogen-0.2.0.tar.gz
| Download URL | agentmetrics_autogen-0.2.0.tar.gz |
|---|---|
| Size | 4.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d7b22919e21c528f8f2c64e8604f9039a80df213aadffdd025ebed5c16011643
|
|
BLAKE2b-256 checksum How to use checksums |
77a716ab0390c65174138ec73135ed08dcacbb18d6458e0ce758309ee75f6b15
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Release files / agentmetrics_autogen-0.2.0-py3-none-any.whl
| Download URL | agentmetrics_autogen-0.2.0-py3-none-any.whl |
|---|---|
| Size | 4.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
34b96e816bc82b212126a6ba22de912c09b0b4c0140759cb85143a673072b57a
|
|
BLAKE2b-256 checksum How to use checksums |
45461a6217726596247cdefd71ee4a749795e93f38a62655cc197abaff64ee58
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Security for agentmetrics-autogen 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.