Coral 开源智能体网关 让智能体自写工具提速 29%

原标题:Show HN: Coral – Open-source gateway where agents write their own tools
72AI 研判分

Coral 是一个开源自托管的智能体执行网关,位于智能体与其操作的目标系统之间:智能体通过编写简短的 TypeScript 程序调用工具,并将验证有效的代码保存为可复用的自定义工具,每次调用都会先经过策略校验再注入凭证并转发。官方称在 GitHub、Linear、Slack 等任务上,自定义工具让智能体提速 29%、成本降低 31%。

报道正文

本文目录2 个章节

Coral, with engraved orange corals

Coral

Execution rails for agents.

Coral is an open-source, self-hosted gateway that sits between your agents and the systems they work on. Agents call tools by writing short TypeScript programs, and save the ones that work as custom tools to reuse. Coral checks every call against your policy before it adds credentials and forwards the call.

Quickstart · Download · Demo video

In this example, an agent posts unreviewed PRs to Slack for the first time. The agent searches for the GitHub and Slack tools and writes code that calls them. It isn't allowed to post to Slack without approval, so the user approves the post. The agent then saves its code as a custom tool. The next day, the agent runs the same task by calling that custom tool.

In Claude Code, an agent posts unreviewed pull requests to Slack. It searches Coral for the GitHub and Slack tools, writes code that calls them, and waits for approval before posting. The Coral UI then shows the run, who approved it, and the custom tool the agent saved. The next day, the same request runs by calling that custom tool. A final card compares the two days: 35% fewer tokens and 31% faster, in line with our benchmarks.

Control what agents can do, not just what they can reach. Most MCP gateways decide only which tools an agent can see. That is all or nothing: if an agent can call update_record, it can update any record in any way the tool allows. A custom tool is code, so it can hold the rule that Allow and Block cannot: closeStaleTicket changes one field, only on tickets with no activity for 30 days. You set Allow, Ask, or Block on the custom tool like any other tool, and Coral still checks every provider call inside it against your policy.

Less duplicated agent work. Agents start every task from scratch. They re-read tool schemas, retry failed calls, and spend tokens rewriting code for steps they got right yesterday. With Coral, agents save the code that worked as custom tools they call again in one step, and workspace owners can share them with the whole team.

Coral is used by thousands of developers at more than 450 companies for safer, more efficient agent work in customer support, SecOps, business intelligence, SRE, and more.

Get started

  1. Install Coral.
    • For yourself: download the desktop app from the download page. It runs on macOS (Apple silicon), Windows (x64), and Linux (x86_64).
    • For your team: run a shared server with Docker Compose or Kubernetes. You need an OIDC identity provider, a reverse proxy for TLS, and SQLite or Postgres.
  2. Add a provider. A provider is one service your agents can use, such as GitHub or Linear. Pick one from the catalog, or bring your own OpenAPI document or MCP server. By default, tools that read data run right away and everything else needs your approval. See Add a provider.
  3. Connect your agent. Copy your workspace's MCP URL from the Coral UI and add it to your MCP client:
BASH
    claude mcp add --scope user --transport http coral <your-mcp-url>   # Claude Code
    codex mcp add coral --url <your-mcp-url>                            # Codex
文本
For Cursor, VS Code, OpenCode, and other clients, see
[Connect an MCP client](https://withcoral.com/docs/getting-started/quickstart#connect-an-mcp-client).

4. Ask a question. Ask your agent something that uses that provider, such as "What are my open pull requests?"

Why Coral

We started Coral while building an AI SRE. To investigate an incident, the agent had to connect the dots across an ocean of telemetry and undocumented relationships between internal and external systems. It needed broad permissions and a lot of tokens, and it started from scratch the next time.

We built Coral so that the agent remembers the route. Once a task succeeds, the agent saves the steps that worked as a custom tool. Next time, it finds that tool in the same search as provider tools such as Datadog and Slack. It started with SRE, and teams now use Coral for agent work across the organization:

  • SRE. The agent investigates alerts. Custom tools let it roll back only the services you name.
  • Customer support. The agent issues refunds, and escalates to a person in the cases you define.
  • Business intelligence. Custom tools aggregate warehouse, CRM, and billing data, and pass only the metrics to the agent.
  • SecOps. The agent uses custom tools to isolate devices within approved groups.

What you get:

  • Precise control. Set Allow, Ask, or Block for each provider tool and each custom tool. An approval shows the exact call and its arguments, so Security approves one refund lookup, not the whole payments API. See Roles & Permissions.
  • Shared tools, not shared tokens. You can set each provider to use the caller's own account, so teammates share tools without sharing API tokens. Read how Slackbot uses this.
  • Cheaper models, same accuracy. With custom tools, a smaller model performs like a bigger one. For many tasks, this means Opus 5.5 accuracy at Haiku 5.5 cost.
  • Faster, leaner agents. Across 34 tasks on GitHub, Linear, and Slack with Opus 5.5, custom tools cut tokens by 37%, cost by 31%, and time by 29%. See every task.
  • Ahead of other MCP gateways. In blind benchmarks of 100 enterprise tasks, agents were more accurate and cheaper with Coral than with other MCP gateways. See the benchmarks.
  • Training data you own. Each run leaves a structured trace of the goal, the tools used, and the outcome that works well for post-training your own model.

From one developer's laptop to an enterprise cloud, Coral fits your stack:

  • Runs on your infrastructure. Coral is written in Rust and runs as a desktop app on your laptop or a shared server in your own cloud, with zero data egress.
  • **O

(注:更多技术实现细节与完整 API 文档请查阅原项目 README)


作者发帖说明(HN):

Hi HN, I'm James, one of the co-founders of Coral.

Coral is an open-source, self-hosted gateway that sits between your agents and the systems they work on. Agents call tools by writing short TypeScript programs that they can save as custom tools to reuse.

You can publish custom tools for groups of agents, so your team’s library of tools adapts to your unique systems, data and use cases. Custom tools help agent performance and give more precise units of permission control.

Here’s a short demo: https://www.youtube.com/watch?v=p0PKOlHLyVI

We started on this while building an AI SRE. To investigate an incident, the agent had to connect the dots across an ocean of telemetry data and undocumented relationships across internal and external systems. It took broad permissions, a lot of tokens and it would start from scratch the next time.

We built Coral so that the agent remembers the route. Once a task succeeds, the agent writes the steps that worked into a program and saves it as a custom tool. Next time, the agent finds that custom tool in the same search as standard provider tools (e.g. Datadog, Slack), and reuses it. It started with SRE, but we (and our early users) now use Coral for agent work across the org.

For our tasks across GitHub, Linear and Slack with Opus 5.5, custom tools help agents work 29% faster, at 31% lower cost (tasks here: [https://withcoral.com/docs/examples/custom-tools](https://withcoral.com/docs/examples/...