Skip to main content

omega-api · Python client

A thin, typed Python client for the Omega-API geometric judge. It sends one turn to the judge over HTTP, reads the gate, and returns a decision your app can act on.

This is not a wrapper. It is a comfort layer over one HTTP call. Every future SDK is a thin client over the same judge.

Zero dependencies (standard library only). Python 3.9+. Apache-2.0.

What it does

Omega-API measures whether the process in an agent conversation is moving — turn by turn — and returns a decision. There is no client-side session state to manage: the judge keeps it server-side, per session_id. The interface is open; the judging method is proprietary.

Before you start: register → key → judge → meter

  1. Register and create a project at your Omega-API account page.
  2. Get an API key (oapi_live_…).
  3. Judge: one call per turn.
  4. Meter: your first 100 judgments are free; after that, billing applies.

There is no anonymous access. Set your key in the environment:

export OMEGA_API_KEY=oapi_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Install

pip install omega-api

Quick start

from omega_api import Omega

omega = Omega()  # reads OMEGA_API_KEY

decision = omega.judge(
    input="customer message",
    output="agent reply",
)

if decision.release:
    show(reply)            # PROCEED or Shadow mode
elif decision.is_clarify:
    regenerate_then_call_again()
elif decision.is_suppress:
    stop_or_escalate()

turn_id is omitted by default, so the judge assigns a unique one and returns it (decision.turn_id). When session_id is omitted, the client mints a fresh one for the call.

Act on the gate

Read the gate and act before you display the agent's response:

gate action what your app does
release show the original response
clarify do not release yet — ask the agent to realign / regenerate, then call again
suppress do not release — stop / escalate / fall back per your policy
none Shadow mode — observe only, show the original

In Shadow mode the gate always returns none. Operator mode is opt-in per key. The helpers decision.release, decision.is_clarify, and decision.is_suppress read the gate directly.

Real multi-turn conversations

Keep one session_id per conversation:

session = omega.session("support-ticket-123")

d1 = session.judge(input="hi", output="hello")
d2 = session.judge(input="my order never arrived", output="let me check that for you")

Fail-open is a policy, not a default

judge() raises on every error — auth, bad request, 409 TURN_CONFLICT, rate limit, server, transport. If you want to release the original when the judge is unreachable, opt in explicitly:

decision = omega.judge_or_release(input=msg, output=reply)
# on a transport/server failure: decision.release is True, decision.judged is False

Only transport and server errors are treated as fail-open. Auth, request-shape, conflict, and rate-limit still raise.

What Omega-API does not claim

It measures whether the process moved. It does not promise the agent achieved the user's goal — the two are independent. Act and bill on the movement; read the outcome separately.

Errors

OmegaConfigError · OmegaAuthError · OmegaRequestError · OmegaConflict · OmegaRateLimited · OmegaServerError · OmegaTransportError — all subclasses of OmegaError.

On the roadmap

observed_event() — anchoring a real business outcome to a session — is planned for a future release. It requires a key with the events capability. Most first integrations never send events; that is a legitimate state, not an error.

Links

License

Apache-2.0.

Release files for omega-api 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for omega-api 0.1.0
File Size Uploaded
omega_api-0.1.0.tar.gz 12.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for omega-api 0.1.0
File Interpreter ABI Platform
omega_api-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 26.1 kB

Release files / omega_api-0.1.0.tar.gz

Download URL omega_api-0.1.0.tar.gz
Size 12.9 kB
Tags Source
SHA-256 checksum
How to use checksums
012fed32482a0549565fc1aae9fd01ea77d763e598d6eeb2a92301efedc8128c
BLAKE2b-256 checksum
How to use checksums
1270f7efd2411a763a94625ea29b751e2fbaffd5c66ab98ffac4d7b7a87fb895
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.3

Release files / omega_api-0.1.0-py3-none-any.whl

Download URL omega_api-0.1.0-py3-none-any.whl
Size 13.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
707411330306597f5187f3beb647fca5f1989fd39b7bbe92b80a6a7a51573b29
BLAKE2b-256 checksum
How to use checksums
634f2cc9a76250377ae9b54e7e95a1ed98e81e1c5fb12e0902bbba629a4810b5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.3

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page