Fast, persistent, type-safe orchestration. Best of all worlds: self-hostable like n8n, easier and cheaper than Zapier & Make, and as powerful as LangGraph—with built-in MCP, native integrations, and zero spaghetti code.
Validates incoming payload against compiled schema before allocating a lightweight Go execution fiber.
{
"event_id": "evt_99481a",
"topic": "ticket.created",
"user_id": "usr_enterprise_08",
"summary": "SSO SAML assertion timeout on EU cluster",
"type_check": "PASS (0.04ms)"
}
Visual canvas tools turn into unreadable spaghetti the moment you add loops or branches. Code frameworks require hundreds of lines of state-graph boilerplate. Parfait gives you a real block-structured execution language backed by a compiled Go engine.
Node-and-wire tools turn into a cobweb of backward-looping bezier lines after 10 nodes. Parfait uses structured C-blocks (for each, parallel, if/else) with true lexical scoping, compile-time type safety, and clean Git diffs.
Long-running agents fail when processes restart or webhooks time out. Parfait automatically checkpoints state after every block. Agents can hibernate for days awaiting human approval and resume on another worker with zero memory footprint while paused.
Stop writing brittle JSON-parsing wrappers. Model Context Protocol (MCP) servers, structured output schemas, token budgets, and deterministic tool sandboxes are first-class language blocks—automatically scoped to the active agent branch.
• Looping requires manual backward wires into SplitInBatches, breaking upstream node references.
• If iteration #47 fails, the entire batch state is lost or requires complex manual sub-workflow splitting.
• Lexical Scoping: batch and item are strongly typed and accessible anywhere inside the C-block.
• Resumable Mid-Loop: If item #47 fails, Parfait replays strictly from item #47 without re-billing LLM tokens for items 1–46.
• Every IF node splits your canvas into separate floating islands that are painful to merge back together.
• Referencing $node["Auto Refund"].json downstream throws runtime errors when another branch was taken.
• Clean Convergence: Branches snap right back into the main execution flow with zero merge nodes or broken references.
• Hexagonal Boolean Expressions: Compose arbitrarily rich type-checked conditions without buried modal dialogs.
from typing import Annotated, TypedDict, Literal from langgraph.graph import StateGraph, START, END from langgraph.graph.message import add_messages from langgraph.checkpoint.postgres import PostgresSaver from langchain_mcp_adapters.client import MultiServerMCPClient # 1. Manual State Dictionary & Reducer Boilerplate class ResearchAgentState(TypedDict): messages: Annotated[list, add_messages] query: str verified_facts: list[str] needs_human: bool # 2. Manual Async Context & MCP Plumbing async def run_research_node(state: ResearchAgentState): async with MultiServerMCPClient({...}) as mcp: tools = mcp.get_tools() llm_with_tools = model.bind_tools(tools) res = await llm_with_tools.ainvoke(state["messages"]) return {"messages": [res]} # 3. Stringly-Typed Conditional Edge Routers def route_next(state: ResearchAgentState) -> Literal["tools", "human", "__end__"]: if state.get("needs_human"): return "human" return "__end__" builder = StateGraph(ResearchAgentState) builder.add_node("researcher", run_research_node) builder.add_node("human", human_interrupt_node) builder.add_edge(START, "researcher") builder.add_conditional_edges("researcher", route_next) # 4. Separate Checkpointer Pool Setup & Deployment Required with PostgresSaver.from_conn_string(DB_URI) as checkpointer: graph = builder.compile(checkpointer=checkpointer, interrupt_before=["human"])
• High cognitive overhead: manual TypedDict reducers, string-based edge names, and custom Postgres checkpointer lifecycles.
• Still requires building your own webhook server, queue workers, cron scheduler, and credential vault.
• 1/10th the Complexity: Durable Postgres/Badger state checkpointing, MCP lifecycle, and tool loops are handled natively by the Go runtime.
• Batteries Included: Comes with webhooks, cron triggers, credential vault, and execution replay out of the box.
When an AI agent orchestrates 50 parallel tool calls and state checkpoints, orchestration overhead compounds fast. Parfait compiles block scripts into a deterministic state machine executed by lightweight Go goroutines with zero-copy binary serialization.
Instead of deep-cloning massive JSON graphs on every node transition like Node.js or pickling Python dicts, Parfait appends compact binary deltas to its Write-Ahead Log.
Each parallel or for each block spawns 2KB stack goroutines scheduled across all CPU cores—no GIL or V8 event-loop stalls.
Deploys as a single 28MB Go binary or scratch Docker container with zero Node/Python dependency hell.
Self-hostable like n8n, easier and cheaper than Zapier & Make, and as powerful as LangGraph—unified in a clean block execution plane.
| Capability |
Parfait
|
n8n | Zapier / Make | LangGraph |
|---|---|---|---|---|
| Control Flow Model | ✓ Structured C-Blocks (Zero wires) | Node & wire spaghetti | Linear chains / Router bubbles | Verbose Python/TS boilerplate |
| Durable Agent Persistence | ✓ Built-in WAL & Zero-Cost Hibernation | Partial (Wait node limitations) | ✕ Stateless / Short timeouts | Requires manual Checkpointer DB setup |
| Compile-Time Type Safety | ✓ Strict lexical scope & schema check | ✕ Runtime $json guessing |
✕ Untyped dynamic fields | Manual TypedDict annotations |
| Native MCP & AI Tooling | ✓ First-class language blocks | Sub-node wrappers | Basic webhook / app actions | Adapter libraries + custom code |
| Execution Engine & Speed | ✓ Compiled Go (1.4ms step p99) | Node.js (38ms step p99) | Cloud throttled (100ms–2s) | Python (74ms step p99) |
| Self-Hostable & Pricing | ✓ Open-Source Core + Fair Cloud | ✓ Fair-code self-hosted | ✕ Expensive per-task tax | MIT library, paid LangSmith Cloud |
Get notified the moment our open-source Go binary hits GitHub, plus early invite access to Parfait Cloud with managed MCP connectors and zero-ops durable execution.
# 1. Pull single 28MB Go engine container $ docker run -d --name parfait \ -p 8080:8080 \ -v parfait_wal:/var/lib/parfait \ ghcr.io/parfait-dev/parfait:latest # 2. Or run directly via static Go binary $ parfait serve --storage=badger --mcp-auto ✔ Parfait Execution Plane listening on :8080 ✔ Block Studio UI ready at http://localhost:8080