Docs/SDK Guides

Auto-Instrumentation

SDK

Automatic capture for OpenAI, Anthropic, LangChain, and LiteLLM.

Usage Example

example_usage.py
# Example integration for Auto-Instrumentation
from agentis import init, observe

# Initialize Agentis with auto-instrumentation
init(
    project="production-fleet",
    environment="production",
    redact_pii=True
)

@observe(name="auto-instrumentation")
def execute_task(payload: dict):
    # Traces, spans and costs are tracked with 0ms added latency
    return {"status": "success", "data": payload}

Key Capabilities

  • OpenTelemetry OTLP standard semantics across all parent and child spans.
  • Exact span-end token pricing computed locally across 2,500+ foundation models.
  • Client-side PII scrubbing before telemetry packets leave your application memory.