Athena Intelligence Python Library
The Athena Intelligence Python Library provides convenient access to the Athena Intelligence API from applications written in Python.
The library includes type definitions for all request and response fields, and offers both synchronous and asynchronous clients powered by httpx.
Installation
Add this dependency to your project's build file:
pip install athenaintel
# or
poetry add athenaintel
Usage
Simply import Athena and start making calls to our API.
from athena import GeneralAgentConfig, GeneralAgentRequest, InputMessage
from athena.client import Athena
client = Athena(
api_key="YOUR_API_KEY" # Defaults to ATHENA_API_KEY
)
response = client.agents.general.invoke(
request=GeneralAgentRequest(
config=GeneralAgentConfig(enabled_tools=[]),
messages=[
InputMessage(
role="user",
content="Summarize what Athena Intelligence does in one paragraph.",
)
],
)
)
print(response.messages[-1].content)
Async Client
The SDK also exports an async client so that you can make non-blocking calls to our API.
import asyncio
from athena import GeneralAgentConfig, GeneralAgentRequest, InputMessage
from athena.client import AsyncAthena
client = AsyncAthena(
api_key="YOUR_API_KEY" # Defaults to ATHENA_API_KEY
)
async def main() -> None:
response = await client.agents.general.invoke(
request=GeneralAgentRequest(
config=GeneralAgentConfig(enabled_tools=[]),
messages=[
InputMessage(
role="user",
content="Summarize what Athena Intelligence does in one paragraph.",
)
],
)
)
print("Received message", response)
asyncio.run(main())
Long-running workflows
For long-running AOP executions, start the execution asynchronously and check the thread status with the returned thread ID:
from athena import AopExecuteRequestIn
from athena.client import Athena
client = Athena(api_key="...")
execution = client.aop.execute_async(
request=AopExecuteRequestIn(
asset_id="YOUR_AOP_ASSET_ID",
user_inputs={"company": "Athena Intelligence"},
)
)
status = client.threads.get_status(execution.thread_id)
Athena Module
All of the models are nested within the Athena module. Let IntelliSense guide you!
Exception Handling
All errors thrown by the SDK will be subclasses of ApiError.
from athena.core import ApiError
try:
client.users.me()
except ApiError as e: # Handle all API errors
print(e.status_code)
print(e.body)
Advanced
Timeouts
By default, requests time out after 60 seconds. You can configure this with a timeout option at the client or request level.
from athena.client import Athena
client = Athena(
# All timeouts are 20 seconds
timeout=20.0,
)
# Override timeout for a specific method
client.users.me(request_options={"timeout_in_seconds": 20})
Custom HTTP client
You can override the httpx client to customize it for your use-case. Some common use-cases include support for proxies and transports.
import httpx
from athena.client import Athena
client = Athena(
http_client=httpx.Client(
proxy="http://my.test.proxy.example.com",
transport=httpx.HTTPTransport(local_address="0.0.0.0"),
),
)
Beta Status
This SDK is in Preview, and there may be breaking changes between versions without a major version update.
To ensure a reproducible environment (and minimize risk of breaking changes), we recommend pinning a specific package version.
Contributing
While we value open-source contributions to this SDK, this library is generated programmatically. Additions made directly to this library would have to be moved over to our generation code, otherwise they would be overwritten upon the next generated release. Feel free to open a PR as a proof of concept, but know that we will not be able to merge it as-is. We suggest opening an issue first to discuss with us!
On the other hand, contributions to the README are always very welcome!
Release files for athenaintel 0.1.2238
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| athenaintel-0.1.2238.tar.gz | 135.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| athenaintel-0.1.2238-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 400.7 kB
Release files / athenaintel-0.1.2238.tar.gz
| Download URL | athenaintel-0.1.2238.tar.gz |
|---|---|
| Size | 135.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
76f8120b8a8508525adeee8bece7830e61dfe3444568d5c58fc04c214a48e5c8
|
|
BLAKE2b-256 checksum How to use checksums |
ee74fd9235fff4ce69944cd6fa04d6131119072a18db412de5e30b46262d42b3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 26, 2026.
Transparency logRelease files / athenaintel-0.1.2238-py3-none-any.whl
| Download URL | athenaintel-0.1.2238-py3-none-any.whl |
|---|---|
| Size | 265.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3ed6bceeb5b249e26f62f0227240ecaf91b653bf1cee644acb76ec69ed1a6f57
|
|
BLAKE2b-256 checksum How to use checksums |
b611e0cbc9e0dd65ed052f6e1ca4c47e90142dde30aeba0b3dccf24d93378f02
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 26, 2026.
Transparency log