Official Python SDK for the Orloj multi-agent orchestration platform
Project description
orloj — Official Python SDK
Typed Python client for the Orloj v1 REST API: synchronous and asynchronous usage (httpx), Pydantic v2 models, SSE watch streams, and cursor-based pagination.
Requirements
- Python 3.10+
Install
From PyPI:
pip install orloj-sdk
Install with pip install orloj-sdk, then import the orloj_sdk package (from orloj_sdk import OrlojClient).
From a git checkout:
pip install -e ".[dev]"
Configuration
The client reads defaults from the environment (same order as orlojctl):
| Setting | Constructor | Environment (first wins) |
|---|---|---|
| API token | api_token= |
ORLOJCTL_API_TOKEN, ORLOJ_API_TOKEN |
| Base URL | base_url= |
ORLOJCTL_SERVER, ORLOJ_SERVER |
If unset, the base URL defaults to http://127.0.0.1:8080 and the namespace defaults to default.
Quickstart
from orloj_sdk import OrlojClient
client = OrlojClient(api_token="your-token")
who = client.auth.whoami()
print(who.authenticated, who.username)
for agent in client.agents.list_all():
print(agent.metadata.name)
Async
from orloj_sdk import AsyncOrlojClient
async with AsyncOrlojClient(api_token="your-token") as client:
page = await client.agents.list(limit=20)
Examples
Runnable scripts (require a running Orloj API):
| Script | Description |
|---|---|
examples/quickstart.py |
whoami and list agents |
examples/watch_tasks.py |
SSE watch on a task until completion |
examples/multi_agent_system.py |
Create an AgentSystem with a graph |
examples/async_example.py |
AsyncOrlojClient with asyncio.gather |
export ORLOJ_API_TOKEN=...
python examples/quickstart.py
Development
See CONTRIBUTING.md for setup, checks, and pull request expectations.
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -e ".[dev]"
ruff check src/orloj_sdk tests examples
ruff format src/orloj_sdk tests examples
mypy src/orloj_sdk
pytest --cov=orloj_sdk
License
Apache-2.0
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 orloj_sdk-0.1.0.tar.gz.
File metadata
- Download URL: orloj_sdk-0.1.0.tar.gz
- Upload date:
- Size: 26.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5d100b9af801f125bc1b20081c8e1092210de7ed6a396cba4f43e61b285908f8
|
|
| MD5 |
3e2af0c888772bb2c0dde61ff641bf26
|
|
| BLAKE2b-256 |
36ac7ce1328395206fcd381842aaca0685d34fed49ba7333616527f8233fdf56
|
File details
Details for the file orloj_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: orloj_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 37.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ab6330106d17e34a074c40805f0532146780e917dc3dffc8942cc31dcba18aaf
|
|
| MD5 |
4cd44841cba621f97ebc0f47e56b635b
|
|
| BLAKE2b-256 |
ba14fbe9447e4b2e93f5f57738bcb205af09b245dd76ab4346a48b06d27e9d26
|