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.0.tar.gz (7.0 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.0-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: aida_sdk-1.0.0.tar.gz
  • Upload date:
  • Size: 7.0 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.0.tar.gz
Algorithm Hash digest
SHA256 b18a6b3842c36404f79e9c191d5ba3e865842f4160ecc695efcd04cdd9bcd46b
MD5 47330452213e1724604250b5f8061b5b
BLAKE2b-256 a704cc4cf965a3b1924cb4779797eaec83e4e51de731c0e3e4a2162c66e814b5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: aida_sdk-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 5.9 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dc66ae0f0b5244c864ca92d9e5e1711a8253df3db9330f50c2a5fbca1ff42f71
MD5 58110739df02a587fe7c4a3febea297f
BLAKE2b-256 2775c095361742236e4b4f38e763ae3a0c6393d1b420650ae7fb773009d66c5d

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