Write Your Agent
Build an agent from scratch with full control over every capability.Forge generates agent code from an API spec, TypeScript source, or plain English — in seconds.
Quick Start
A minimal working agent:Agent Configuration
string
required
Agent identity in the mesh. Other agents and the dashboard see this name.
string
required
What this agent does. The mesh LLM reads this to decide when to route tasks to your agent. Be specific.
number
Port for the HTTP server. The mesh calls your agent at this port to invoke capabilities.
string
Full URL if you’re not using port (e.g., behind a reverse proxy).
object
Credentials for mesh connection. Without this, the agent runs standalone (useful for testing).
string
default:"1.0.0"
Agent version shown in the dashboard.
string
System prompt for Smart Agents. Makes the agent reason about which capabilities to call.
object
LLM configuration for Smart Agents.
Capabilities
A capability is a single thing your agent can do.string
required
Capability name in snake_case. The mesh calls this by name.
string
required
What this capability does. The LLM reads this to decide when to use it. Be specific about inputs and outputs.
object
required
JSON Schema defining the inputs. The LLM constructs arguments from natural language based on this schema.
function
required
Async function (args, context) => result. Executes the capability and returns a result or throws an error.
Starting and Stopping
start() creates an HTTP server, mounts A2A endpoints, and connects to the mesh.
Tool Agent vs Smart Agent
By default, your agent is a Tool Agent — the mesh decides which capability to call. Addinstructions and llm to make it a Smart Agent that reasons on its own:
What’s Next
- Connecting Agents — Discover and call other agents
- Telemetry — Traces, spans, and observability
- Embed in Existing Service — Add capabilities to an Express app
