> For the complete documentation index, see [llms.txt](https://krynix.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://krynix.gitbook.io/docs/getting-started/how-krynix-works.md). Agents can also search and read this documentation through its [MCP server](https://krynix.gitbook.io/docs/~gitbook/mcp).

# How Krynix works

## The pieces

```
your machines                              Krynix (hosted)
┌──────────────────────┐                   ┌────────────────────────────┐
│ Claude Code / Codex  │── hooks (HTTP) ──▶│ api.krynix.dev             │
│ any OTel-speaking    │── OTLP logs ─────▶│  records → decides →       │
│ agent, your code     │── /v1/sessions ──▶│  signs → verifies          │
└──────────────────────┘                   └──────────┬─────────────────┘
                                                      │
                                           ┌──────────▼─────────────────┐
                                           │ the dashboard              │
                                           │  sessions · agents ·       │
                                           │  policies · controls ·     │
                                           │  findings · evidence       │
                                           └────────────────────────────┘
```

* **The API** (`api.krynix.dev`) receives records, answers decisions, signs and verifies sessions, and serves everything the dashboard shows. Its contract is in the [API reference](https://krynix.gitbook.io/docs/reference/api.md).
* **The dashboard** is where people work: register agents, write policies and controls, read sessions, export evidence. Nothing in the dashboard talks to the API with a key you could lose; it forwards your sign-in.
* **The install** on each machine is generated by Krynix for a registered agent and carries one ingest key. An ingest key can add records and ask for decisions. It cannot read the record or change a rule.

## What a session is

One run of an agent, from the first record to the last. Each record is one event: a prompt, a tool call, its result, a model request, a decision, an error, a lifecycle marker. Krynix assigns each event its position and its hash, so the chain is the server's, not the client's. The eight event types are in [Event types](https://krynix.gitbook.io/docs/reference/event-types.md).

A session ends when the agent closes it, or when nothing has been written to it for thirty minutes, or when the server restarted while it was open. Which one happened is recorded and shown; a session with no recorded ending is shown as that, never as a clean close.

## What happens when a session ends

1. **Custody.** The chain tip is signed with Krynix's Ed25519 key. The signature and the public key are served with the session, so anyone can verify offline that these records are the ones Krynix attested to.
2. **Verification.** An independent pass re-reads the session: is the chain intact; did each recorded decision match the policy that was in force at that position; did a call run that no decision covered; was a decision made while the agent was suspended. Each discrepancy is a [finding](https://krynix.gitbook.io/docs/using-the-dashboard/findings.md).
3. **Controls.** Every enabled [control](https://krynix.gitbook.io/docs/using-the-dashboard/controls.md) is evaluated against the session and the verdict is kept: pass, fail, or unknown when the evidence to decide it was not there.

Controls are also evaluated while a session is open, every thirty seconds, but only a verdict no later record could overturn is reported early. A breached ceiling stays breached; a ceiling not yet breached is not yet a pass.

Ready to start? Follow the [Quickstart](https://krynix.gitbook.io/docs/getting-started/quickstart.md).
