zespan-autogen
Observability middleware for Microsoft AutoGen via Zespan.
Install
# For AutoGen v0.4 (autogen-agentchat)
pip install 'zespan-autogen[agentchat]'
# For AutoGen v0.2 (pyautogen / ag2)
pip install 'zespan-autogen[legacy]'
AutoGen v0.4 — run_with_tracing()
Replace await team.run(task=...) with await run_with_tracing(team, task, ...):
from zespan_autogen import run_with_tracing
from autogen_agentchat.teams import RoundRobinGroupChat
from autogen_agentchat.conditions import MaxMessageTermination
from autogen_ext.models.openai import OpenAIChatCompletionClient
from autogen_agentchat.agents import AssistantAgent
model = OpenAIChatCompletionClient(model="gpt-4o")
agent = AssistantAgent("assistant", model_client=model)
team = RoundRobinGroupChat([agent], termination_condition=MaxMessageTermination(5))
trace_id = await run_with_tracing(
team=team,
task="Analyze the sales data",
api_key="zsp_your_key",
project_id="your_project_id",
)
AutoGen v0.4 — ZespanModelClient (per-LLM-call tracing)
from zespan_autogen import ZespanModelClient
from autogen_ext.models.openai import OpenAIChatCompletionClient
base = OpenAIChatCompletionClient(model="gpt-4o")
model = ZespanModelClient(base, api_key="zsp_your_key", project_id="proj_id")
agent = AssistantAgent("assistant", model_client=model)
AutoGen v0.2 — register_hooks()
from autogen import AssistantAgent, UserProxyAgent
from zespan_autogen import register_hooks
assistant = AssistantAgent("assistant", llm_config={"config_list": [...]})
user = UserProxyAgent("user", human_input_mode="NEVER")
register_hooks(assistant, user, api_key="zsp_your_key", project_id="proj_id")
user.initiate_chat(assistant, message="Research quantum computing trends")
What's captured
- All agent messages (source, content, token counts)
- Tool call requests and execution results
- Agent handoffs and delegation
- Internal reasoning/thought events (thinking models)
- Memory query events
- Raw LLM request/response (via
ZespanModelClient)
Metadata
Release files for zespan-autogen 1.3.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 |
|---|---|---|---|---|
| zespan_autogen-1.3.0.tar.gz | 17.3 kB | Without provenance | Details for zespan_autogen-1.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| zespan_autogen-1.3.0-py3-none-any.whl | Python 3 | none | any | Details for zespan_autogen-1.3.0-py3-none-any.whl |
Total release size: 28.1 kB
Release files / zespan_autogen-1.3.0.tar.gz
| Download URL | zespan_autogen-1.3.0.tar.gz |
|---|---|
| Size | 17.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3c5885c363e49e412557d89ef65a532ef37abe964cc8207bb091716e054c9b01
|
|
BLAKE2b-256 checksum How to use checksums |
c983c635b703d566288cd41ec7f1f36a5a3778af95f44f87c05700b931916808
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Hatch/1.18.2 {"ci":null,"cpu":"arm64","distro":{"name":"macOS","version":"27.0.1"},"implementation":{"name":"CPython","version":"3.12.15"},"installer":{"name":"hatch","version":"1.18.2"},"openssl_version":"OpenSSL 3.5.9 29 Sep 2026","python":"3.12.15","system":{"name":"Darwin","release":"27.0.0"}} HTTPX2/2.16.0
|
Release files / zespan_autogen-1.3.0-py3-none-any.whl
| Download URL | zespan_autogen-1.3.0-py3-none-any.whl |
|---|---|
| Size | 10.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d3839f74d1908e486c44991680c7160ef86113954ccd240c317acddfa34ee8aa
|
|
BLAKE2b-256 checksum How to use checksums |
4bb6f8b9d83ff12b03169e895e3254304dc35064882a2e7dda3b7f588b85bfa8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Hatch/1.18.2 {"ci":null,"cpu":"arm64","distro":{"name":"macOS","version":"27.0.1"},"implementation":{"name":"CPython","version":"3.12.15"},"installer":{"name":"hatch","version":"1.18.2"},"openssl_version":"OpenSSL 3.5.9 29 Sep 2026","python":"3.12.15","system":{"name":"Darwin","release":"27.0.0"}} HTTPX2/2.16.0
|
Security for zespan-autogen 1.3.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.