Agent Forge
An open-source TypeScript library that lets a web app expose its real operations to AI agents as typed tools, each with a declared effect and a flag for consequential actions.
What it is
When an AI agent uses a website, it usually clicks through the interface or scrapes it. That breaks when the layout changes, and the business cannot tell a harmless lookup from an action that sends money or personal details. Agent Forge is the layer that decides what a site exposes, how it is described, and which calls need a person to confirm.
What we built
A developer defines each operation once with defineCapability: a stable id, a description, a JSON Schema for input, and an effect class (read, reversible write, write, or irreversible write). A consequential flag marks actions that need a person to confirm, and defaults to true for irreversible writes. The WebMCP adapter registers each capability as a tool in the browser, and an execution observer reports metadata-only lifecycle events, never input values. Apache-2.0.
How it is used
Agent City defines its five demo tools with it, the WebMCP Replay Room defines its six, and The Rectangle website uses it for the tools browser agents call to ask about services and send an inquiry.
Farwhen
Behind the experience
The systems this project uses, grouped by the part of Farwhen they belong to.
Agents & Operations
Tools for people and agents.
Our technology
What it runs on
- Agent Forge
This is the library itself.
Built with
Credit
Written and maintained by Dream Awake Labs. Open source under Apache-2.0.
Get in touch
Tell us what you have in mind.
Describe it in a few sentences. You get a draft brief to review before anything is sent.