Skip to main content

Anosys.ai

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

Requires Python 3.10 or later.

pip install anosys-sdk-openai-agents

Quick Start

import os
from agents import Agent, Runner, add_trace_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
add_trace_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)
add_trace_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

Content controls

See the content-controls reference for encryption coverage, default columns, size limits, and limitations. Encryption is opt-in and applies to selected string fields; it does not encrypt the complete record.

Collection follows one level for every AnoSys SDK: ANOSYS_COLLECTION_LEVEL=full (default), metadata (no prompts, completions or tool data) or off, a project .anosys file can only lower it, and ANOSYS_DISABLE=1 stops all sending. Without an API key nothing is sent. Telemetry is sent in the background and never delays your calls. See the data-collection policy.

Metadata

Release files for anosys-sdk-openai-agents 1.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for anosys-sdk-openai-agents 1.2.0
File Size Uploaded Provenance Actions
anosys_sdk_openai_agents-1.2.0.tar.gz 29.6 kB Without provenance Details for anosys_sdk_openai_agents-1.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for anosys-sdk-openai-agents 1.2.0
File Interpreter ABI Platform Actions
anosys_sdk_openai_agents-1.2.0-py3-none-any.whl Python 3 none any Details for anosys_sdk_openai_agents-1.2.0-py3-none-any.whl

Total release size: 52.9 kB

Release files / anosys_sdk_openai_agents-1.2.0.tar.gz

Download URL anosys_sdk_openai_agents-1.2.0.tar.gz
Size 29.6 kB
Tags Source
SHA-256 checksum
How to use checksums
848c917df6fd9b96dba6a6556115fbfb485230bc5dd9b7b7769c43f975dcc036
BLAKE2b-256 checksum
How to use checksums
5fb3bb63b4b8a143f4612df9a7e66637e39e91143ab1d8b06de6a73ccf75595d
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.2.0-py3-none-any.whl

Download URL anosys_sdk_openai_agents-1.2.0-py3-none-any.whl
Size 23.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
af670304b1f953352e05759de443aec40404973505235de0780b7a4141a8ec8e
BLAKE2b-256 checksum
How to use checksums
e066e876c4bf9c696ab1a4a967cd4a94173572081765e59665a277b0aeb830d5
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.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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page