Skip to main content

lodestar-runtime-client

The shared pure-stdlib Python RPC client for the Lodestar runtime hooks — the open epistemic-governance framework for AI agents.

GateClient spawns the TypeScript governance-gate sidecar (lodestar runtime gate) as a child process and speaks newline-delimited JSON-RPC to it over stdin/stdout — the same framing MCP uses, with zero runtime dependencies. Each native tool call is remoted through the Lodestar Action Kernel: two-phase propose → arbitrate → execute, the signed policy gate, cognitive-core ingestion, sentinel arbitration, and the signed-approval L4 hold path (ADR-0024). The channel is bidirectional — the gate calls back to run a tool body, so the body runs only inside the gate's execute phase, never before approval.

This is the framework-agnostic spine the per-framework hooks build on. You usually don't depend on it directly — install the hook for your framework instead:

It was extracted from those three hooks in #128 (ADR-0028); before that it was a verbatim copy vendored inside each.

Install

pip install lodestar-runtime-client
# and the Lodestar CLI (Bun/npm), which provides `lodestar runtime gate`:
npm install -g @qmilab/lodestar-cli   # or: bun add -g @qmilab/lodestar-cli

Use (low-level)

from lodestar_runtime_client import GateClient

with GateClient("runtime-gate.config.json") as gate:
    gate.register_tool("search_web", lambda args: {"output": do_search(args["q"])})
    result = gate.govern("search_web", {"q": "lodestar"})
    # result is the govern_result: completed | pending_approval | rejected | failed

For a real framework, reach for the matching hook above — it registers and wraps the framework's toolset for you (govern_tools) and surfaces holds idiomatically.

Scope (honest, ADR-0004 lineage)

This is governance over declared actions, not OS containment of the process. A call for an unregistered tool is denied (fail closed). Pair with network/filesystem controls for defense in depth.

Apache-2.0. Part of the Lodestar monorepo (runtimes/runtime-client/).

Metadata

Release files for lodestar-runtime-client 0.6.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 lodestar-runtime-client 0.6.0
File Size Uploaded
lodestar_runtime_client-0.6.0.tar.gz 6.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lodestar-runtime-client 0.6.0
File Interpreter ABI Platform
lodestar_runtime_client-0.6.0-py3-none-any.whl Python 3 none any Details

Total release size: 13.9 kB

Release files / lodestar_runtime_client-0.6.0.tar.gz

Download URL lodestar_runtime_client-0.6.0.tar.gz
Size 6.5 kB
Tags Source
SHA-256 checksum
How to use checksums
dd19026acc325fa4ae014581c8ccdf3432986a6a83b52a37fd072267667b2132
BLAKE2b-256 checksum
How to use checksums
dce506c244e0a16740565ec67aee366e5c0804f40fbfe592d73eb822df3f16a0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.

Transparency log

Release files / lodestar_runtime_client-0.6.0-py3-none-any.whl

Download URL lodestar_runtime_client-0.6.0-py3-none-any.whl
Size 7.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7264a5f6ace88c7e7b2c92d3f626986b58cbf9486d65fff975832d486361248d
BLAKE2b-256 checksum
How to use checksums
39c03ea8c23b6839cf50ca13c7110825fabc67e4fa23547547e38431ceb1786e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.6.0 This release

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

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