Fabro Documentation
repository·main·Indexed 23 days ago
https://github.com/fabro-sh/fabroAn open-source 'dark software factory' for expert engineers to manage AI coding agents. Fabro enables the definition of complex, multi-step agentic processes as deterministic workflow graphs with human-in-the-loop gates, multi-model routing, and sandboxed execution. The project includes the fabro-agent crate for programmable agentic loops and a Split Web Compose PoC architecture featuring a Rust API server (fabro-api) and a React SPA (fabro-web).
What's inside Fabro
- Fabro is an open-source workflow orchestration platform designed specifically for AI coding agents. It moves away from chat-based software development by allowing engineers to define complex processes as Graphviz workflows that can be executed repeatedly and reliably.
Overview of Fabro CLI subcommands
mainThe
fabroCLI is the primary interface for managing workflow runs, interacting with agents, and managing authentication. Key categories of commands include:- Workflow Lifecycle:
create,run,start,resume,rewind,fork,rm,wait. - Inspection & Debugging:
inspect,logs,events,artifact,graph,doctor,dump,ask. - Human-in-the-loop:
approve,deny,steer. - System & Auth:
auth,install,upgrade,version,settings,completion. - Environment & Sandbox:
sandbox,secret,variable,provider.
- Workflow Lifecycle:
What is Fabro?
mainFabro is an open-source software factory designed for small teams of expert engineers. It replaces the traditional 'prompt-wait-review' loop with version-controlled workflow graphs. These graphs orchestrate AI agents, shell commands, and human decisions into repeatable, long-horizon coding processes.
Key capabilities include:
- Orchestration: Combining AI agents, shell commands, and human gates into automated workflows.
- Ensemble Intelligence: Using multiple models from different vendors within a single workflow (e.g., one for implementation, one for critique).
- Verification: Layering deterministic checks like test suites, linters, and type checkers into the workflow to trigger automatic fix loops on failure.
- Scalability: Running agents 24/7 in cloud sandboxes via an API server that queues and executes runs continuously.
- Security: Executing untrusted code in isolated cloud sandboxes with network and filesystem isolation.
- Observability: Inspecting runs through durable event streams, checkpoints, and stage outputs.
Overview of Fabro Rust SDK entry points
mainFabro provides two primary Rust crates for building AI-driven applications:
fabro-agent: A full AI coding agent. It includes tool use (shell, file I/O, web search, etc.), sandboxed execution, event streaming, and context management. Use this to build agents that interact with codebases and run commands.fabro-llm: A standalone LLM client. It provides direct control over multi-provider completions, streaming, and tool execution loops without the higher-level agent orchestration.
Both crates can be used independently of the Fabro workflow engine.
What is fabro-workflow?
mainfabro-workflowis a DOT-based pipeline runner designed for multi-stage AI workflows. It allows you to define complex workflows using Graphvizdigraphsyntax.Key features include:
- Pluggable Handlers: Execute different types of nodes (agents, prompts, human gates, etc.).
- Conditional Routing: Use edge attributes to control workflow flow based on node outcomes.
- Human-in-the-Loop: Pause execution for human input using specific node shapes.
- Parallel Execution: Fan out tasks concurrently with isolated context forks.
- Checkpointing: Save state after every node to allow for crash recovery and resuming.
- Model Stylesheets: Use CSS-like selectors to assign specific LLM models to different parts of the graph.
Overview of fabro-llm
mainfabro-llmis an asynchronous Rust client library that provides a unified interface for multiple LLM providers like Anthropic, OpenAI, and Google Gemini. It allows you to write LLM integration code once and switch providers without changing application logic.Core Abstractions
- Client: The main entry point that routes requests to registered provider adapters. It can be initialized using a
CredentialSourceor explicit credentials. - ProviderAdapter: A trait implemented by each provider (e.g.,
AnthropicAdapter,OpenAiAdapter,GeminiAdapter,OpenAiCompatibleAdapter) to handle specific API implementations. - Middleware: Components that intercept requests and responses for tasks like logging, caching, or transformation. They support both blocking and streaming paths.
- generate(): A high-level function that wraps
Client.complete()and manages automatic tool execution loops, retries, timeouts, and cancellation. - Tool: Can be Active (includes an execution handler that runs automatically in the tool loop) or Passive (no handler, surfaces tool calls back to the caller).
- Client: The main entry point that routes requests to registered provider adapters. It can be initialized using a
Available Fabro interfaces
mainFabro provides three primary ways to interact with the platform:
- CLI: The primary interface for developers, designed for a CLI-first experience.
- API Server: Enables integration and programmatic control.
- React Web App: A visual interface intended for monitoring and managing longer-running or shared workflows.
Understand the Fabro product surface
mainFabro is an open-source, self-hosted workflow orchestration layer designed for expert engineers. The product consists of several key components that work together to define, execute, and monitor workflows:
- CLI: Used for defining and running workflows.
- API Server: Started via
fabro server startto provide programmatic access. - React Web App: A monitoring interface for inspecting workflows and observing runs.
- Documentation & Examples: A site containing documentation and example workflows for implementation guidance.
Project Architecture: Refactored Engineering Patterns
mainThe project is organized into several specialized crates to support high-reliability engineering patterns:
Crate Purpose fabro-staticCentralized EnvVarsregistry for allFABRO_*and upstream constants.fabro-redactRedaction utilities, including DisplaySafeUrlfor credential protection.fabro-testTesting utilities, including fabro_json_snapshot!for JSON value snapshots.fabro-options-metadataRuntime metadata for command-line options and arguments. fabro-macrosProcedural macros like #[derive(OptionsMetadata)].fabro-devA unified developer CLI (via clap) containing commands likecheck_boundary,docker_build, andrelease.Monitor workflows with the Web dashboard
mainThe Web dashboard provides a pipeline kanban board to monitor all active runs. You can track status, progress, and any pending human-in-the-loop prompts in real time from your browser.Overview of the Fabro MCP Server Architecture
mainThe Fabro MCP server is implemented as a dedicated Rust crate (
fabro-mcp-server) and is exposed through thefabro-cli.Key architectural details:
- Transport: Uses
rmcp1.3 withstdiotransport for protocol correctness. - Connectivity: Connects lazily to the Fabro API using settings derived from the same CLI auth/config inputs used by standard Fabro commands.
- Tooling: Provides first-class tools for managing Fabro runs (create/start, search, interact, gather, and events).
- Output: Returns structured MCP tool results with text fallbacks for error handling.
- Separation of Concerns: The
fabro-mcp-servercrate handles the MCP service and tool semantics, whilefabro-clihandles command-line parsing and dispatch.
- Transport: Uses
Use ServerTarget for canonical HTTP URLs
mainWhen specifying a server target,
ServerTarget::from_urlautomatically applies HTTP canonicalization to ensure consistent addressing. This prevents duplicate entries in theAuthStorecaused by minor URL variations.Canonicalization includes:
- Lowercasing the scheme (e.g.,
HTTPS->https) - Lowercasing the host
- Stripping default ports (e.g.,
:443for https,:80for http) - Stripping trailing slashes
- Stripping the
/api/v1suffix - Rebuilding the authority as
{scheme}://{host}[:{port}]
- Lowercasing the scheme (e.g.,