docs · project
Status and roadmap#
Hekma is becoming the control plane for agent workloads: one way to run, see and steer any agent, from a laptop to a fleet, without ever being the reason prod stops. Hekma 0.11.0, released on 17 October 2026, is the first part of that: it supervises, meters and budgets AI agents on macOS, Linux and Windows, from the CLI or from your own Rust program. Its main limit is that supervision lasts only as long as a process holds the engine open. On the main branch, a long-running host removes that limit and the CLI routes every change through it, so agents outlive your terminal; that ships in the next release. This page lists what ships, what is on main, the roadmap for the rest of the control plane, which platforms are supported, and how versions and deprecations work.
What ships in 0.11.0#
| Area | What you get |
|---|---|
| Agents | Run any ACP agent with --kind acp (verified with OpenCode and Hermes Agent's hermes-acp), or any program through an adapter.toml manifest. The hermes kind still works but is deprecated. |
| Lifecycle | Register, start, stop, pause, resume and remove agents. Each agent gets its own process group (Unix) or Job Object (Windows) and its own Agent Home. |
| Supervision | Crash detection with an automatic restart policy, --detach to keep agents running between commands, adoption by the next command, and a Supervision column in list and show. See Supervision and detached runs. |
| Metering | Self-reported usage lines, or an engine-observed proxy that reads OpenAI-style and Anthropic usage from the wire, over HTTP or HTTPS, streaming included. Cached tokens are tracked everywhere. See Meter token usage. |
| Budgets | Token and dollar budgets, per run or cumulative, with pause, stop or warn, checked in the same step that records usage. See Budgets and cost. |
| Config | Validated config keys with source layers, agent.* pass-through, secret:NAME references masked everywhere, and memory backings. |
| Scripting | Versioned JSON output, stable exit codes, and logs --follow that streams a detached agent's new output. |
| Embedding | hekma-engine 0.7.0 on crates.io: the full API, an event stream, catch-up after a crash, and a diagnostic sink. See Embed the engine. |
| Adapters | A frozen adapter contract at 1.0.0 and a conformance kit to test any adapter against it. |
Two limits matter most in 0.11.0, and both come from supervision being tied to a running process:
- Between commands, a detached agent has no crash handling, no budget enforcement and no metering. Keep
hekma agent logs NAME --followrunning, or embed the engine. - From the CLI alone,
hekma agent sendand ACP prompt turns have no usable target, and engine-observed agents cannot be detached. These work from a program that embeds the engine.
On Hekma's main branch (Unreleased: after 0.11.0), the CLI runs every agent under a local Service Host, which lifts the first limit while the host runs and gives send a target; engine-observed agents still cannot be detached.
On main, unreleased#
These are merged on Hekma's main branch and ship in the next release. Everything in this list is Unreleased: after 0.11.0.
| Feature | What it does |
|---|---|
| Runs | Every supervised start is a Run with a run id, a Control Depth, a Run Status and Anomalies (failed and breach; Policies and Run Keys add three more). A crash relaunch continues the same Run, so per-run budgets keep counting across a crash. hekma run show prints one. See Runs. |
| Child Runs | hekma run open --parent NAME, close and show, and /v0/runs on the Control API: a Host opens a Run for one unit of its own work, counted on every ancestor and held to every ancestor's ceilings. See Child Runs. |
| Labels | labels.<key> config binds labels on an agent's Runs, and hekma label set / remove bind and unbind them on a Run, an agent's open Run or every Run a --selector matches, with confirmation, --dry-run and --json. See Bound labels. |
hekma ps | The Runs that need you, newest first: a Run is listed when it carries an Anomaly or a held, silent or stale status, healthy Runs are counted, and --all, --selector, --limit and --cursor filter and page. A read-only read that starts no host. GET /v0/runs serves the same document. See Runs and hekma ps. |
| Selectors on the lifecycle verbs | hekma agent stop, pause, resume and drain and hekma run close take an agent, a run id or --selector, with --dry-run, --yes and one shared --json results document. See Verbs at scale. |
hekma budget | hekma budget show reads a Run's limits with their sources; hekma budget set writes limits on the Run itself, which outrank the agent's configuration and every Policy and end with the Run. A raised ceiling re-arms and lifts the block fence on a live Run from every path. See Limits on a Run. |
Policies and the warn default | hekma policy and /v0/policies set standing limits for every Run a Selector matches by bound label, resolved one limit at a time, with an editable default Policy. A breach signals loudly by default instead of pausing, and agents that relied on pause keep it. See Policies and the warn default. |
| Run Keys | Each Run's own credential: every supervised launch gets a fresh key in HEKMA_RUN_KEY, shown once, stored as a SHA-256 hash, revoked when its process exits, when its Run ends, after a refresh, on URL exposure or with hekma run revoke-keys. A Run Key acts as its Run's Caller (open and close children, tighten limits, nothing else); POST /v0/runs/refresh rotates a pair, and reusing a refresh credential raises the credential-reuse Anomaly. Key custody — the key in the agent's API-key slot — is still planned. See Run Keys and key custody. |
| The CLI routes through a Service Host | Every hekma agent write is one call to the Service Host that owns the state directory, started in the background on the first write. Agents keep running, supervised and within budget, after the command and its terminal exit; reads never start a host or write. See How the CLI reaches the Service Host. |
hekma serve and hekma-host | A long-running host that adopts every agent in a state directory and supervises it until told to stop, with a lock against a second host, a graceful drain on SIGTERM and a loopback local endpoint. A non-loopback --listen needs --tls-cert and --tls-key. See Run Hekma as a service. |
| Control API v0 | A local HTTP and JSON API on hekma serve, bearer-token protected, with lifecycle, send, drain, config, memory, the restart policy, fleet reads, Runs, Run listings, Selector sets, Run limits, Policies, labels and live events, which resume from Last-Event-ID and filter by Selector. See Control API. |
| Outbox export | One durable, acknowledged journal of every event across all agents, read through the Control API. See Export. |
| Telemetry export | Opt-in OTLP/HTTP+JSON metrics from hekma serve --otlp-endpoint: token usage, budget breaches, derived cost and lifecycle state. Nothing leaves the machine without an endpoint. See Telemetry export. |
| The wire fence | budget.breach_action = block, never a default, on agents whose usage is read off the wire. On a breach, the agent's metering listener refuses further model calls with HTTP 402 and a typed, non-retryable error while the agent keeps running, and the fence lifts when the Run ends or the ceiling is raised above the totals. It is cooperative: an agent that calls its provider directly is not fenced. See The wire fence. |
| Adapter declarations | Adapter contract 1.1.0 adds optional readiness probes, liveness checks, exit-code classes, a pause and resume command pair and a drain section, with hekma agent drain to use it. A crash after 30 seconds of stable running resets the restart count. |
| Governance vectors | A checksummed JSON file (1.4.0, 69 cases) of worked budget and cost decisions, so a Host that enforces money itself can prove it matches the engine; hekma agent governance-vectors prints it. See Governance vectors. |
| Adapter gallery and CI recipe | One page per agent that runs under Hekma today, and a budget-capped agent in GitHub Actions. See Adapter gallery and Agents in GitHub Actions. |
| Log capture modes | --log-capture full, metadata (hashes instead of content at rest) or off for every agent a host supervises. |
| Static Linux build | An x86_64-unknown-linux-musl archive with hekma, hkm and hekma-host, and a container recipe that runs it FROM scratch. |
| Follow backlog | hekma agent logs NAME --follow starts with the last 200 raw lines a detached agent wrote while no command was running, instead of only new ones. Change the number with HEKMA_LOGS_BACKLOG_LINES. |
| One store writer | Every state.db write runs on one writer, and a usage event, its budget check and the breaches it fires commit together. Transitions, breaches and the export outbox move into state.db. The upgrade is one way; see Release notes. |
| Wider tables | show, usage NAME and config get no longer cut headers short, and their value columns grow with the terminal. |
| Fixes | Paused agents are stopped gracefully, concurrent config set commands no longer lose keys, a benign command no longer stops an agent a live host supervises, and a state change whose log line cannot be written is put back. |
The engine on main is hekma-engine 0.12.0, after several releases' worth of changes to its public types (the Run model, the block breach action, new transition causes and errors); Release notes lists what code matching or building those types needs to handle.
Roadmap#
The rest of the control plane is designed and being built in the open. Every item below is not in 0.11.0 or on main yet (the parts already on main are listed above), and its names, commands and defaults may change before it ships. Each docs page about it carries an in development or planned tag.
- In development: being built now, in roughly this order.
- Planned: designed, and next once the work it depends on lands.
- Later: agreed direction, not yet designed in detail.
In development#
| Feature | What it gives you | Docs |
|---|---|---|
| Hold, release, reroute and reject on a set | The wire verbs on a Selector's Runs, once Hekma can hold or reject one Run's calls. A child Run's lifecycle verbs are refused until then. hekma ps, Selectors on the lifecycle verbs and hekma budget are already on main (above). | Runs, Control Depth, ps and top |
Planned#
| Feature | What it gives you | Docs |
|---|---|---|
| Key custody | The Run Key in the agent's API-key slot, so the real provider key never leaves Hekma. Scent-Check Modes and bypass detection build on it. Run Keys themselves are already on main (above). | Run Keys and key custody |
| One shared Metering Proxy | One proxy per host for every Run, with endpoint bindings, in place of today’s per-agent proxy. | Attach and wire control |
| Attach | Framework flows and plain clients become Runs through the proxy, a self-announce header or inbound OpenTelemetry, with Leases instead of process ownership. | Attach and wire control |
| Wire hold, reroute and reject | Hold a Run’s next model call with its state intact, then release, reroute or reject it. | Attach and wire control |
hekma top | A live terminal view of Runs with hotkeys. | Runs, Control Depth, ps and top |
| Never the reason prod stops | Agents survive host restarts, upgrades and crashes, through one small shim per supervised process, and every surface holds at a million Runs. | Status and roadmap |
Later#
- Nodes and a hub: one view and control across many machines.
- Policy as data: versioned, audited Policies with shadow mode and canary rollout.
- Customer safety at the wire: checking each Run’s customer and application binding on every tool call and outbound message.
- Proof and compliance: a tamper-evident Run ledger and approval gates on high-impact tools.
Platform support#
| Platform | Prebuilt binary | Pause | Notes |
|---|---|---|---|
macOS, Apple Silicon (aarch64-apple-darwin) | yes | guaranteed (SIGSTOP) | |
macOS, Intel (x86_64-apple-darwin) | yes | guaranteed (SIGSTOP) | |
Linux x86_64, glibc (x86_64-unknown-linux-gnu) | yes | guaranteed (SIGSTOP) | |
| Linux x86_64, static musl | from the next release | guaranteed | Unreleased: after 0.11.0. Includes hekma-host. |
Windows x86_64 (x86_64-pc-windows-msvc) | yes | best effort | Graceful stop waits for the agent to exit by itself; a forced stop of an adopted agent reaches only the agent, not its children. |
| Linux on ARM, other targets | no | guaranteed on Unix | Build with cargo install hekma. |
macOS, Linux and Windows are each built and tested on every change. Building from source needs Rust 1.96.1 or newer. Which capabilities an agent has also depends on its adapter's capability declaration; Architecture explains the per-OS details.
Versions and deprecations#
Hekma follows semantic versioning. These are compatibility surfaces, covered by the policy below:
- the CLI's commands, flags and behaviour;
- the JSON documents and their
schema_versions; - the exit codes;
- the adapter contract, currently 1.0.0 (1.1.0 on main, additive: Unreleased: after 0.11.0).
The policy: additions can come in any release. A change that removes or alters something is announced in the release notes and these docs at least one minor release before it takes effect, and the removal itself happens only in a major release. Tests check each documented JSON field and exit code, and every change is compared with the previous release's public Rust API, so an unannounced break fails the build.
The live example is the hermes kind. It was deprecated in 0.11.0 in favour of --kind acp with Hermes Agent's hermes-acp. It keeps working unchanged, hekma agent register --kind hermes still works, and it will not be removed before a major release. Supported agents explains how to move.
Hekma is 0.x#
Hekma has not reached 1.0. Within 0.x, a minor release of a library crate can include breaking changes, and hekma-engine uses that: 0.7.0 added variants to exhaustive error enums, which is why embedders pin "0.7" and read the upgrade notes. The CLI, JSON, exit codes and adapter contract follow the stricter policy above even before 1.0.
Licence and contributions#
Hekma is open source under the Apache License 2.0, free for commercial use, with an explicit patent grant. Contributions are made under a Contributor License Agreement that assigns copyright in the contribution to the project owner and licenses it back to you; opening a pull request means you accept it. See Contributing.
Read next#
- Release notes: what changed in each release.
- Supervision and detached runs: working within the 0.11.0 limits.
- Run Hekma as a service: the host that is coming next.
- Runs, Control Depth, ps and top: the first part of the control plane being built.