Cohesix is an open-source high-assurance control-plane operating system built on the formally verified seL4 microkernel, designed to keep the trusted computing base intentionally small while enabling deterministic orchestration of edge GPU systems and auditable MLOps. Cohesix is "infrastructure for AGI".
This document is the adoption guide for Cohesix APIs introduced in Milestone 24c. It explains what the APIs are, how they map to use cases, and how developers can validate connectivity to the APIs in real environments.
At a glance
docs/HOST_API.md and is served at /v1/openapi.yaml.docs/HOST_TOOLS.md.Related operator docs
docs/HOST_TOOLS.md — host tool semantics, policy gates, and mounts.docs/OPERATOR_WALKTHROUGH.md — operator lifecycle and recovery flow.LS, CAT, and ECHO./v1/meta/bounds.COH_AUTH_TOKEN and the role in COH_ROLE (typically queen)./actions/queue when required.| Surface | Endpoint or Path | Semantics |
| — | — | — |
| REST | /v1/fs/ls | LS projection |
| REST | /v1/fs/cat | CAT projection |
| REST | /v1/fs/echo | ECHO projection |
| REST | /v1/meta/bounds | Manifest-derived bounds |
| REST | /v1/openapi.yaml | OpenAPI 3.1 spec |
| REST | /docs | Swagger UI |
Authoritative control files (JSONL, append-only)
/queen/lease/ctl/queen/schedule/ctl/queen/export/ctl/policy/ctlRead-only observability nodes
/proc/schedule/summary/proc/schedule/queue/proc/lease/summary/proc/lease/active/proc/lease/preemptionsSchemas and bounds are defined in docs/INTERFACES.md.
Policy gating is manifest-enabled. When active, /policy and /actions appear and gated paths require approvals.
/policy/rules lists gate targets derived from the manifest./actions/queue is the approval/denial log (id, target, decision)./queen/ctl (or other gated paths), the request returns
ERR ECHO reason=policy ... EPERM until a matching approval exists./policy/preflight/* and /proc/pressure/policy
provide observability into queued/consumed approvals and pressure.docs/USE_CASES.md)| Use case | API capability |
| — | — |
| Fleet policy GitOps boundary appliance | /policy/ctl apply and rollback |
| Vendor remote maintenance without VPN sprawl | lease windows and preemption via /queen/lease/ctl |
| GPU lease broker for multi-tenant edge | lease quotas and read-only /proc/lease/* |
| Edge data diode telemetry gateway | export windows via /queen/export/ctl |
| Kubernetes coexistence | declarative queue via /queen/schedule/ctl |
| Audit-first infrastructure | bounded /proc observability |
hive-gateway as the sole console client and point host tools at it with --rest-url (or COH_REST_URL).cohsh-compatible console semantics.Notes:
cohsh or swarmui in console mode. Use SWARMUI_TRANSPORT=rest instead.coh mount --rest-url is exclusive: only one REST mount per gateway URL.These steps both adopt the API and validate connectivity.
./qemu/run.sh
COH_TCP_HOST=127.0.0.1 COH_TCP_PORT=31337 COH_AUTH_TOKEN=changeme \
COH_ROLE=queen HIVE_GATEWAY_BIND=127.0.0.1:8080 \
./bin/hive-gateway
If you built from source, run target/release/hive-gateway (or cargo run -p hive-gateway) instead of ./bin/hive-gateway.
curl -sS http://127.0.0.1:8080/v1/meta/bounds
curl -sS 'http://127.0.0.1:8080/v1/fs/ls?path=/'
/proc path exists in your build.
curl -sS 'http://127.0.0.1:8080/v1/fs/cat?path=/proc/lifecycle/state&max_bytes=128'
curl -sS -X POST http://127.0.0.1:8080/v1/fs/echo \
-H 'Content-Type: application/json' \
-d '{"path":"/queen/schedule/ctl","line":"{\"id\":\"conn-check\",\"role\":\"worker-gpu\",\"priority\":1,\"ticks\":1,\"budget_ms\":10}"}'
Use this only in disposable environments, then confirm visibility via /proc/schedule/queue.
Connection success signals
status: "OK" and end: true./v1/meta/bounds includes manifest_sha256.ls returns a non-empty lines array (typically includes proc, queen, worker, log, gpu, host).The OpenAPI spec is a public contract. It must remain a strict projection of file semantics.
docs/HOST_API.md./v1/openapi.yaml and /docs.LS, CAT, and ECHO./v1/meta/bounds and size requests accordingly.The Python client is a thin wrapper over existing semantics. It must remain non-authoritative.
TcpBackend, FilesystemBackend, RestBackend, and MockBackend.docs/USERLAND_AND_CLI.md.tools/cohesix-py/examples/ aligned with new control grammar.docs/PYTHON_SUPPORT.md when REST or backend behavior changes.These checks validate connectivity only. They do not test API code.
Install the client
python3 -m pip install -e tools/cohesix-py
REST backend connectivity
python3 - <<'PY'
from cohesix.backends import RestBackend
backend = RestBackend("http://127.0.0.1:8080")
print(backend.list_dir("/"))
print(backend.read_file("/proc/lifecycle/state", 128).decode("utf-8").strip())
PY
TCP console connectivity
python3 - <<'PY'
from cohesix.backends import TcpBackend
backend = TcpBackend("127.0.0.1", 31337, "changeme", "queen", None)
print(backend.list_dir("/"))
PY
Filesystem backend connectivity
./bin/coh --host 127.0.0.1 --port 31337 mount --at /tmp/coh-mount
python3 - <<'PY'
from cohesix.backends import FilesystemBackend
backend = FilesystemBackend("/tmp/coh-mount")
print(backend.list_dir("/"))
PY
If /proc/lifecycle/state is unavailable, use a read-only path that exists in your build, such as /proc/schedule/summary or /proc/lease/summary for Milestone 24c.
ERR AUTH or ERR ATTACH means the auth token, role, or ticket does not match the Queen.ERR ECHO reason=policy ... EPERM means policy gating requires an approval in /actions/queue./gpu or /host paths means the host bridges are not publishing.path exceeds max length or path component '..' is not permitted means you violated manifest bounds.read exceeds max bytes means max_bytes is too large for the path or for its manifest limit.docs/BUILD_PLAN.md — Milestone 24c scope and DoD.docs/USE_CASES.md — API-to-use-case alignment.docs/INTERFACES.md — canonical schemas and path definitions.docs/HOST_API.md — OpenAPI 3.1 spec and REST examples.docs/PYTHON_SUPPORT.md — Python client usage and backends.