Skip to main content

Omium SDK for Python - Fault-tolerant agent operating system

Project description

Omium Python SDK

Python SDK and CLI for the Omium platform: tracing, checkpoints, and workflow management. Use the HTTP/remote API with api.omium.ai for the hosted platform, or the CLI for local runs and project push.

Documentation: docs.omium.ai — install, configure, CLI reference, configuration.

Installation

From PyPI (recommended)

python -m pip install --upgrade pip
python -m pip install omium

The package is published via PyPI Trusted Publisher. Verify with omium --version.

From source (development)

cd omium-platform/sdk/python
pip install -e ".[dev]"

Quick start (platform)

  1. Get an API key from app.omium.ai and configure the CLI:

    omium init --api-key omium_xxx --api-url https://api.omium.ai
    
  2. Initialize the SDK in your code (or run with omium run so the CLI injects config):

    import omium
    omium.init(api_key="omium_xxx", project="my-agent")
    
  3. Use decorators for tracing and checkpoints:

    from omium import trace, checkpoint
    
    @trace("my_step")
    def my_step(data):
        return process(data)
    
    @checkpoint("important_step")
    async def important_step(data):
        return await do_work(data)
    
  4. Run with the CLI to send traces to the platform:

    omium run your_script.py --project my-agent
    
  5. Push a project to see it on the Automations dashboard:

    omium project init --name my-agent
    omium project push
    

Checkpoint API (advanced / local)

For direct checkpoint-manager access (e.g. local gRPC), use OmiumClient and the @checkpoint decorator or Checkpoint context manager:

from omium import OmiumClient, checkpoint, Checkpoint

client = OmiumClient(checkpoint_manager_url="localhost:7001")
await client.connect()
client.set_execution_context(execution_id="exec_123", agent_id="agent_1")

@checkpoint("validate_data", preconditions=["data is not None"])
async def validate_data(data: dict) -> dict:
    return {"validated": True, "data": data}

async with Checkpoint("important_state", client=client) as cp:
    result = await do_critical_thing()
    cp.update_state(step="complete")

See the package docstrings and docs.omium.ai for full API details.

Configuration

  • API URL: Use https://api.omium.ai for the hosted platform. Override with OMIUM_API_URL or omium configure --api-url <url>. Do not add /api/v1 to the base URL.
  • API key: Set via omium init (stored in ~/.omium/config.json) or OMIUM_API_KEY.
  • Project config: Use omium.toml in your project root; see docs.omium.ai.

Requirements

  • Python >= 3.9 (3.11+ recommended)
  • grpcio >= 1.69.0, < 2.0
  • protobuf >= 5.26.1, < 6.0

Testing

pip install -e ".[dev]"
pytest tests/
pytest tests/ --cov=omium --cov-report=html

Publishing (maintainers)

Before deploying via GitHub Actions:

  1. Bump version in both places (must match or the workflow will fail):
    • pyproject.tomlversion = "X.Y.Z"
    • omium/__init__.py__version__ = "X.Y.Z"
  2. Commit and push, then run Actions → Publish Omium Python SDK → Run workflow.
  3. The workflow runs tests, builds, and publishes to PyPI (skips if version already exists).

License

Proprietary - Omium Platform

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

omium-0.4.2.tar.gz (120.0 kB view details)

Uploaded Source

Built Distribution

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

omium-0.4.2-py3-none-any.whl (130.7 kB view details)

Uploaded Python 3

File details

Details for the file omium-0.4.2.tar.gz.

File metadata

  • Download URL: omium-0.4.2.tar.gz
  • Upload date:
  • Size: 120.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for omium-0.4.2.tar.gz
Algorithm Hash digest
SHA256 214e77fefa9f479148ddbc43451d72b8533273319fcf06fce4bbc4ea7de8dbcb
MD5 3489f407a13a7760d2d70c63f92d4cb7
BLAKE2b-256 97f1d1fa5beffc6c54aa0717f9c3cf2a633fde82b3f1f6587f44cf3199ff83c7

See more details on using hashes here.

Provenance

The following attestation bundles were made for omium-0.4.2.tar.gz:

Publisher: sdk-publish.yml on Omium-ai/Omium-platform

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file omium-0.4.2-py3-none-any.whl.

File metadata

  • Download URL: omium-0.4.2-py3-none-any.whl
  • Upload date:
  • Size: 130.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for omium-0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e1a87a2f58e987909c29360483a4169940e864f305f21b64748360cbecf9d513
MD5 016cb82028bcf6009258615f36403586
BLAKE2b-256 951f609505c33adea2c81c887b11b7dcbbca7825a968066f40000809c8acc54d

See more details on using hashes here.

Provenance

The following attestation bundles were made for omium-0.4.2-py3-none-any.whl:

Publisher: sdk-publish.yml on Omium-ai/Omium-platform

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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