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 runworkflow_dispatch. - Required secret:
PYPI_API_TOKEN.
cd python-sdk
pip install build twine
python -m build
twine upload dist/*
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aida_sdk-1.0.1.tar.gz.
File metadata
- Download URL: aida_sdk-1.0.1.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fe84fbb2485d0b0ad99c89124ec07e5b2f190a32d8b6537bc7a6f3a5bb6b4a13
|
|
| MD5 |
d20953abe27547071bc9d2c018bbb121
|
|
| BLAKE2b-256 |
1e108d3ca81789b4d59b4c12a618838b3516c0859e5185c09d57b2e8e17dfc80
|
File details
Details for the file aida_sdk-1.0.1-py3-none-any.whl.
File metadata
- Download URL: aida_sdk-1.0.1-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2929b691b6cec1274e521de9ecd3b89afa639326bbeca107adfd72dde16593bf
|
|
| MD5 |
b5618aaf43eb4b4005210e69f25bda01
|
|
| BLAKE2b-256 |
5fb5cc894e5b112ad3a88923e53ef2cd471c7d5b8381d37bbe9fbe9f09f2b1d5
|