Skip to main content

Examples and cookbook

The reference application in examples/ is the most complete runnable Forge implementation. It demonstrates the same application in an in-memory path and a PostgreSQL/Redis path, including streaming, memory, approvals, flows, structured output, and MCP.

Start withWhat it demonstrates
Simple agentAn embedded agent and a conversation run
Persistent user memoryContext providers and per-principal memory
Your first toolA typed custom tool and approval-gated write
Your first flowA versioned flow and durable checkpoint

The runnable scripts are documented in the repository examples README.