Overview
1flowbase (https://github.com/taichuy/1flowbase) is an open-source, self-hosted virtual model gateway for local AI agent clients. Created by the taichuy organization, it is written in Rust (Axum + Tokio) with a pnpm/Turbo frontend and PostgreSQL persistence, licensed under Apache-2.0. As of the article it had ~110 stars, 10 forks, and 36 open issues.
Its core thesis: LiteLLM routes models; 1flowbase composes models into workflow-backed virtual model endpoints.
Why It Exists
A trivial user input can balloon once system prompts, tool definitions, chat history, and intermediate calls stack up. 1flowbase's motto: *"The first step to harness is to see the Agent's execution path clearly."* It surfaces the full execution path so teams can optimize on real runtime data rather than guesses.
The Five-Step Loop
1. Build a workflow (visual editor): model nodes, tool nodes, verifiers, formatters, routers 2. Publish as a model endpoint — compatible with:
/v1/responses(OpenAI Responses API)/v1/chat/completions(OpenAI Chat Completions)/v1/messages(Claude Messages API)
3. Call from clients — they just see a normal model name like domain— core workflow/node/execution entitiescontrol-plane— workflow CRUD, versioning, configurationorchestration-runtime+runtime-core— execution engine, node execution, payload buildingruntime-profile— token stats and latency tracingpublish-gateway— OpenAI/Claude protocol adaptation and virtual endpoint exposurestorage-durable/storage-ephemeral/storage-object— PostgreSQL, cache, S3-compatible storageobservability— logging, tracing, metrics- Vision-first, then text reasoning: small OCR/vision node → strong text model → verifier. Estimated 50–70% token cost reduction via cascading.
- Model cascades: tiny models (e.g., Qwen3-0.6B) for classification, mid-size for analysis, large models only for complex reasoning, plus a verifier.
- Programmable upstream for coding agents (Claude Code, Cursor, Windsurf): wrap generate → test → review → fix into a single virtual model with per-node debugging.
- Schema-guaranteed output: LLM → JSON Schema validator → formatter, with retry on invalid output.
- Very young project (3 months, small community, 36 open issues) — cautious evaluation needed for production
- Rust + modern TS stack raises operational bar (Node.js >= 24, latest stable Rust, Docker)
- Plugin ecosystem immature; no marketplace yet
- Explicitly not an MCP gateway today, while MCP is becoming a standard
gpt-4o-virtual
4. Inspect execution — node inputs/outputs, model calls, tool callbacks, token usage, latency, errors
5. Optimize and reuse — prompt compression, cascading to cheaper models, validators/fallbacks, republishArchitecture
A Cargo workspace with clean domain-driven layering:
Notable tech choices: SQLx 0.8 (compile-time checked SQL), Utoipa 5 (OpenAPI 3.1), Moka 0.12 (caching), and RquickJS — an embedded QuickJS engine powering a sandboxed JS/TS plugin system with HostExtension interfaces to the Rust host.
Representative Use Cases
How It Differs from Competitors
| Competitor | Difference | |---|---| | LiteLLM | Routing vs. orchestration; request-level vs. node-level observability. Complementary — LiteLLM can route underneath. | | Dify / Flowise | App platform vs. infrastructure gateway; 1flowbase exposes full OpenAI/Claude API compatibility. | | LangGraph / CrewAI | Code-defined agents vs. visual orchestration published as a service. |
Maturity and Risks
Working today: visual editor, multi-node workflows, three protocol endpoints, streaming, execution logs, tool-call tracing, app-level token stats, prompt/model config version history.
In development: Token Bill of Materials (node-level cost attribution), session search/replay, anomaly cost detection, Claude Code/Codex templates, MCP-aware plugin nodes.
Risks:
Verdict
1flowbase fills a real gap between model routing and AI app building: packaging multi-model workflows into standard, transparent, cost-observable virtual model endpoints. Worth watching for teams running local agents (Claude Code, Cursor, etc.) who need execution-path visibility, cost optimization through cascades, or self-hosted compliance.
Project: https://github.com/taichuy/1flowbase