Skip to main content

AIDA — AI DevOps Incident Intelligence SDK. Auto-captures logs, errors, and exceptions, streams them to your AIDA backend, and triggers AI-powered incident analysis.

Project description

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/*

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

aida_sdk-1.0.2.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

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

aida_sdk-1.0.2-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file aida_sdk-1.0.2.tar.gz.

File metadata

  • Download URL: aida_sdk-1.0.2.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for aida_sdk-1.0.2.tar.gz
Algorithm Hash digest
SHA256 01c997365a83c89520355d6967feb318f7c778e776cc47b0bfdd944e260f040c
MD5 d099ee26d67065a788208620b491439f
BLAKE2b-256 a0e0f8c6d65f61b3c6656fa012b00cbb4f22d5f1e5dce4a0017add1cf5aec3ab

See more details on using hashes here.

File details

Details for the file aida_sdk-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: aida_sdk-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for aida_sdk-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7502a46a137e4e4dc49e7a32ff7cf041a79ff81cd1a381891812d154df4b5b77
MD5 480007e970fe95ea6375ae3e4c32ceda
BLAKE2b-256 3944ab6a9b20aa79c4b465661bc9fa920c6e2d389e485a419e58cbc369d985d8

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