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/*
Metadata
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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| aida_sdk-1.0.2.tar.gz | 7.5 kB | Without provenance | Details for aida_sdk-1.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| aida_sdk-1.0.2-py3-none-any.whl | Python 3 | none | any | Details for aida_sdk-1.0.2-py3-none-any.whl |
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
|
Security for aida-sdk 1.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.