Overview
The Go implementation is the reference implementation of the Agent Identity Protocol. It provides a production-ready proxy that enforces zero-trust authorization for AI agents.aip-go Repository
Official Go SDK and proxy implementation - stable and production-ready
Implementation Status
What the Go Proxy Does
The Go proxy operates as a transparent sidecar between your AI client (Cursor, Claude Desktop, VS Code) and MCP tool servers. It intercepts every tool call and enforces policy before the request reaches your infrastructure.Core Capabilities
Policy Enforcement
Tool allowlists, argument validation, and action-level authorization
DLP Scanning
Redacts secrets (API keys, credentials) from agent responses
Audit Logging
Immutable JSONL logs tied to agent identity for compliance
Human-in-the-Loop
Native OS approval dialogs for sensitive operations
Installation
Quick Start
Basic Usage Example
Define Your Policy
agent.yaml
Run the Proxy
What Happens on a Policy Violation
When an agent attempts a blocked action:Architecture Features
Defense-in-Depth
The Go proxy implements multiple security layers:Attack Blocked Example
Reference Implementation Features
The Go proxy is the canonical implementation of the AIP specification and demonstrates:Policy Loading
YAML and JSON schema validation
Unicode Normalization
NFKC normalization for security
Error Codes
All AIP-defined error codes (-32001, -32002, etc.)
Monitor Mode
Non-blocking policy testing
Conformance Level: The Go implementation passes Full + Extended conformance tests. See Conformance Testing for details.
Configuration Options
Command-Line Flags
| Flag | Description | Example |
|---|---|---|
--target | Command to launch the real MCP server | "python server.py" |
--policy | Path to policy YAML file | ./agent.yaml |
--audit-log | Path to audit log file (JSONL) | ./audit.jsonl |
--mode | Override policy mode (enforce/monitor) | monitor |
--port | Port for proxy to listen on | 3000 |
Environment Variables
Development
Prerequisites
- Go 1.21+
- MCP-compatible tool server
Build from Source
Code Style
Next Steps
Conformance Testing
Validate your AIP implementation
Policy Reference
Complete YAML schema documentation
Contributing
Build new language implementations
Specification
Read the formal protocol definition
Community
Want to contribute to the Go implementation?- GitHub Issues: Bug reports and feature requests
- Pull Requests: Code contributions welcome
- Discussions: Architecture and design questions