OmoiOS Python SDK
Python SDK for the OmoiOS Agent Workspace Platform.
Resources: sessions, environments, credentials, artifacts,
webhooks, workspaces, connections, usage — covering spec §18 §2's
canonical seven plus workspace management.
Spec §18 primitive patterns
from omoios import AsyncOmoiOSClient
async with AsyncOmoiOSClient(base_url, api_key=key, telemetry=print) as c:
# Pattern A — fire and forget
s = await c.sessions.create(workspace_id=ws, prompt="build an endpoint")
# Pattern B — sync wait on terminal event
async for evt in c.sessions.events(s.id):
if evt.type == "session.succeeded":
break
# Pattern C — live stream
async for evt in c.sessions.events(s.id):
render(evt)
# Pattern D — multiplayer
ch = c.sessions.connect(s.id, user_token=jwt)
ch.on("cursor.moved", on_cursor)
await ch.open()
Telemetry
Pass a callback to observe every HTTP lifecycle event — emitted for
every _request call plus stream_open / stream_close for SSE and
WebSocket channels. Auth headers are never included.
def on_event(e):
print(f"{e['kind']} {e.get('method','')} {e['path']} "
f"status={e.get('status')} dur={e.get('duration_ms',0):.0f}ms")
c = AsyncOmoiOSClient(base_url, api_key=key, telemetry=on_event)
Cancellation
asyncio.wait_for already works — httpx cooperates with task
cancellation natively:
import asyncio
await asyncio.wait_for(c.sessions.create(...), timeout=5.0)
For reusable cancel scopes that span multiple calls, pass an
anyio.CancelScope to any SDK method that forwards it:
import anyio
scope = anyio.CancelScope()
# pass scope down into _request via kwargs in a resource layer you own
Installation
pip install omoios-sdk
Or with uv:
uv add omoios-sdk
Quick Start
from omoios import MockOmoiOSClient
# Use mock client for development
client = MockOmoiOSClient()
# List credentials
credentials = client.list_credentials()
print(credentials)
# Create an environment
env = client.create_environment({"name": "staging", "description": "Staging environment"})
print(env)
Development
cd sdk/python
uv sync
uv run pytest
API Coverage
- Credentials (CRUD)
- Environments (versioned)
- Artifacts (upload/download)
- Webhooks (subscriptions & deliveries)
- Workspaces (settings)
License
Apache License 2.0
Metadata
Release files for omoios-sdk 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| omoios_sdk-0.2.0.tar.gz | 45.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| omoios_sdk-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 70.2 kB
Release files / omoios_sdk-0.2.0.tar.gz
| Download URL | omoios_sdk-0.2.0.tar.gz |
|---|---|
| Size | 45.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ce9028f7b24b7ed41df4ead62a7bed0cf7e785312e75cbca49b06aeefde0457d
|
|
BLAKE2b-256 checksum How to use checksums |
534a2f6d8491955a272b931b96bfc81c04c7c2dd474a97ca99c9584c28f03e69
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.1 {"installer":{"name":"uv","version":"0.11.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / omoios_sdk-0.2.0-py3-none-any.whl
| Download URL | omoios_sdk-0.2.0-py3-none-any.whl |
|---|---|
| Size | 25.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
66830f21ab0fe79d2565eb94e77ac8405abcf56c0dd50a5a6afc9dac8c5f54fe
|
|
BLAKE2b-256 checksum How to use checksums |
f6495881c6dcf46ed2b67142306a9e9db72de1ab665cf4e1f42bd4ee02c234ee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.1 {"installer":{"name":"uv","version":"0.11.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|