Skip to main content

coalex

Python SDK for Coalex — AI governance observability for enterprises in regulated markets.

Built on OpenTelemetry.

Install

pip install coalex
# or
uv add coalex

Quick start

import coalex

coalex.register(api_key=os.environ["COALEX_API_KEY"], service_name="my-agent")
coalex.auto_instrument()

with coalex.coalex_context(agent_id="support-agent"):
    answer = my_agent.run(question)

decision = coalex.evaluate(
    request_id=request_id,
    input={"question": question},
    output={"answer": answer},
    metrics={"answer": ["faithfulness"]},
)

Diagnostics

The SDK logs under the coalex logger and never configures logging for you — a library that calls basicConfig takes over your application's log configuration, which is not its to take. It attaches a NullHandler and leaves the rest to you.

To see what it is doing:

import logging

logging.basicConfig(level=logging.INFO)          # your application's own setup
logging.getLogger("coalex").setLevel(logging.DEBUG)
Logger What you see
coalex.context which agent id a span was attributed to, and where it came from
coalex.auto_instrument which frameworks were instrumented, and which were found but could not be
coalex.safe_exporter span export failures — the first few, then a heartbeat, so a key that breaks mid-run still surfaces
coalex.inventory whether the agent's self-declaration was accepted, and the server's reason if not

Without raising the level you still get warnings and errors — but only through Python's lastResort handler if your application configures none of its own, which prints with no timestamp, level or logger name and cannot be filtered.

No API key, proxy token or upstream credential reaches a log line or an exception message. Raising the level does not change that: it is a property of what is written, not of what is filtered.

Telemetry never breaks your agent

A failing Coalex endpoint drops spans; it does not raise into your code. evaluate() and resolve() do raise, because a governance decision you asked for and did not get is not something to swallow.

TypeScript

There is a TypeScript SDK, and it is smaller. See Python vs TypeScript before choosing.

Documentation

https://docs.coalex.ai

Download files

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

Source Distribution

coalex-1.27.1.tar.gz (90.0 kB view details)

Uploaded Source

Built Distribution

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

coalex-1.27.1-py3-none-any.whl (62.4 kB view details)

Uploaded Python 3

File details

Details for the file coalex-1.27.1.tar.gz.

File metadata

  • Download URL: coalex-1.27.1.tar.gz
  • Upload date:
  • Size: 90.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for coalex-1.27.1.tar.gz
Algorithm Hash digest
SHA256 1677dbb32f953cdc47da5745f6e46927218fbe858063ebe1e96a14a75ef5a0a8
MD5 9267f96f724a871a83b5ffde3cbc5ca2
BLAKE2b-256 c05f98a8c120a037076ad3ba1d8b7a52f71f7f2eed533c3e48c693ae42e63daa

See more details on using hashes here.

File details

Details for the file coalex-1.27.1-py3-none-any.whl.

File metadata

  • Download URL: coalex-1.27.1-py3-none-any.whl
  • Upload date:
  • Size: 62.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for coalex-1.27.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cf9d69b704f20fe94ff48814525042efcf767e118ce82c88a5b500c105419372
MD5 b8443474977f8e5c6105d86eae403624
BLAKE2b-256 c9845bb48445fd9b89f82c4133dbada02bb3ad3327e4bee2648a4a866e1e0cd3

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.27.1 This release

2 files

1.14.0

2 files

1.13.0

2 files

1.9.5

2 files

1.9.4

2 files

1.9.3

2 files

1.9.2

2 files

1.9.1

2 files

1.9.0

2 files

1.8.0

2 files

1.5.0

2 files

1.2.0

2 files

0.6.2

2 files

0.6.1

2 files

0.6.0

2 files

0.5.0

2 files

0.4.5

2 files

0.4.4

2 files

0.4.3

2 files

0.4.2

2 files

0.4.1

2 files

0.4.0

2 files

0.3.0

2 files

0.2.0

2 files

0.1.0

2 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