Choose an integration
Provon has two user-facing integration paths. Both can block in real time; choose the boundary you need to control.
| Boundary | Integration | What it does |
|---|---|---|
| Model calls | AI Gateway | Route OpenAI-compatible requests through Provon. Guardrails inspect input, proposed tool calls, and output before they cross the boundary. |
| Tool execution | Agent hooks | Install a PreToolUse hook in Claude Code, Codex, Cursor, OpenCode, dsh, or Pi. A denied tool call never runs, and no model request is needed. |
Decide#
| Requirement | Start with |
|---|---|
| Route model calls and enforce policy at the model boundary | AI Gateway |
| Guard local coding-agent tool calls before execution | Agent hooks |
| Control both model calls and local tool execution | Gateway and hooks |
| Backfill old transcripts or emit OTLP from an existing pipeline | Advanced ingest — evidence only, no blocking |
Both paths require a selected project and a project API key. Gateway traffic needs gateway:invoke;
hook decisions need guardrails:evaluate. The default project key includes both.
AI Gateway#
Use the Gateway when Provon should own the model-call boundary. It provides:
- an OpenAI-compatible request API;
- cloud and custom model targets;
- routing, retries, fallback, limits, and guardrails;
- model attempt, token, cost, latency, and error evidence.
Guardrails in Audit mode record matches without changing traffic. In Enforce mode they can block a request before it reaches the provider, or block a tool call proposed in the model response before the client executes it.
Gateway capture cannot infer application work that never crosses the model boundary. Pair it with hooks when local agents execute tools outside that boundary.
See the Gateway quickstart and the runnable curl examples in
examples/gateway-endpoints.
Agent hooks#
Use hooks when a coding agent executes tools locally. Select guard and ingest in the interactive
provon setup prompt, or run both commands directly:
provon setup guardwrites a synchronousPreToolUsehook that asks Provon for an allow/deny decision before the tool runs;provon setup ingestwrites asynchronousPostToolUseandStophooks that upload the session as trace evidence.
A deny decision is returned to the agent with a reason; the tool never executes. In Audit mode the
hook records the would-be block and lets the call proceed. If the decision API is unreachable, the
hook follows the configured fail mode (open by default, closed on request).
Install for every detected tool:
provon setup guard
provon setup ingestInstall for a subset:
provon setup guard --agent claude-code --agent codex --agent cursor
provon setup ingest --agent claude-code --agent codex --agent cursorSee Agent hooks for supported tools, event mappings, fail modes, and troubleshooting.
Combining both#
Gateway and hooks can run side by side. Each keeps its own trace identity. When both observe the same model call, connect related spans through the conversation id or avoid exporting duplicate model spans.
Advanced ingest#
OpenTelemetry/HTTP and transcript backfill are still available for existing instrumentation and historical evidence. They observe traffic; they cannot block a model call or a tool execution. See OpenTelemetry and Agent transcripts.
Success check#
Whichever path you choose, confirm that one representative run contains:
- a stable trace and conversation identifier;
- ordered model and tool activity;
- the user goal and terminal answer;
- provider, model, latency, usage, and error fields when available;
- for hooks, a guard decision span that records allow, audit, or deny.
Troubleshooting#
| Symptom | Likely cause | Fix |
|---|---|---|
| No trace after choosing Gateway | Missing enabled model binding or invalid key | Run provon gateway providers test; check Providers bindings |
| Hook installed but no decision trace | Project key lacks guardrails:evaluate, or guard hooks were not installed |
Create a key with the default capabilities; re-run provon setup guard; trust the hook in the agent |
| Hook denies everything | Enforce mode with a broad rule, or fail mode closed during an outage |
Review the rule in Guardrails; switch to Audit; check the guard API origin and key |
| No files found by transcript sync | Directory has no supported transcript format | Preview with --dry-run --print-sample; see Ingest sync |
Continue with the Tracing quickstart or the Gateway quickstart.