Interceptors let you hook into the agent execution pipeline at multiple points: mutate messages before the agent processes them (message.before), adjust LLM parameters dynamically (params.before), mutate tool arguments before execution (tool.before), and transform results after completion (tool.after). They are independent from hooks and plugins, though plugins will typically use them.
Common uses:
- Enrich or classify incoming messages before the agent sees them
- Dynamically adjust thinking level or reasoning based on message content
- Inject default arguments into specific tools
- Block dangerous tool calls based on custom logic