Monitoring, per model
Requests, tokens, cost, latency and errors bucketed over time and broken
down by model — claude-opus-4-8 burning hot in one table,
claude-haiku-4-5 humming along in the next.

Open source · Apache 2.0 · Python + TypeScript
Ephorate is enterprise Claude monitoring, alerting and runtime policy enforcement — every API call metered, every tool call judged, every decision on one tamper-evident record.
pip install ephorate anthropic
Model, tokens, cache, latency, cost, stop reason — one metric event per Claude call, straight off your existing client.
A declarative policy engine returns its verdict before the call executes — not after the damage.
Hash-chained, tamper-evident, answerable with a link.
The control plane
Requests, cost, latency, error rate and the day's verdicts — live captures from the real control-plane UI, demo data included.

agent_abuse_patternsSubsystem I
AnthropicMonitor wraps your anthropic.Anthropic client and ships
a metric event per Claude API call — model, tokens, cache tokens, latency, cost,
stop reason, tools used, errors. The control plane stores them, draws the
dashboard, and evaluates threshold alert rules routed to Slack, PagerDuty
or any webhook.
Subsystem II
A declarative policy engine evaluates every tool call before it executes and returns allow, deny, transform or require_approval — with a tamper-evident, hash-chained audit log of every decision.
agent_abuse_patterns hardening bundle — 36 rules
Runtime enforcement
allow
The call proceeds — and the log remembers it.
deny
Blocked before it executes — not after the damage.
transform
Arguments rewritten in flight — card numbers redacted.
require_approval
A $1,240 refund and a terraform apply to prod
both wait for someone with authority to click.
Product tour
Six more interaction loops, captured live from the control-plane UI.
Requests, tokens, cost, latency and errors bucketed over time and broken
down by model — claude-opus-4-8 burning hot in one table,
claude-haiku-4-5 humming along in the next.

Threshold rules over any metric — sum, avg, p50/p95/p99, rate — with windows, cooldowns and per-model or per-agent grouping. Routed to Slack, PagerDuty, email or a webhook.

Every decision lands in a hash-chained log — who, what tool, which policy, and why. Filters compose and the URL is the permalink, so an auditor's question is answered with a link.

When a policy says require_approval, the tool call parks
until someone with authority clicks. A $1,240 refund and a
terraform apply to prod both wait their turn.

Declarative YAML with a predicate AST underneath — matched, evaluated and versioned. Roll a bundle forward, diff what changed, and know which version judged any historical call.

Framework-mapped reports (with PDF export) straight off the same audit data: decision counts, deny rate, approval rate, controls covered — for the period the auditor actually asked about.

Policy DSL
# policy.yaml
policies:
- id: refund-cap
match: { tool: stripe_refund }
when:
all:
- { field: arguments.amount_usd, op: gt, value: 500 }
decision: require_approval
- id: pan-redaction
match: { tool: "*" }
when:
any:
- { field: arguments, op: matches, value: "\b\d{13,19}\b" }
decision: transform
transform: { redact: [card_number] }
Quickstart
# pip install ephorate anthropic
from ephorate import EphorateClient
from ephorate.middleware.anthropic import gate_response
client = EphorateClient(
bundle_path="policy.yaml",
audit_log_path="audit.jsonl",
control_plane_url="https://ephorate.example.com",
)
# in your agent loop:
gated = gate_response(response, client=client,
session_id=session_id)
Same runtime path in TypeScript via @ephorate/sdk.
Starter compliance bundles
engine/policy engine — predicate AST, evaluator, CLI, property-tested with a p99 eval budgetsdk-python/Anthropic/OpenAI middleware, audit log, approval flowsdk-typescript/@ephorate/sdk — runtime path with feature paritycontrol-plane/FastAPI + SQLAlchemy + Celery — ingestion, search, reportsweb/Next.js 15 control-plane UI (the one in the tour)Apache 2.0 — read the code, run the control plane, gate your first agent this afternoon.