> ## 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.

# Quickstart

> Enforce your first policy verdict in under ten minutes.

This walks you from zero to a live `BLOCK` decision returned by the Akhara PDP.

## Prerequisites

* Node.js 18+ (for the CLI and the TypeScript PEP)
* An Akhara workspace and API key from [console.akhara.dev](https://console.akhara.dev)
* An agent you can put a thin gate in front of

## 1. Install the CLI & SDK

```bash theme={null}
npm install -g @akhara/cli     # the `akhara` binary
npm install @akhara/pep        # runtime enforcement client (TypeScript)
```

## 2. Authenticate

Grab a workspace key from the [console](https://console.akhara.dev) and point the
SDK at the managed PDP:

```bash theme={null}
akhara login
export AKHARA_URL="https://api.akhara.dev"
export AKHARA_API_KEY="ak_live_…"
```

<Tip>
  `https://api.akhara.dev` is the managed PDP. Enterprises running a dedicated or
  VPC deployment set `AKHARA_URL` to their own workspace endpoint.
</Tip>

## 3. Onboard an agent

```bash theme={null}
akhara agents connect \
  --id support-ai \
  --name "Support Copilot" \
  --tools order_status,update_account,refund_payment,send_external_email \
  --surface android
```

## 4. Latch policies onto it

Attach two domain policies on top of the always-on baseline:

```bash theme={null}
akhara policies attach support-ai pci-0 reliability-3
```

## 5. Enforce a verdict

Embed the PEP and gate a proposed model output:

```ts theme={null}
import { PolicyEnforcementPoint } from "@akhara/pep";

const pep = new PolicyEnforcementPoint({
  baseUrl: process.env.AKHARA_URL,
  agentId: "support-ai",
  session: "sess_demo",
});

// This output echoes a full card number; the latch should stop it.
const decision = await pep.checkOutput(
  "Your card on file is 4242 4242 4242 4242, expiring 04/27."
);

console.log(decision.verdict);   // "BLOCK"
console.log(decision.policyId);  // "pci-0"
console.log(decision.rule);      // "PCI DSS Requirement 3.3"
console.log(decision.mayContinue); // false
```

Or hit the API directly:

```bash theme={null}
curl -s https://api.akhara.dev/api/policy/authorize \
  -H "authorization: Bearer $AKHARA_API_KEY" \
  -H 'content-type: application/json' \
  -d '{
    "agentId": "support-ai",
    "session": "sess_demo",
    "stage": "output",
    "content": "Your card on file is 4242 4242 4242 4242, expiring 04/27."
  }' | jq
```

```json theme={null}
{
  "verdict": "BLOCK",
  "stage": "output",
  "policyId": "pci-0",
  "rule": "PCI DSS Requirement 3.3",
  "reason": "Unmasked PAN in output",
  "attachedPolicyIds": ["latch-0","latch-4","…","pci-0","reliability-3"]
}
```

## 6. Confirm it landed in the evidence feed

Open the console at [console.akhara.dev](https://console.akhara.dev) → **Home →
Live Enforcement Feed**. Your `BLOCK` appears with the rule, matching policy, and
the original output that was withheld.

<Card title="Next: understand the model" icon="diagram-project" href="/control-plane/concepts/overview">
  See how the PDP, PEP, latching, and the five enforcement stages fit together.
</Card>

For the same machinery applied to a specific industry, see the cookbooks:
[healthcare](/control-plane/cookbooks/healthcare),
[finance](/control-plane/cookbooks/finance),
[insurance](/control-plane/cookbooks/insurance).
