Skip to main content

aida-sdk

AI DevOps Incident Intelligence SDK for Python. Auto-captures logs, errors, and exceptions — triggers AI-powered incident analysis automatically.

Install

pip install aida-sdk

Quick Start

import aida

aida.init(
    api_key="sk-...",          # from GET /api/v1/sdk/keys
    project_id="owner/my-repo",  # your GitHub repo full name
    repo_name="owner/my-repo",
    base_url="https://your-aida-backend.com",
    environment="production",
    service="my-backend-api",
)

# ✅ After this line — ALL print() and logging output is auto-captured.
# ✅ Uncaught exceptions are auto-captured and trigger the incident pipeline.
# ✅ Error-level entries automatically trigger the 4-agent AI analysis.

print("Server started")          # → captured as info log
import logging
logging.error("DB connection failed")  # → captured as error, triggers incident AI
raise ValueError("Something broke")    # → captured as error with traceback

What Gets Captured Automatically

Source Level Notes
print() info All stdout output
sys.stderr error All stderr output
logging.debug/info/warning/error mapped Full logging module
Uncaught exceptions error Includes full traceback

Manual Logging (Optional)

aida.get_client().error("Payment gateway timeout", metadata={"gateway": "stripe", "latency_ms": 5000})
aida.get_client().info("User signed up", metadata={"user_id": "123"})

Configuration

Parameter Default Description
api_key required Bearer token from /api/v1/sdk/keys
project_id required Repo full name for linking logs to incidents
repo_name required Same as project_id
base_url required Your backend URL
environment "production" Environment tag
service "app" Service name tag
batch_size 20 Max logs per HTTP request
flush_interval 2.0 Seconds between flushes
intercept_stdout True Capture print()
intercept_logging True Capture logging module
intercept_exceptions True Capture uncaught exceptions

Publish to PyPI

CI publish (GitHub Actions):

  • Tag the repo with python-sdk-v* or run workflow_dispatch.
  • Required secret: PYPI_API_TOKEN.
cd python-sdk
pip install build twine
python -m build
twine upload dist/*

Release files for aida-sdk 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aida-sdk 1.0.2
File Size Uploaded
aida_sdk-1.0.2.tar.gz 7.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for aida-sdk 1.0.2
File Interpreter ABI Platform
aida_sdk-1.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 14.4 kB

Release files / aida_sdk-1.0.2.tar.gz

Download URL aida_sdk-1.0.2.tar.gz
Size 7.5 kB
Tags Source
SHA-256 checksum
How to use checksums
01c997365a83c89520355d6967feb318f7c778e776cc47b0bfdd944e260f040c
BLAKE2b-256 checksum
How to use checksums
a0e0f8c6d65f61b3c6656fa012b00cbb4f22d5f1e5dce4a0017add1cf5aec3ab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Release files / aida_sdk-1.0.2-py3-none-any.whl

Download URL aida_sdk-1.0.2-py3-none-any.whl
Size 6.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7502a46a137e4e4dc49e7a32ff7cf041a79ff81cd1a381891812d154df4b5b77
BLAKE2b-256 checksum
How to use checksums
3944ab6a9b20aa79c4b465661bc9fa920c6e2d389e485a419e58cbc369d985d8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page