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.1.tar.gz (111.1 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.1-py3-none-any.whl (129.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: omium-0.4.1.tar.gz
  • Upload date:
  • Size: 111.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for omium-0.4.1.tar.gz
Algorithm Hash digest
SHA256 51573da7bbe1c93fad86cf073a6a07fda353aea979444b427ee4288d9d6ab7ac
MD5 bab21f63c3b8e1bba3d90d983e83c462
BLAKE2b-256 f8d557722b0a485fd6ab1f88016f451b6f6d314d5c7728028f93e026e4debf56

See more details on using hashes here.

File details

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

File metadata

  • Download URL: omium-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 129.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for omium-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3937fd390ba2b91a562b63f592c9c75e0aa911ad3534074704a6e3daa0182305
MD5 c7ebe8ac79fbf358027f6eee3f37a1ef
BLAKE2b-256 6a1f1ec78a3a7b7d62841d02acbdadee076b15f4fe1bfa41ab39b0b8835e7d4d

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