Governance Framework
Infrastructure-level enforcement. Not prompt-level suggestions.
Why This Exists
AI agents that can send emails, post to social media, modify brand assets, and interact with web pages need technical enforcement. Prompt-level rules ("don't send emails autonomously") can be ignored, forgotten, or overridden by sufficiently complex prompts. The governance engine provides a hard enforcement layer that operates outside the agent's context window. There is no way for an agent to bypass it.
Architecture
Every tool call made by every agent passes through the governance engine before execution. Both interactive sessions (Command Center, CLI) and autonomous background agents use the same enforcement path. Same rules, same code, no exceptions.
Agent requests tool call
|
+-- Command Center ---> canUseTool() callback
|
+-- CLI --------------> PreToolUse hook
|
+-------+-------+
| governance.ts |
| evaluateToolUse|
+-------+-------+
|
+---------------+---------------+
| | |
ALLOW DENY REQUIRE_APPROVAL
| | |
Execute tool Block with Pause for
(+ audit log) explanation human reviewPermission Levels
Four levels, configurable per agent and per tool category. Clients customize these during onboarding based on their workflow and risk tolerance.
Allow
Execute silently. For low-risk operations you trust completely (file reads, search).
Log
Execute and record to the audit trail. For operations you want visibility into but don't need to approve (regular file writes).
Require Approval
Pause and ask for human approval before executing. For sensitive operations like sending messages or browser automation.
Deny
Block outright with an explanation. Agent cannot perform this action under any circumstances.
What's Governed
| Category | Covers | Default |
|---|---|---|
| External Comms | Slack, Gmail, LinkedIn, Twitter, ConvertKit, any Pipedream service that contacts people | Require Approval |
| Browser Automation | Clicking, typing, form-filling in Chrome. Read-only actions (screenshots, page text) are not gated. | Require Approval |
| File Writes | Creating or editing files. Protected paths (brand config, agent definitions, governance rules) always require approval. | Log |
| Sub-agent Spawn | Launching specialist agents. Orchestrators need this to delegate work. | Allow |
Autonomous Agent Lockdown
Background agents (stewards) run on scheduled cadences without human oversight. They are the highest-risk execution context. The steward policy is the most restrictive governance layer.
Stewards CANNOT:
- Send any message (Slack, email, LinkedIn)
- Interact with browser pages
- Write or edit files
- Run shell commands
- Spawn sub-agents
Stewards CAN:
- Read files and search the codebase
- Search the web for intelligence
- Fetch web pages for analysis
- Report findings via session output
Protected Paths
Certain file paths always require human approval for writes, regardless of the agent's general file-write permission.
Audit Trail
Every governed action is logged to an append-only audit trail. Each entry records:
The audit log is viewable in the Command Center under Configuration. Entries are append-only and cannot be modified by agents.
Fail Closed
If the governance config is missing or corrupt, the engine falls back to the most restrictive defaults. A broken config never results in an open system.
- All external comms: require approval
- All browser automation: require approval
- All file writes: require approval
- All sub-agent spawning: require approval
- Stewards: denied everything except read and search
72 Governance Tests
The governance engine has a dedicated test suite verifying every enforcement path.
Safe defaults, steward policy, tool categories
Read-only tools pass even for stewards
Slack deny, browser deny, Gmail deny
All MCP comm tools classified correctly
Chrome DevTools, Playwright enforcement
Regular writes logged, protected paths escalated
Bash-wrapped API calls detected and governed
Per-agent rules, no cross-agent bleed
Steward > override > protected > default
Missing config falls to most restrictive
Denied logged, allowed not logged, append-only
Sessions.ts imports, env propagation, hooks