AnoSys SDK for OpenAI Agents
Automatically capture and send OpenAI Agents SDK traces to AnoSys for monitoring, analytics, and observability.
Features
✨ Automatic Agent Tracing - Captures all agent runs, tool calls, and handoffs
✨ TracingProcessor Integration - Native integration with OpenAI Agents SDK
✨ Structured Span Data - Captures agent, function, guardrail, and generation spans
✨ User Context Support - Associate traces with user sessions
Installation
pip install anosys-sdk-openai-agents
Quick Start
import os
from agents import Agent, Runner, set_tracing_processor
from anosys_sdk_openai_agents import AnosysOpenAIAgentsLogger
os.environ["OPENAI_API_KEY"] = "your-openai-key"
os.environ["ANOSYS_API_KEY"] = "your-anosys-key"
# Set up the tracing processor
set_tracing_processor(AnosysOpenAIAgentsLogger())
# Create and run an agent
agent = Agent(
name="Assistant",
instructions="You are a helpful assistant."
)
result = Runner.run_sync(agent, "Hello!")
print(result.final_output)
User Context
Associate traces with user sessions:
def get_user_context():
return {
"session_id": "user-123",
"token": "auth-token"
}
processor = AnosysOpenAIAgentsLogger(get_user_context=get_user_context)
set_tracing_processor(processor)
Span Types Captured
- agent - Agent execution spans
- function - Tool/function calls
- generation - LLM generation calls
- guardrail - Guardrail checks
- handoff - Agent handoffs
- response - Response spans
- custom - Custom spans
Environment Variables
| Variable | Required | Description |
|---|---|---|
ANOSYS_API_KEY |
Yes | Your AnoSys API key |
OPENAI_API_KEY |
Yes | Your OpenAI API key |
License
Apache 2.0
Metadata
Release files for anosys-sdk-openai-agents 1.0.13
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 |
|---|---|---|---|---|
| anosys_sdk_openai_agents-1.0.13.tar.gz | 23.8 kB | Without provenance | Details for anosys_sdk_openai_agents-1.0.13.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| anosys_sdk_openai_agents-1.0.13-py3-none-any.whl | Python 3 | none | any | Details for anosys_sdk_openai_agents-1.0.13-py3-none-any.whl |
Total release size: 44.8 kB
Release files / anosys_sdk_openai_agents-1.0.13.tar.gz
| Download URL | anosys_sdk_openai_agents-1.0.13.tar.gz |
|---|---|
| Size | 23.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
62a3c9b022de1b199ca341aa5d8c9fc62972dc0b6fe0fec9f7907f7e693bb779
|
|
BLAKE2b-256 checksum How to use checksums |
77d37db3b190b67fc318657d43c43a8e066f59d91833f8bb7cb778a89a2f461a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / anosys_sdk_openai_agents-1.0.13-py3-none-any.whl
| Download URL | anosys_sdk_openai_agents-1.0.13-py3-none-any.whl |
|---|---|
| Size | 21.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
307ec91378cee6d23087dcefe689f116c0d2d5accd1ca7811b706d8828a10850
|
|
BLAKE2b-256 checksum How to use checksums |
88577d2f64df477c0ee16e79486bef5c34abea1b1199953b5dfb93dcd386b464
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Security for anosys-sdk-openai-agents 1.0.13
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.