Grafy News
Try Grafy free

Coral launches open‑source gateway that lets AI agents write and reuse their own tools

Coral, an open‑source gateway for AI agents, lets developers define custom tools in TypeScript.

Illustration for the news story: Coral launches open‑source gateway that lets AI agents write and reuse their own toolsSource: Hacker News — front page

Coral, an open‑source gateway that sits between AI agents and the services they act on, was announced on Hacker News on 16 Nov 2026. The project claims to let agents author short TypeScript snippets as reusable tools, enforce per‑call permissions, and reduce token consumption for enterprise workloads.

What is Coral and why does it matter?

Coral is described as “execution rails for agents” that can be self‑hosted on a laptop or a shared server. It acts as a middle layer – agents send a program to Coral, Coral validates the request against a policy, injects the necessary credentials, and forwards the call to the target service. By centralising this logic, organisations can grant AI agents access to sensitive systems while retaining auditability and human‑in‑the‑loop approvals. According to the project's GitHub README, thousands of developers across more than 450 companies are already using it for customer support, SecOps, SRE, and business intelligence.

How does Coral let agents write and reuse custom tools?

Agents interact with Coral by writing tiny TypeScript programs that call provider tools (e.g., GitHub, Slack) via a generated SDK. A program can chain multiple calls, filter results and return only the data the model needs. When a run succeeds, the agent can save the snippet as a custom tool. The next time the same task is required, the agent discovers the custom tool alongside the standard provider tools and executes it in a single step. This eliminates the need for the agent to re‑read schemas, retry failed calls, or re‑generate code for steps that already work.

What policy controls does Coral provide for enterprise security?

Unlike many Managed‑Code‑Process (MCP) gateways that only toggle visibility of whole tools, Coral lets administrators set Allow, Ask, or Block rules on each individual provider call inside a custom tool. An approval request shows the exact API method and arguments, so a security reviewer can approve a single refund lookup without granting blanket access to the entire payments API. Policies are enforced in a fresh V8 isolate with no network or credential access until the check passes, and every run is attributed to the initiating user or agent.

What performance and cost benefits does Coral claim?

The README reports that, across 34 benchmark tasks involving GitHub, Linear and Slack, custom tools reduced token usage by 37 %, overall cost by 31 %, and execution time by 29 % when paired with the Opus 5.5 model. In blind comparisons of 100 enterprise‑level tasks, agents using Coral were both more accurate and cheaper than with competing MCP gateways. The authors also note that a smaller model (Haiku 5.5) can achieve the same accuracy as a larger one (Opus 5.5) when custom tools pre‑filter data, further lowering inference cost.

How can Grafy users experiment with Coral‑like workflows?

Grafy does not ship a built‑in MCP gateway, but developers can explore the same ideas using the Grafy Code studio. Write a short TypeScript or JavaScript snippet that calls external APIs via a proxy (for example, a local server that mimics Coral’s policy checks), then store the snippet as a reusable module. The Graph app can visualise the branching flow of tool discovery, execution and results, helping you see how a custom tool replaces a multi‑step sequence. For teams that need to read API specifications, the Reader app can ingest OpenAPI documents and let you query them with natural language, similar to Coral’s coral.search feature. By combining these apps, you can prototype the “write‑once‑run‑again” pattern without leaving the Grafy workspace.


Source: https://github.com/withcoral/coral

Frequently asked questions

Does Coral require a cloud service to run?

No. Coral is written in Rust and can run as a desktop application on macOS, Windows or Linux, or be deployed on a shared server using Docker Compose or Kubernetes. All processing stays inside your infrastructure, so there is no mandatory data egress.

Can any AI model be used with Coral’s MCP interface?

Coral works with any agent that supports the MCP protocol, which includes popular models like Claude, Codex, and open‑source alternatives. The gateway simply forwards the program; the model itself does not need to be modified.

How does Coral handle credential management for multiple users?

Each provider can be configured to use the caller’s own identity, meaning that teammates share the same tool definition but never share API tokens. The policy layer injects the appropriate credentials after the approval step, keeping secrets isolated per user.


Source: Hacker News — front page — Show HN: Coral – Open-source gateway where agents write their own tools