Quick start
Self-host the evaluation server, apply a policy, deny a production HTTP POST, and tail the audit log.
Run this path against a self-run Limetry node. Point the CLI at your local
API and use LIMETRY_BEARER_TOKEN (or scoped API tokens you issue on that node).
Install the toolchain
- Node.js ≥ 20 and Yarn 4 (
corepack enable) - A source checkout (or published packages once released)
git clone https://github.com/limetry/limetry.git
cd limetry
corepack enable
yarn install
yarn build:server && yarn build:cliStart the server
Set a bearer token (minimum 32 characters in production) and start the governance server:
export LIMETRY_BEARER_TOKEN="dev-local-bearer-token-min-32-chars"
yarn workspace @limetry/server startThe API listens on http://localhost:3810 by default.
Docker alternative:
docker build -f packages/server/Dockerfile -t limetry-server .
docker run -p 3810:3810 \
-e LIMETRY_BEARER_TOKEN="dev-local-bearer-token-min-32-chars" \
limetry-serverVerify health:
curl -s http://localhost:3810/healthConfigure the CLI
Point the CLI at your self-run server:
yarn workspace @limetry/cli dev setupEnter http://localhost:3810 and paste the same LIMETRY_BEARER_TOKEN.
Run doctor to confirm connectivity:
yarn workspace @limetry/cli dev doctorApply a policy
Deny http_post to a production URL pattern (allow GET for contrast):
yarn workspace @limetry/cli dev policy apply \
--allow http_get \
--deny http_post \
--block-resource "https://prod.example.com/*"Prefer policies with audit_mode: "minimal" (slim builder default) unless you
need forensics retention of redacted metadata.
Record the policy_id printed in the JSON response. You need it for evaluation.
Evaluate an intent
Pipe an ActionIntent JSON document to limetry eval:
echo '{
"policy_id": "PASTE_POLICY_ID_HERE",
"agent_id": "demo_agent",
"action_type": "http_post",
"resource": "https://prod.example.com/api/deploy"
}' | yarn workspace @limetry/cli dev evalExpect DENY with reasons referencing the blocked resource or denied action type.
Evaluate an allowed GET to the same host (adjust policy if needed) to see ALLOW.
Tail the audit log
yarn workspace @limetry/cli dev audit tail --event-type policy.evaluatedLook for policy.evaluated events with your agent id and decision outcome.
Stored events are privacy-safe records (default audit_mode=minimal) — not
raw metadata bags. Do not put API keys or chat transcripts in intent metadata
or record details. See Minimize audit data.
Connect Cursor MCP (optional)
Build the MCP server and add to .cursor/mcp.json:
yarn workspace @limetry/mcp build{
"mcpServers": {
"limetry": {
"command": "node",
"args": ["/path/to/limetry/packages/mcp/dist/index.js"],
"env": {
"LIMETRY_API_KEY": "dev-local-bearer-token-min-32-chars",
"LIMETRY_BASE_URL": "http://localhost:3810"
}
}
}
}Available tools: limetry_evaluate, limetry_record_action, limetry_list_audit, limetry_upsert_policy.
Instruct Cursor to call limetry_evaluate before irreversible tool calls.
Evaluate from the SDK
import { RemotePolicyEngine } from "@limetry/sdk"
const engine = new RemotePolicyEngine({
baseUrl: "http://localhost:3810",
apiKey: process.env.LIMETRY_BEARER_TOKEN,
})
const decision = await engine.evaluateAction({
policy_id: process.env.POLICY_ID!,
agent_id: "demo_agent",
action_type: "http_post",
resource: "https://prod.example.com/api/deploy",
})
if (!decision.approved) {
console.error("Denied:", decision.reasons)
}Block the tool call in your agent loop when approved is false. The SDK does
not enforce deny for you.
Choose an adapter
These packages connect evaluate to your stack. Install only what you need. The HTTP API stays the same across adapters.
