Skip to main content

Enterprise-grade AI agent reliability monitoring and autonomous remediation

Project description

Aigie Python SDK

PyPI Version Python Version License: Proprietary CI

Aigie is the official Python SDK for Kytte -- the Autonomous Reliability Platform for Agentic AI.

Proprietary software. Copyright (c) 2026 Kytte AI, Inc. All Rights Reserved. Use of the Aigie SDK requires a written agreement with Kytte AI, Inc. and a valid Kytte account. Not licensed for redistribution or modification. Contact: support@aigie.io

Kytte is a runtime reliability platform for agentic AI, built to address the core reason most AI agents never reach production: non-deterministic runtime failures. Unlike reactive observability tools, Kytte operates during execution -- proactively detecting and autonomously remediating failed agent steps in real time, with no changes to your existing infrastructure or agent architecture. The Aigie SDK is the integration layer that connects your agents to the Kytte platform:

  • Detects context drift and errors before they impact users
  • Fixes issues automatically through self-healing workflows
  • Prevents failures with predictive intervention

Installation

pip install aigie

With optional integrations

# Compression (recommended for production -- 50-90% bandwidth savings)
pip install aigie[compression]

# LLM providers
pip install aigie[openai]              # OpenAI
pip install aigie[anthropic]           # Anthropic Claude
pip install aigie[gemini]              # Google Gemini

# Agent frameworks
pip install aigie[langchain]           # LangChain
pip install aigie[langgraph]           # LangGraph
pip install aigie[claude-agent-sdk]    # Anthropic Claude Agent SDK

# Vector databases
pip install aigie[pinecone]            # Pinecone
pip install aigie[qdrant]              # Qdrant
pip install aigie[chromadb]            # ChromaDB
pip install aigie[weaviate]            # Weaviate
pip install aigie[vectordbs]           # All vector DBs

# Observability
pip install aigie[opentelemetry]       # OpenTelemetry inbound
pip install aigie[otlp]                # OTLP export

# Everything
pip install aigie[all]

Quick start

Decorator-based tracing (recommended)

from aigie import traceable

@traceable(run_type="agent")
async def my_agent(query: str):
    result = await process_query(query)
    return result

result = await my_agent("What is the weather?")

Auto-instrument LLM providers

from aigie import wrap_openai, wrap_anthropic
from openai import AsyncOpenAI
from anthropic import AsyncAnthropic

# OpenAI -- all calls automatically traced with model, tokens, cost, latency
client = wrap_openai(AsyncOpenAI())
response = await client.chat.completions.create(
    model="gpt-4",
    messages=[{"role": "user", "content": "Hello!"}],
)

# Anthropic
client = wrap_anthropic(AsyncAnthropic())

Context manager

from aigie import Aigie, Config

config = Config(
    api_url="https://api.aigie.com",
    api_key="your-key",
    batch_size=100,
    flush_interval=5.0,
)

aigie = Aigie(config=config)
await aigie.initialize()

async with aigie.trace("My Workflow") as trace:
    async with trace.span("operation", type="llm") as span:
        result = await do_work()
        span.set_output({"result": result})

Integrations

Agent frameworks

Framework Install extra Auto-instrument
LangChain langchain AigieCallbackHandler
LangGraph langgraph wrap_langgraph()
Claude Agent SDK claude-agent-sdk patch_claude_agent_sdk()

LLM providers

Provider Wrapper
OpenAI wrap_openai()
Anthropic wrap_anthropic()
Google Gemini wrap_gemini()
AWS Bedrock wrap_bedrock()

Each integration lives in sdk/aigie/integrations/<framework>/ and follows a consistent pattern with auto-instrumentation, cost tracking, drift detection, error detection, retry logic, and session management. See CONTRIBUTING.md for details on adding new integrations.

Configuration

Environment variables

export AIGIE_API_URL=https://your-instance.aigie.io/api
export AIGIE_API_KEY=your-api-key
export AIGIE_BATCH_SIZE=100
export AIGIE_FLUSH_INTERVAL=5.0

Config object

from aigie import Config

config = Config(
    api_url="https://api.aigie.com",   # Aigie API endpoint
    api_key="your-key",                # API key
    batch_size=100,                    # Events per batch (default: 10)
    flush_interval=5.0,               # Flush interval in seconds
    enable_buffering=True,            # Enable event buffering (default: True)
    max_retries=3,                    # Retry count on failure
)

Advanced features

OpenTelemetry integration

from aigie import Aigie
from aigie.opentelemetry import setup_opentelemetry

aigie = Aigie()
await aigie.initialize()
setup_opentelemetry(aigie, service_name="my-service")

# All OTel spans now flow to Aigie
from opentelemetry import trace
tracer = trace.get_tracer(__name__)
with tracer.start_as_current_span("operation"):
    pass

Evaluation and scoring

from aigie import score, feedback

await score(trace_id, "accuracy", 0.95)
await feedback(trace_id, "user_feedback", "Great response!")

Prompt management

from aigie import Prompt

prompt = Prompt.chat(
    name="customer_support",
    messages=[{"role": "system", "content": "You are a helpful assistant."}],
    version="1.0",
)

Synchronous API

from aigie import AigieSync

aigie = AigieSync()
aigie.initialize()

with aigie.trace("workflow") as trace:
    with trace.span("operation") as span:
        result = do_work()
        span.set_output({"result": result})

Zero data retention

Wrap a call in aigie.no_retention() to keep its execution data inside your environment. Nothing about that run leaves it.

from contextlib import nullcontext

ctx = aigie.no_retention() if request.zero_retention else nullcontext()
with ctx:
    result = app.invoke(state, config)

Use aigie.no_retention_async() in async code.

API reference

Full API documentation is available at docs.aigie.io/sdk/python.

Development

# Clone and set up
git clone https://github.com/Kytte-AI/kytte-python-sdk.git
cd kytte-python-sdk
python -m venv .venv
source .venv/bin/activate
pip install -e "sdk/[dev]"

Common commands

make lint        # Run ruff linter
make format      # Format code with ruff
make test        # Run unit tests
make test-all    # Run all tests including integration
make coverage    # Run tests with coverage report
make typecheck   # Run mypy type checking
make check       # Run all checks (lint + test)
make build       # Build distribution packages

Running tests

# Unit tests
pytest tests/unit/ -v

# Integration tests (requires API keys)
pytest tests/integration/ -v

# Coverage report
pytest tests/unit/ --cov=sdk/aigie --cov-report=html --cov-report=term-missing

Publishing

Releases are published to PyPI automatically when a GitHub release is created, via the publish.yaml workflow.

Manual publishing is also supported:

./scripts/publish-sdk.sh <version>
# e.g. ./scripts/publish-sdk.sh 0.2.39

Contributing

See CONTRIBUTING.md for development setup and guidelines.

License

Proprietary -- Copyright (c) 2026 Kytte AI, Inc. All Rights Reserved. See LICENSE for details.

Documentation

Related

Repository Description
docs-site Documentation site

Website: https://kytte.ai/

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

aigie-0.2.44.tar.gz (571.5 kB view details)

Uploaded Source

Built Distribution

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

aigie-0.2.44-py3-none-any.whl (673.1 kB view details)

Uploaded Python 3

File details

Details for the file aigie-0.2.44.tar.gz.

File metadata

  • Download URL: aigie-0.2.44.tar.gz
  • Upload date:
  • Size: 571.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for aigie-0.2.44.tar.gz
Algorithm Hash digest
SHA256 459f3b8cdd469cb262d5c519eb3ad435f3a3894499734cf12ad3cd555b8dc377
MD5 a9ef19c86bc571ce44ac7f731b17b071
BLAKE2b-256 9dee1e4cb1bf32a5091ee4772c44a44d8c4a679034208cb14676c05c9573b7b8

See more details on using hashes here.

File details

Details for the file aigie-0.2.44-py3-none-any.whl.

File metadata

  • Download URL: aigie-0.2.44-py3-none-any.whl
  • Upload date:
  • Size: 673.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for aigie-0.2.44-py3-none-any.whl
Algorithm Hash digest
SHA256 3d066a5708f5c3f0c93f5a7e9b6525a3b8477566d5c6d9ad6057f8f4f77f6347
MD5 b38140e5b4127531ce93596df3776b3e
BLAKE2b-256 a74fb79589ca40e06fd5c6c2924f827a2b71ad2b2e2030bce60fb36d1e722f9d

See more details on using hashes here.

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