Start here after you understand the normal session/tool flow. If you are new to Meerkat overall, read Examples: Sessions first.
Observer hook (background)
Apost_tool_execution background hook that logs every tool call to a file. Background hooks run asynchronously and never block the agent loop.
- CLI
- JSON-RPC
- REST
- MCP
- Python
- TypeScript
Run-scoped hook override flags are not currently exposed on the normal
rkat run surface. Use the JSON-RPC, REST, MCP, or SDK examples below for per-run hook override testing.Guardrail hook (foreground)
Apre_tool_execution foreground hook that must approve each tool call before it runs. If the hook returns deny, the tool call is skipped.
- CLI
- JSON-RPC
- REST
- MCP
- Python
- TypeScript
Run-scoped hook override flags are not currently exposed on the normal
rkat run surface. Use the JSON-RPC, REST, MCP, or SDK examples below for per-run hook override testing.In-process hook (Rust only)
Register a Rust closure directly — no subprocess, no serialization overhead. Only available in the Rust SDK.- Rust
- Rust
HTTP hook
A hook that POSTs the invocation payload to a remote URL. Useful for centralized policy servers.- CLI
- JSON-RPC
- REST
- MCP
- Python
- TypeScript
Run-scoped hook override flags are not currently exposed on the normal
rkat run surface. Use the JSON-RPC, REST, MCP, or SDK examples below for per-run hook override testing.All 8 hook points
Pre-point hooks in
foreground mode halt the agent loop until they return. Pre-point hooks in background mode are limited to observe-only capability.Disable a hook
Use thedisable list to turn off hooks defined in the realm config without removing them.
- CLI
- JSON-RPC
- REST
- MCP
- Python
- TypeScript
Run-scoped hook override flags are not currently exposed on the normal
rkat run surface. Use JSON-RPC, REST, MCP, or SDK/embedded surfaces for per-run hook override testing.