Topology and Brews
Forge can run a simple single-model agent, but the runtime also supports multi-model topologies and graph-shaped execution plans.
These surfaces are Rust-first Wave 2 capabilities. They are documented here as the reference contract; cross-language SDK parity follows the conformance program.
Model topology
A ModelTopology is the set of model slots available to an agent or Brew. The
single-model case is represented as a topology with one default slot.
Each slot can carry:
- role name, such as
default,planner,coder, orcritic - primary provider reference, such as
anthropic:claude-sonnet-4-5-20250929 - ordered fallbacks
- required runtime capabilities
- latency and cost preferences
- optional Arsenal scope narrowing
The router chooses a slot; the topology only declares what is available.
Provider references
Forge uses the namespace:model provider reference pattern across the runtime.
That lets a topology move between providers without changing agent logic:
anthropic:claude-sonnet-4-5-20250929
openai:gpt-4o
google:gemini-2.5-pro
local:llama
Provider capability negotiation decides whether a slot can satisfy a request. See Provider Capability Matrix.
Brew graphs
A Brew is a directed graph of typed nodes and edges. It generalizes flat sequential, parallel, and router workflows into a single graph model.
Common node kinds include:
| Node kind | Purpose |
|---|---|
| Agent step | Run an LLM step with optional tools. |
| Tool invocation | Execute a registered Forge tool directly. |
| MCP call | Call a tool through a connected MCP server. |
| Web operation | Fetch or inspect web content through forge-web. |
| Parallel fork | Fan out work and join by policy. |
| Human checkpoint | Pause for approval or operator input. |
| Sub-brew | Compose one Brew inside another. |
Before durable execution, a dynamic Brew is frozen into a ResolvedBrewPlan.
Flowers executes resolved plans, not raw symbolic Brews.
Status
| Capability | Status |
|---|---|
ModelTopology and topology builder |
Rust reference implemented |
| Brew graph model | Rust reference implemented |
Dynamic-to-frozen ResolvedBrewPlan |
Rust reference implemented |
| Flowers mapping | Rust reference bridge implemented |
| TypeScript, Go, Python, Swift, Kotlin parity | Follow-on conformance work |
Use this surface when one agent needs different model roles, explicit fallback behavior, or a workflow graph that can be inspected and replayed.