Python SDK
Drive Ellipsis agent sessions from Python. Every /v1 operation, sync and async, generated from the same OpenAPI spec the API is published from.
The Python SDK is a typed client for the Ellipsis API. Install it as ellipsis-dev, import it as ellipsis. Every /v1 operation is generated from the platform's committed OpenAPI spec, so the method list and the API reference can never disagree.
import os
from ellipsis import Ellipsis
client = Ellipsis(api_key=os.environ["ELLIPSIS_API_TOKEN"])
handle = client.sessions.run(prompt="Fix the flaky test in ci/")
session = handle.wait()
print(session.status)What the SDK adds over raw HTTP
Four things, beyond typed methods and models:
- A session handle.
sessions.run()starts a session and returns an object that polls, messages, and stops it. See Sessions. - Transparent pagination. Iterating a list method walks every page. See Pagination.
- Typed errors by status.
NotFoundError,RateLimitError, and siblings, each carrying the API'scodeandrequest_id. See Errors. - Live session streaming over the WebSocket protocol, with reconnect and resume. See Streaming.
Sync and async
Ellipsis is synchronous. AsyncEllipsis exposes the identical method surface with await, and doubles as an async context manager:
import os
from ellipsis import AsyncEllipsis
async with AsyncEllipsis(api_key=os.environ["ELLIPSIS_API_TOKEN"]) as client:
identity = await client.me()
print(identity.customer_id)Only the async client can stream: live frames arrive over a WebSocket, which has no synchronous form. Everything else is available on both.
Where to look for a specific call
This section covers the client's shape: installing it, the session lifecycle, streaming, pagination, errors, and types. For the per-operation detail (every route, its parameters, and its response) read the API reference, which shows each operation's Python call beside the request it sends.