Coral Open-Source Agent Gateway
Overview
Coral is an open-source, self-hosted gateway designed to act as an execution layer between AI agents and enterprise systems. By allowing agents to write and execute short TypeScript programs rather than relying on standard tool calls, Coral provides a mechanism for precise, policy-checked interactions with sensitive infrastructure. It is designed to reduce token usage and latency by enabling agents to save successful workflows as reusable custom tools.
Core Architecture and Execution
Coral functions by intercepting agent requests and executing them within a secure, isolated V8 environment. This architecture ensures that agent-driven tasks remain sandboxed, with no direct network access or unauthorized imports.
- Programmatic Execution: Agents use the
exectool to send TypeScript programs to the Coral server. These programs can chain multiple tool calls, filter data, and process results before returning only the necessary information to the agent. - Policy Enforcement: Every tool call initiated by an agent is checked against defined workspace policies. Administrators can set permissions to 'Allow', 'Ask' (requiring human approval), or 'Block' for both standard provider tools and custom-defined tools.
- Custom Tool Persistence: When an agent successfully completes a task, the underlying code can be saved as a private or shared custom tool. This allows agents to bypass the need to re-read tool schemas or re-derive complex logic in future sessions, significantly improving efficiency.
Performance and Security
By moving the execution logic from the agent's context window to the Coral server, the system reduces the amount of raw data processed by the LLM. Benchmarks provided by the project indicate that using these custom tools can reduce token consumption by 37% and execution time by 29% across various tasks on platforms like GitHub, Linear, and Slack.
Security is managed through:
- Granular Governance: Unlike standard Model Context Protocol (MCP) gateways that often operate on an 'all-or-nothing' permission model, Coral allows for specific constraints on how tools are used (e.g., restricting a ticket-closing tool to only affect tickets with no activity for 30 days).
- Credential Management: Coral separates the agent's logic from the credentials. Users can configure providers to use their own accounts, allowing teams to share tools without sharing API tokens.
- Auditability: The system is ISO/IEC 27001:2022 certified and maintains logs of every approval and tool execution.
Deployment and Integration
Coral is built in Rust and is designed to fit into existing developer workflows through the Model Context Protocol (MCP). It can be deployed as a desktop application for individual use or as a shared server using Docker Compose or Kubernetes for team environments. It supports integration with any agent or AI application that supports MCP, including Claude Code, Cursor, and VS Code.
Community and Feedback
Early adopters have noted the utility of Coral's granular controls for managing agent autonomy, particularly in scenarios involving write permissions. Some community members have highlighted the potential for confusion regarding the project's name, noting that it shares a title with Google's discontinued Coral TPU platform. Users interested in the project are encouraged to review the documentation for self-hosting requirements, which include an OIDC identity provider and a database (SQLite or Postgres).