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.
10
Lessons
3
Tracks
~68
Minutes
Track 01
Set up your environment
Get the open-source Frags runtime running on your own machine.
Track 02
Build with FML
Write plans that fetch data, reason over it, and return structured output.
6 min read
Build a hello-world plan
Write your first FML plan 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 plan 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 plan — 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 plan
Order, gate, and fan out sessions with after, target, expect, and iterate — the declarative flow controls Frags runs for you.
Track 03
Run it in production
Schedule plans on a cadence and let the platform run, deliver, and observe them.