Skip to main content

OmoiOS SDK for agent workspace platform

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

omoios_sdk-0.2.0.tar.gz (45.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

omoios_sdk-0.2.0-py3-none-any.whl (25.1 kB view details)

Uploaded Python 3

File details

Details for the file omoios_sdk-0.2.0.tar.gz.

File metadata

  • Download URL: omoios_sdk-0.2.0.tar.gz
  • Upload date:
  • Size: 45.1 kB
  • Tags: Source
  • Uploaded using 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}

File hashes

Hashes for omoios_sdk-0.2.0.tar.gz
Algorithm Hash digest
SHA256 ce9028f7b24b7ed41df4ead62a7bed0cf7e785312e75cbca49b06aeefde0457d
MD5 a883055af1032306b43075818d6afe37
BLAKE2b-256 534a2f6d8491955a272b931b96bfc81c04c7c2dd474a97ca99c9584c28f03e69

See more details on using hashes here.

File details

Details for the file omoios_sdk-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: omoios_sdk-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 25.1 kB
  • Tags: Python 3
  • Uploaded using 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}

File hashes

Hashes for omoios_sdk-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 66830f21ab0fe79d2565eb94e77ac8405abcf56c0dd50a5a6afc9dac8c5f54fe
MD5 ec0a686cfb9326fb09ae3075381093dc
BLAKE2b-256 f6495881c6dcf46ed2b67142306a9e9db72de1ab665cf4e1f42bd4ee02c234ee

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page