Python SDK
Official SDK for Python 3.8+.
⚡ The PyPI package is coming soon. For now, use the REST API directly with
requests or httpx — see the cURL / REST docs.Install (coming soon)
pip install aigodfather
Initialize
| Option | Type | Description |
|---|---|---|
api_key | str | Required. Your API key |
base_url | str | API URL override |
debug | bool | Enable debug logging (default: False) |
timeout | int | Timeout in seconds (default: 10) |
max_retries | int | Retries on 429/5xx (default: 3) |
default_tags | list | Tags added to every event |
default_metadata | dict | Metadata merged into every event |
on_block | callable | Called when rule blocks |
on_approval_required | callable | Called when approval needed |
Methods
ai.info(message, metadata) · ai.warning(message, metadata) · ai.error(message, metadata) · ai.critical(message, metadata)
ai.track(event_type, severity, message, metadata, user_id, tags)
ai.action(action_name, resource, severity, message, metadata, ...)
ai.wait_for_approval(approval_id, interval_seconds, timeout_seconds)
ai.check_approval(approval_id) · ai.ping()
Error Classes
| Error | When |
|---|---|
BlockedError | Rule blocked the action |
PlanLimitError | Plan event limit reached |
AgentPausedError | Agent is paused |