Skip to main content

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

Project description

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"}
)

# 2. Emit events
prompt_event = recorder.prompt(text="Plan a trip to Tokyo")

response_event = recorder.response(
    parent_span_id=prompt_event.spanId,
    text="Here is your 3-day itinerary..."
)

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aerograph_sdk-0.2.1.tar.gz (23.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aerograph_sdk-0.2.1-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

Details for the file aerograph_sdk-0.2.1.tar.gz.

File metadata

  • Download URL: aerograph_sdk-0.2.1.tar.gz
  • Upload date:
  • Size: 23.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for aerograph_sdk-0.2.1.tar.gz
Algorithm Hash digest
SHA256 1510c62b1ac438b703ae1fd3599a8cf66345c7f37c8237b02cac5d5848c0f601
MD5 3fd12e3a44403fcae981911078312804
BLAKE2b-256 68c620538c911e1ba9a2873e743cbf8fc4b40714bc91476fc7357ff7dbef74d0

See more details on using hashes here.

Provenance

The following attestation bundles were made for aerograph_sdk-0.2.1.tar.gz:

Publisher: release-python.yml on SGcpu/AeroGraph

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file aerograph_sdk-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: aerograph_sdk-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 15.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for aerograph_sdk-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2399cd95cea2218b82bcb2917122e17e6a542cac77cbb6c4515d6bc54ed878a3
MD5 e45205f3f4978013120c37092c7919ae
BLAKE2b-256 69c7460c765c6b4936a8df0a6c18d762f3ed2e3ac4e8271be47c0d3af479dff3

See more details on using hashes here.

Provenance

The following attestation bundles were made for aerograph_sdk-0.2.1-py3-none-any.whl:

Publisher: release-python.yml on SGcpu/AeroGraph

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page