Publish the config
Configuration priority
Configuration is resolved in this order: That means constructor values always win. This gives you two levels of control:- global application defaults in
config/intercept.php - per-agent overrides in middleware constructors
Configuration examples
Global config example
Per-agent override example
You can override global config for a specific agent:block or redact, these constructor values take priority for this agent.
Middleware configuration options
Injection Guard options
Supported actions:
- block
- log
- warn
- sanitize
PII Redactor options
Supported actions:
- redact
- mask
- log
- block
- phone
- credit_card
- ip_address
- api_key
- bearer_token
- mac_address
- url
Tool Approval Guard options
Supported actions:
- block
- log
entities defaults to only the high-risk set — credit_card, api_key and bearer_token. Contact data and locators are supported but opt-in, because in a proposed tool argument they are usually the tool’s own parameters rather than an exfiltration signal. scan_injection is off by default for the same reason. See the Tool Approval Guard guide.
Note that block_entities stops the run whatever action is set to, so action: 'log' is only observe-only if you also set block_entities to [].
This middleware acts on the response rather than the prompt, because the tool calls it guards are proposed by the model. It has no mutating action, since a proposed tool call belongs to the paused turn the provider recorded.
Tool approval resumes
When an agent pauses for tool approval and is resumed withDecisions, the prompt text is empty. The new content is whatever a human supplied while resolving the pending tool calls: edited tool arguments and rejection results.
Intercept scans that content by default. Resumed prompts cannot be rewritten, so actions that modify the prompt degrade to logging on this path:
Set
scan_approval_decisions to false on either middleware to opt out.
Recommended config
In my opinion, a good production default would be:Config caching
After changing config in production, clear and rebuild your application cache as needed.Next step
Explore the available middleware collection to see which ones you need.Middleware collection
Learn about the different middleware options available in Intercept.