Skip to main content

Introduction

ThoughtGate is a high-performance Rust governance layer for AI agents. It intercepts MCP (Model Context Protocol) tool calls and enforces human approval workflows — without modifying your agent's code.

Run it locally with a single command:

thoughtgate wrap -- claude-code

Or deploy it as a Kubernetes sidecar for server environments.

Unlike framework-specific solutions like LangChain's interrupt(), ThoughtGate can govern closed-source vendor agents and doesn't require application code changes.

What ThoughtGate Does​

┌─────────────┐     ┌─────────────────────────────────────┐     ┌─────────────┐
│ AI Agent │────▶│ ThoughtGate │────▶│ MCP Server │
│ (Claude, │◀────│ • YAML governance rules │◀────│ (Tools) │
│ Cursor, │ │ • Cedar policy engine │ │ │
│ VS Code) │ │ • Slack approval workflows │ └─────────────┘
└─────────────┘ │ • SEP-1686 async tasks │
└─────────────────────────────────────┘

When an AI agent attempts to call a tool, ThoughtGate:

  1. Evaluates the request through a 4-Gate decision model
  2. Routes appropriately — forward immediately, require approval, or deny
  3. Manages async tasks using the SEP-1686 protocol for long-running approvals
  4. Maintains audit trails of all decisions and outcomes

Key Features​

FeatureDescription
CLI Wrapperthoughtgate wrap governs any supported agent locally
YAML Governance RulesSimple glob-based routing for quick setup
Cedar PoliciesAWS Cedar engine for complex access control
Async ApprovalsSEP-1686 task-based approval flow (non-blocking)
Slack IntegrationHuman-in-the-loop approval via Slack reactions
Development ModeObserve what would be blocked without enforcing
6 Agent TypesClaude Code, Claude Desktop, Cursor, VS Code, Windsurf, Zed
Low Overhead< 2ms p50 latency, < 20MB memory footprint