End-to-End User & Agent Workflow
The comprehensive execution path from developer prompt to audited tool output and deterministic evidence persistence.
1. Developer Prompts the AI Agent
A developer asks their AI assistant: "Run a security scan on repository backend and propose a fix for any SQL injections found." The agent formulates a plan and determines it needs to call run_security_scan.
2. Gateway Interception & Policy Check
The MCP client sends the tool request payload to the Kavach Gateway. The gateway inspects the agent token, checks that the agent has SCANS_EXECUTE permission in PostgreSQL, and submits the payload to the OPA Rego engine.
3. Human-in-the-Loop Approval
If a tool is classified as HIGH or CRITICAL risk (e.g. quarantine_compromised_target or propose_remediation_diff), the gateway suspends execution and pushes an approval notification to the developer dashboard. Once approved by a human, execution resumes.
