Learn Frags
A guided path from a local runtime to production-ready plans. Work through the tracks in order, or jump straight to the lesson you need.
15
Lessons
3
Tracks
~97
Minutes
Track 01
Run it in production
Schedule blueprints on a cadence and let the platform run, deliver, and observe them.
7 min read
Run your first Blueprint in Diaphora cloud
Connect your tools, write a blueprint, deploy it, and call it — the shortest path to a real, cloud-hosted run with a stable API endpoint, MCP tool, and optional schedule.
6 min read
Schedule recurring blueprints
Run a Blueprint automatically on a cadence — schedule a weekly market brief that analyzes data and emails an HTML report through the Resend MCP server, all on Barndoor Automation's managed runtime.
Track 02
Set up your environment
Get the open-source Frags runtime running on your own machine.
5 min read
Running Frags Locally
Install the open-source Frags CLI, point it at Gemini, ChatGPT, Anthropic, or Ollama, and run your first Blueprint on your own machine.
4 min read
Setting up tools
Add a new connection to tools.json end-to-end — OAuth for an MCP server, a Postgres collection, and where apicp fits in — then verify it before wiring it into a blueprint.
7 min read
Building automations with Barndoor MCP servers
Route a tools profile through Barndoor's governed MCP gateway — register the Diaphora connector, set the OAuth redirect, scope an access policy, and verify every server resolves to ready before a Blueprint calls it.
Track 03
Blueprints
6 min read
Anatomy of a blueprint
The four things every Blueprint declares — tools, parameters, sessions, and typed schema — walked through on one complete example.
6 min read
Build a hello-world blueprint
Write your first FML Blueprint from scratch — a single session with a schema — then grow it with parameters, prompt phases, and connected sessions.
7 min read
Anatomy of a session
Every part of a session, top to bottom — name, tools, PreCalls, context, and the key prePrompt (+) vs prompt (-) distinction that turns gathered context into typed output.
6 min read
Design your output schemas
Shape a session's typed output — field syntax, comments the model reads as instructions, flat-vs-nested structure, scalar shorthand, and reusable $Component refs.
7 min read
Data flow: params, vars & context
How data moves through a Blueprint across the three namespaces — caller inputs, working memory, and session outputs — and the rule for reading context safely.
6 min read
Templates and expressions
Go templates always make strings; $(...) preserves real types. Learn the three expression positions and never hand a tool a stringified array again.
8 min read
PreCalls deep-dive
Run tools deterministically before prompts — global vs session PreCalls, tool vs code invocations, and routing output into vars or context.
8 min read
Connect Frags to your data
Pull live data into a Blueprint— run a web search, call an MCP server (Slack), and query a database (Postgres) with PreCalls, transformers, and context routing.
9 min read
Control the flow of a blueprint
Order, gate, and fan out sessions with after, target, expect, and iterate — the declarative flow controls Frags runs for you.
5 min read
Generate an apicp from an OpenAPI spec
Map an OpenAPI operation into an apicp.yaml mapping and expose it as a focused MCP server a Blueprint can call with require apicp.