Quick start¶
With MATVIS deployed and running (see Deployment), this is the fastest path to your first screened requests: one configuration for all four enforcement points, an API key, a prompt on the chat path and a tool call on the agent path.
1. Create a configuration for all four enforcement points¶
Open the dashboard at http://localhost:3000
and sign in with the admin user from your .env (see Users).
- Go to Configuration → Firewall, select New Configuration, then Bundle config.
- Give the bundle one name. On the Chat Inbound tab turn on Prompt Injection and PII; on
the Tool Call tab add a tool, for example
send_email, and mark it Allowed. - Save. MATVIS creates four configurations,
<name> (inbound),<name> (outbound),<name> (tool call)and<name> (tool response). - Copy the UUIDs of the chat inbound and the tool call configurations from their cards; you need them in steps 3 and 4.
What each check does is in Chat security and Agent security.
2. Generate a Firewall API key¶
Under API keys in the dashboard, generate a Firewall API key and copy it right away: it is shown only once. Screening calls authenticate with this key.
3. Screen a prompt: the chat path¶
Send a prompt to the Firewall API's inbound endpoint, passing your API key in the Authorization
header and the chat inbound UUID as config_id. Set both once as variables, then the request needs no
editing:
export MATVIS_URL="http://localhost:8000"
export MATVIS_API_KEY="<your-firewall-api-key>"
export CONFIG_ID="<your-chat-inbound-uuid>"
curl -X POST "$MATVIS_URL/api/v1/filter/inbound" \
-H "Authorization: $MATVIS_API_KEY" \
-H "Content-Type: application/json" \
-d @- <<EOF
{
"config_id": "$CONFIG_ID",
"content": "Tell me about the evolution of the internet."
}
EOF
Act on result.action: allow means you may forward the content, block means you must not.
When result.modified is true, forward content_modified instead (MATVIS masked PII).
result.handling lists what MATVIS did with a detection (pseudonymized, bypassed,
allowlisted), and each filter reports its own score. Abbreviated response:
{
"config_id": "<YOUR-CHAT-INBOUND-UUID>",
"content": "Tell me about the evolution of the internet.",
"content_modified": null,
"result": { "valid": true, "action": "allow", "modified": false, "handling": [], "severity": 0.01 },
"filters": {
"Content": { "valid": true, "score": 0.01, "severity_level": 0 },
"PromptInjection": { "valid": true, "score": 0, "severity_level": 0 }
}
}
When a filter blocks, result.action is block and result.block_reason names the filter (for
example PromptInjection). In monitoring mode the same detection gives result.valid: false
with action: allow. See Validate inbound content for
the full response with blocked, pseudonymized and allowlisted examples.
4. Screen a tool call: the agent path¶
Before your agent runs a tool, send the call to the Firewall API's outbound endpoint with the tool
call UUID as tool_config_id:
export TOOL_CONFIG_ID="<your-tool-call-uuid>"
curl -X POST "$MATVIS_URL/api/v1/filter/outbound" \
-H "Authorization: $MATVIS_API_KEY" \
-H "Content-Type: application/json" \
-d @- <<EOF
{
"tool_config_id": "$TOOL_CONFIG_ID",
"tool_call": { "name": "send_email", "input": { "to": "jane@example.com" } }
}
EOF
Act on result.action the same way: run the tool on allow, not on block. A blocked tool call
reports result.source: tool. A tool result goes the other way, to POST /api/v1/filter/inbound
as tool_response with the tool response UUID as tool_config_id. See
Validate outbound content and
Validate inbound content.
To screen the model's response on the chat path, use the same pattern against
POST /api/v1/filter/outbound with the chat outbound UUID. See the API Reference
for the full request and response schemas.
Next steps¶
- Tune the checks: Chat security and Agent security.
- Put MATVIS in front of your agents: Integrations.
- Watch every request: Firewall Analytics.
- Hit a snag: Troubleshooting.