How Faramesh Works
Understand the action lifecycle, policy evaluation, and decision flow that powers AI agent governance.
Architecture Overview
Intent-to-Action Control Layer for AI Agents
Faramesh provides an Intent-to-Action Control Layer for AI agents. It sits between your agent and the actions it wants to perform, evaluating each action against policies before allowing execution.
The Action Lifecycle
Every action goes through these stages
Action Flow
The complete flow from submission to result:
Agent → Submit Action → Policy Engine → Decision
↓
allow / deny / require_approval
↓
(if approval needed) → Human Review
↓
Execution → Result → StoragePolicy Engine
The policy engine evaluates actions using a first-match wins strategy with default deny:
- Policies are evaluated in order
- The first matching rule determines the decision
- If no rules match, the action is denied by default
Policy Evaluation Process
- Action is submitted with:
tool,operation,params,context - Policy engine checks each rule's
matchconditions - First matching rule determines:
allow,deny, orrequire_approval - Decision is returned with reason and risk level
Action Status Flow
Actions progress through these statuses
Policy Matching
Rules match actions based on:
tool- The tool name (e.g., "shell", "http", "stripe")oporoperation- The operation (e.g., "get", "post", "exec")pattern- Regex pattern matching against paramsamount_gt- Numeric comparison (for financial operations)context- Additional context like agent_id
Example Policy Match
rules:
- match:
tool: "shell"
op: "*"
pattern: "rm -rf"
deny: true
description: "Block destructive commands"
risk: "high"This rule matches any shell operation containing "rm -rf" and denies it.
Default Deny Security Model
Security-first approach to action governance
Faramesh follows a default deny security model. If no policy rule matches an action, it is automatically denied. This ensures that only explicitly allowed actions can proceed.
Always include a catch-all deny rule at the end of your policy:
rules:
- match: { tool: "http", op: "GET" }
allow: true
- match: { tool: "*", op: "*" }
deny: true
description: "Default deny"