The Infinium Python SDK provides agent observability for AI-powered applications. It captures structured trace data from your agents and sends it to the Infinium platform, where Maestro — our behavioral intelligence engine — analyzes and scores agent performance.

Core Concept

Your agent does work. The SDK captures what happened. Maestro evaluates how well it went.

The SDK never asks the agent to score itself, say pass/fail, or rate its own confidence. It records facts — timestamps, token counts, error types, outputs produced — and Maestro decides if the work was good.

How It Works

Your Agent Code

    ├── watch(OpenAI())          ← Auto-captures LLM calls
    ├── @client.trace("Task")    ← Wraps execution in a trace


Infinium SDK

    ├── Captures: steps, tokens, latency, errors, outputs
    ├── Builds: TaskData (structured JSON)
    ├── Sends: POST /agents/{id}/trace


Infinium Platform

    └── Maestro evaluates trace quality and scores performance

Features

  • Auto-Instrumentationwatch() patches LLM clients (OpenAI, Anthropic, Gemini, xAI) to capture calls automatically
  • Trace Decorators@trace_agent and @client.trace() wrap functions with zero boilerplate
  • Manual TracingTraceBuilder and send_task() for full control
  • Prompt Studio — Fetch managed prompts with variable substitution
  • Async-First — Full async support with AsyncInfiniumClient
  • Batch Operations — Send multiple traces efficiently
  • Maestro Polling — Wait for AI-powered interpretation of your traces
  • OpenTelemetry — Optional bridge to emit OTel spans
GuideDescription
Getting StartedInstallation, credentials, first trace
Sending Tracessend_task, TaskData, TraceBuilder
Auto-Instrumentationwatch(), provider adapters, streaming
Trace Decorators@trace_agent, @client.trace()
Prompt StudioManaged prompts with variable substitution
Async UsageAsyncInfiniumClient, async patterns
Batch OperationsSending multiple traces
Maestro ResultsPolling for AI interpretation
Error HandlingException hierarchy, retry behavior
ConfigurationClient options, logging, rate limiting
OpenTelemetryOTel span export

Reference

ReferenceDescription
Data TypesAll dataclasses with fields and defaults
Domain SectionsBusiness context types (Customer, Sales, etc.)
API ReferenceComplete class and method reference

Package Info

  • PyPI: infinium-o2
  • Python: >= 3.9
  • Dependencies: httpx >= 0.25.0
  • License: See repository