Python SDK for Continua agent observability and debugging
Project description
Continua SDK for Python
Python SDK for sending AI agent traces, spans, sessions, events, and engine control requests to Continua.
Installation
pip install continua-sdk
Quick Start
Initialize the client once at process startup:
from continua import Continua, span, trace
Continua.init(
api_key="your-api-key",
endpoint="https://api.your-continua-host.com",
ingest_mode="server_default", # or "sync", "async_v2"
)
@trace(name="answer_question")
def answer_question(question: str) -> str:
with span("retrieve_context", kind="tool") as s:
s.set_input({"question": question})
context = "retrieved context"
s.set_output({"context": context})
with span("call_model", kind="llm") as s:
s.set_input({"question": question, "context": context})
answer = "model answer"
s.set_output({"answer": answer})
return answer
For a local or self-hosted Continua server, point the SDK at your server URL:
from continua import Continua
Continua.init(
api_key="dev-api-key",
endpoint="http://localhost:8080",
)
This package is the client library only. It sends data to a hosted or self-hosted Continua server; it does not install or run the Go server, Postgres, River workers, or debugger UI.
Async Ingest Modes
server_default: defer to the server rollout setting.sync: sendsync=trueand wait for inline processing.async_v2: opt into true async ingest withX-Continua-Async-Version: 2.
True async is not read-after-write. If your code needs the batch to be fully processed before it reads the ingested data back, use ingest_mode="sync" or poll with wait_for_batch():
result = client.wait_for_batch(batch_id, timeout=30, poll_interval=0.5)
Development
# From sdks/python
uv sync
uv run pytest
uv run mypy src/
uv build
Publishing
The Python package is published from this directory:
cd sdks/python
uv build
uv publish
Prefer PyPI Trusted Publishing in CI for repeatable releases once the project is ready for public distribution.
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 continua_sdk-0.1.0.tar.gz.
File metadata
- Download URL: continua_sdk-0.1.0.tar.gz
- Upload date:
- Size: 115.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
50318f70d4d61842f10feaa9f28feb32c2515665da0bf30814d0b899f6ab549c
|
|
| MD5 |
5b1a9fd3786bc9e672ff48b32f7a2b85
|
|
| BLAKE2b-256 |
6d245b470987ba07299c35ff290342e2f32a11f92604962e77f0a184aff72bd6
|
File details
Details for the file continua_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: continua_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 32.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b4e6aafcc63a14af57d73974bec21872b1a3ac528d29d4d30e6de297f7fc28bd
|
|
| MD5 |
57a42400ac101da20ab3c1a099cfe2e7
|
|
| BLAKE2b-256 |
651358874549be698d91d532902dd3431e6c2210837fb141ba8cc5b1ca816ace
|