Docs

/

Guides

Academy

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 02

Build with FML

Write plans that fetch data, reason over it, and return structured output.

02

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.

Read guide
03

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.

Read guide
04

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.

Read guide
05

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.

Read guide
06

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.

Read guide
07

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.

Read guide
08

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.

Read guide
09

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.

Read guide