Skip to main content

chronos-gateway

The Python client for Chronos Gateway: AI agents change your Postgres only through checked, approved merges. Each agent task is a run for one tenant, working in its own copy of your data; its merge lands when your rules allow it, or waits for a person to approve it. Standard library only, Python 3.9+.

pip install chronos-gateway
from chronos_gateway import Gateway

gw = Gateway("https://gateway.example.com", key=os.environ["CHRONOS_GATEWAY_KEY"])
with gw.run(tenant=user.org_id, intent="clean up duplicate leads", end_user=user.id) as run:
    agent.tools = run.openai_tools()          # or run.mcp_server() for MCP clients
    agent.invoke(task)
    result = run.propose()
if result.held:
    link = gw.approval(run.id, end_user=user.id)   # show link.html (the <chronos-approve> widget) to the user
  • AsyncGateway runs the same calls for asyncio code.
  • A person approves a part (gw.approve(run.id, only_keys=["leads/7"])), or a link only one person, signed in, can use (gw.approval(run.id, approver="bo@acme.com")).
  • The rules, keys and masks: policy / set_policy, keys / create_key / revoke_key, masks / set_masks; events(last=20) for what happened lately.
  • chronos_gateway.adapters: the run's tools for LangChain and LangGraph, the Claude Agent SDK and the OpenAI Agents SDK (each needs its framework installed).
  • A pytest fixture, chronos_run: a run discarded after the test (set CHRONOS_GATEWAY_URL, CHRONOS_GATEWAY_KEY and CHRONOS_GATEWAY_TENANT).
  • verify_signature checks a webhook delivery's Chronos-Signature.

The gateway itself is chronos-gateway, which you run beside your Postgres (or link to Chronos Cloud).

Metadata

Release files for chronos-gateway 0.2.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 chronos-gateway 0.2.0
File Size Uploaded Provenance Actions
chronos_gateway-0.2.0.tar.gz 10.7 kB Without provenance Details for chronos_gateway-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for chronos-gateway 0.2.0
File Interpreter ABI Platform Actions
chronos_gateway-0.2.0-py3-none-any.whl Python 3 none any Details for chronos_gateway-0.2.0-py3-none-any.whl

Total release size: 20.1 kB

Release files / chronos_gateway-0.2.0.tar.gz

Download URL chronos_gateway-0.2.0.tar.gz
Size 10.7 kB
Tags Source
SHA-256 checksum
How to use checksums
9d0d08c7cb052ffecda6be9eec8a0168510549bba31349808601ff9b19794c99
BLAKE2b-256 checksum
How to use checksums
672a98312971b8fc8ff725a85d50fce513d13c48b2731737f6275f66c13c407c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","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}

Release files / chronos_gateway-0.2.0-py3-none-any.whl

Download URL chronos_gateway-0.2.0-py3-none-any.whl
Size 9.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6b911f144d64df6b306ecb1f9074b91fab976d86135504f46e6736dc7751f837
BLAKE2b-256 checksum
How to use checksums
2aeebbb322e521c6a011de0389c89e2393cd65b13d03ac4b2842c9910016a1f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","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}

Security for chronos-gateway 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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