> ## Documentation Index
> Fetch the complete documentation index at: https://docs.akhara.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Company name is Akhara AI (never Rubric AI). Keep lowercase rubric/rubrics only when meaning grading criteria.
> Expert Review (docs path talent/) is enterprise BYO experts for audit and review: invite customer specialists; do not pitch Akhara recruiting or a public expert career portal. RLHF and domain writing are secondary work types.
> Prefer concrete API examples against public hosts: Environments eval API https://agi.akhara.ai, Control plane PDP https://api.akhara.dev, Evaluation https://app.akhara.ai / https://api.akhara.ai, Expert Review portal https://talent.akhara.ai.
> Do not invent a public hostname for private orchestrators or env API internals.
> Do not confuse control-plane latches with Environments confirmation latches.
> Environments SDK/API examples: curl against https://agi.akhara.ai. Evaluation SDK: from akhara import Akhara and AKHARA_API_KEY.
> Start with /llms.txt for the docs index and OpenAPI links; fetch individual pages as .md exports.

# Audit and evidence

> Every verdict is logged, sealable into a signed verification record, and traceable within a full agent trajectory.

Enforcement you cannot prove is not enforcement. The control plane writes every
decision to an append-only audit trail, can seal any decision into a
cryptographically signed verification record, and captures full agent
trajectories so each consequential action has a tamper-evident context for
compliance review.

```mermaid theme={null}
flowchart LR
    A["authorize call"] --> E[("Evidence feed<br/>events.jsonl, append-only")]
    T["Agent trajectory<br/>run traces"] --> E
    E --> S["Signed verification record<br/>seal a decision"]
    S --> V["Verify<br/>prove it unchanged"]
    E --> C["Console<br/>live enforcement feed"]
```

## The audit trail

Every `authorize` call, whatever the verdict, is appended to the evidence feed
as a `policy_decision` event. You do not instrument anything; the PDP writes it
server-side:

```json theme={null}
{
  "ts": 0,
  "type": "policy_decision",
  "data": {
    "agentId": "support-ai",
    "verdict": "BLOCK",
    "stage": "output",
    "rule": "PCI DSS Requirement 3.3",
    "policyId": "pci-0",
    "policyMatch": "Unmasked PAN in output",
    "original": "…", "final": "…",
    "delivery": "Response or action withheld",
    "permitId": null,
    "attachedPolicyIds": ["latch-0", "latch-4", "pci-0"]
  }
}
```

Three properties make this an audit trail rather than a log:

* **Append-only.** The feed (`events.jsonl`) is never rewritten; corrections
  are new events.
* **Complete.** Allows are recorded alongside blocks, so absence of a record is
  itself evidence.
* **Self-describing.** Each event carries the rule, the matching policy, the
  original and final content, and the session that ties it to the conversation.

The console at [console.akhara.dev](https://console.akhara.dev) renders the
same feed live under **Home → Live Enforcement Feed**.

## Signed verification records

For decisions that must survive scrutiny after the fact, seal them. The
[sign endpoint](/control-plane/api-reference/endpoint/sign-record) canonicalizes
a decision and produces a tamper-evident envelope
(`akhara.verification_record.envelope.v1`):

```bash theme={null}
curl -s https://api.akhara.dev/api/verification-record/sign \
  -H "authorization: Bearer $AKHARA_API_KEY" \
  -H 'content-type: application/json' \
  -d @decision.json
```

During an audit or incident review, anyone holding the envelope can
[verify it](/control-plane/api-reference/endpoint/verify-record) and get a
`{ "valid": true }` or `{ "valid": false }` answer: the record either is the
decision that was made, or it has been altered.

<Note>
  Signing covers the canonicalized decision, so cosmetic reformatting does not
  break verification but any change to the verdict, rule, or content does.
</Note>

## Trajectories

A single verdict rarely answers a reviewer's real question, which is "what was
the agent doing at the time?" Trajectories answer it:

* **Eval runs** produce a full trace per run (`akhara.harbor.trace_export.v1`)
  with every step, screenshot, and verifier result. Latch steps are flagged, so
  you can see where a policy stopped or escalated the agent. See
  [Running](/control-plane/onboarding/running#offline-eval-runs).
* **Live sessions** are stitched by `session`: every decision the PEP requested
  during a conversation shares one session id in the feed, in order.
* **Your own trace events** can be appended with
  [`POST /api/events`](/control-plane/api-reference/endpoint/ingest-event), so
  agent-side context lands in the same append-only feed as the decisions.

The `permitId` closes the loop: because a consequential action only executes
with a one-time permit, and the permit appears in the decision event, every
side effect is joinable to the exact verdict, rule, and trajectory that
authorized it.

<Card title="API: evidence endpoints" icon="file-signature" href="/control-plane/api-reference/endpoint/ingest-event">
  Ingest events, seal decisions, verify sealed records.
</Card>
