Catalog PyPI
PACKAGE EXPLORERView in registry

aerograph-sdk

PyPI

Python SDK for AeroGraph — emit trace events from Python agent workflows.

aerographagentaiobservabilitytracing
Versions collected1
Direct dependencies6From release 0.3.0
Last observed20 Oct, 20:47 UTC

README

Version 0.3.0 documentation

aerograph-sdk

The core Python Flight Recorder for emitting normalized trace events from any Python codebase to the AeroGraph collector.

Overview

AeroGraph is an open-source cognitive observability layer for AI agent workflows. It allows you to record, playback, and visually inspect the deterministic decision-making paths of your agents.

This SDK provides a FlightRecorder instance to seamlessly construct and emit strictly validated TraceEvent objects.

Installation

pip install aerograph-sdk

(Requires Python >= 3.10)

Quick Start

from aerograph_sdk import FlightRecorder

# 1. Initialize the recorder
recorder = FlightRecorder(
    endpoint="http://localhost:4317", # AeroGraph Collector URL
    actor={"id": "my-travel-agent", "name": "Travel Planner"},
    project_id="travel-app", # Optional (v1.1.0)
    environment="production" # Optional (v1.1.0)
)

# 2. Emit events
prompt_event = recorder.prompt(
    text="Plan a trip to Tokyo",
    model={"name": "gpt-4o", "provider": "openai"},
    usage={"inputTokens": 10, "totalTokens": 10},
    duration_ms=50
)

response_event = recorder.response(
    parent_span_id=prompt_event.spanId,
    text="Here is your 3-day itinerary...",
    usage={"inputTokens": 10, "outputTokens": 50, "totalTokens": 60},
    duration_ms=2500
)

Async Usage

Every method has an _async twin:

await recorder.prompt_async(text="Hello")

Available Event Kinds

The FlightRecorder supports 10 canonical event kinds:

  • prompt: Input sent to an LLM.
  • response: Output from an LLM.
  • tool_call: Invocation of a tool.
  • tool_result: The tool's resulting output.
  • handoff: Delegating execution from one agent to another.
  • error: Any exception or system failure.
  • retriever: RAG retrieval query and source documents.
  • state_snapshot: A deterministic hash of a LangGraph node's state.
  • checkpoint: A human-in-the-loop pause.
  • note: Freeform structured annotations.

Span Hierarchy

Every event acts as a "span" in the trace tree. To link a child event to a parent event, pass the parent's spanId via the parent_span_id parameter.

License

Apache-2.0

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.3.030 Jun 20266

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
sgcpu/aerograph

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 20:47 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:b6821848457c57cf9affdee9f65553ecefc1948c5da2e7c57efff6622c465f21