Skip to main content

Forge mental model

Forge is a TypeScript platform for building AI-powered programs that can safely use capabilities and keep working when the task outgrows a single model call.

The pieces

PiecePlain-language meaningStart here
AgentA model-driven program with instructions and optional capabilitiesAgents
ToolA typed operation an agent may ask Forge to performTools
FlowA repeatable process with explicit steps, pauses, and recoveryYour first flow
ConversationThe messages exchanged with an agentSessions and threads
MemoryFacts that can follow a principal across conversationsMemory
KnowledgeIndexed documents retrieved for a specific questionRetrieval
Human-in-the-loopA durable question or approval that pauses a runHuman-in-the-loop

Two ways to run Forge

Embedded mode is the shortest path: createAgent().run() uses in-memory reference adapters in one process. It is useful for a first agent, scripts, and tests. State does not survive a process restart.

Server mode uses the same contracts with PostgreSQL/Supabase, Redis/BullMQ, API hosting, and workers. Choose it for multi-user applications, live streaming, durable recovery, and cross-process execution.

Next: build your first agent.