Skip to main content
An agent in Fabro is an LLM session with access to tools. When a workflow reaches an agent node, Fabro creates a session, sends the prompt and prior context to the model, and lets the agent work autonomously — reading files, running commands, editing code, spawning sub-agents — until it decides the task is complete.

The agent loop

Each agent turn follows the same cycle:
  1. Send — Fabro sends the conversation history (system prompt, prior messages, tool results) to the LLM
  2. Receive — The model responds with text, tool calls, or both
  3. Execute — Fabro executes any tool calls in the sandbox and appends the results to the conversation
  4. Repeat — If the model made tool calls, go back to step 1. If it responded with only text, the agent is done.
This loop continues until the model stops calling tools, indicating it considers the task complete. Fabro also enforces guardrails: token budgets, turn limits, and loop detection to prevent runaway agents.

Backends

Every agent node uses a backend that determines how Fabro interacts with the LLM. There are two options:

API backend (default)

Fabro manages the agent loop directly — it calls the LLM provider’s API, executes built-in tools in the sandbox, and tracks file changes via tool call events. This is the default and supports the full feature set:

CLI backend

Fabro delegates execution to an external coding assistant CLI. The CLI tool manages its own tool loop internally — Fabro sends the prompt, waits for the CLI to finish, and tracks file changes via git diff before and after execution. The CLI is selected automatically based on the node’s provider:
ProviderCLI tool
Anthropicclaude
OpenAIcodex
Geminigemini
Set the CLI backend on a node with backend="cli" or via a model stylesheet:
implement [label="Implement", backend="cli"]
// Stylesheet
* { backend: cli; }

Comparison

CapabilityAPI backendCLI backend
ToolsFabro built-in tools + MCPCLI’s own tool set
Session cachingSupported (fidelity + thread_id)Not supported
Sub-agentsSupportedNot supported
Provider failoverSupportedNot supported
File trackingTool call eventsgit diff before/after

When to use the CLI backend

  • CLI-specific tools — leverage tool implementations built into a specific CLI (e.g. Claude Code’s computer use, Codex’s sandboxed execution)
  • CLI-only models — use models that are only available through a CLI tool, not via API
  • Existing workflows — integrate a CLI tool you already depend on without rewriting its configuration

Tools

Agents have access to a set of built-in tools for interacting with the codebase and environment:
ToolDescription
shellRun shell commands (bash)
read_fileRead file contents with optional offset and limit
write_fileCreate or overwrite a file
edit_fileMake targeted edits to an existing file
grepSearch file contents with regex patterns
globFind files by name pattern
web_searchSearch the web
web_fetchFetch and summarize a URL
Additional tools can be added via MCP servers for integrations like databases, APIs, or custom services. See Tools for the full reference.

Prompts

The agent’s behavior is shaped by its prompt — the task instructions set in the prompt attribute of the workflow node. Prompts can be inline strings or references to external Markdown files:
// Inline prompt
plan [label="Plan", prompt="Analyze the codebase and write a step-by-step plan."]

// External file reference
simplify [label="Simplify", prompt="@prompts/simplify.md"]
Fabro also injects a system prompt with context about the workflow goal, prior stage outputs, available tools, and the agent’s role. See Prompts for details.

Sub-agents

An agent can spawn sub-agents to delegate subtasks. Sub-agents run in their own session with their own tool access, and return results to the parent. This is useful for parallelizing research, isolating risky operations, or breaking complex tasks into manageable pieces. See Sub-agents for details.

Skills

Skills are reusable prompt templates that extend an agent’s capabilities for common tasks — code review, test writing, refactoring, and more. They’re discovered automatically from the project and can be invoked by the agent during its session. See Skills for details.

Hooks

Hooks are shell commands that run in response to agent lifecycle events (e.g. before a tool executes, after a stage completes). They enable custom validation, notifications, and guardrails without modifying the workflow graph. See Hooks for details.

Further reading