atlanai
Python SDK for the Atlan Agent Gateway: manage agents, skills, sessions, and workspaces, and optionally trace what your agents do.
Install
pip install atlanai
Tracing is a separate extra — it pulls in OpenTelemetry, which a management-only install doesn't need:
pip install 'atlanai[tracing]'
Quickstart
from atlanai import AtlanClient
client = AtlanClient(
"https://<your-gateway-host>",
bearer_token="<your-api-token>",
)
agent = client.agents.create({
"name": "support-triage",
"workspace_id": "workspace_01example",
})
page = client.agents.list(limit=10)
print(f"{len(page.items)} agents")
Methods read as client.<resource>.<action> — client.agents.get(agent_id),
client.sessions.messages.create(session_id, {...}), and so on. Every public
Agent Gateway operation is reachable this way; nothing requires reaching into
a generated client directly.
Pass a default workspace once instead of repeating it on every call:
client = AtlanClient(gateway_url, bearer_token=token, workspace="workspace_01example")
Tracing
import atlanai.tracing as atlan
tracer = atlan.init(api_key="<your-tracing-key>", workspace_id="workspace_01example")
with tracer.start_as_current_span("handle-request", as_type="task") as span:
span.update(model="claude-sonnet-5", usage={"input_tokens": 120, "output_tokens": 40})
Tracing has its own API key and lifecycle — it does not reuse the management client's bearer token or transport.
Errors
Every non-2xx response raises AtlanAPIError, with .status, .code, and
(where the gateway includes one) .trace_id:
from atlanai import AtlanAPIError
try:
client.agents.get("agent_does_not_exist")
except AtlanAPIError as error:
print(error.status, error.code)
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 atlanai-0.1.1.tar.gz.
File metadata
- Download URL: atlanai-0.1.1.tar.gz
- Upload date:
- Size: 548.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4333efcbb6cfe35a4ab34ccc89b4a0043efc8415ac42eaa33a711c91dea41b85
|
|
| MD5 |
eecfcfef1e0d308934e6902c30aca39c
|
|
| BLAKE2b-256 |
08efa32259ae1e5d698e49c8be30d33c373f643c2b937c25063ae2e3d43d430b
|
File details
Details for the file atlanai-0.1.1-py3-none-any.whl.
File metadata
- Download URL: atlanai-0.1.1-py3-none-any.whl
- Upload date:
- Size: 1.2 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a350189dba54631ec1463464d8cda8d09de6adcf918ed95564fad57e0dd3d72e
|
|
| MD5 |
4feb86d796791e57aaafa6e12efee3e3
|
|
| BLAKE2b-256 |
16728233865ac192b92a9171349f730de1d442880f9c77882750cebbd3a3da82
|