Build

Notebooks

The notebook lab at /notebooks holds 97 runnable TypeScript notebooks. Cells execute in your browser against real models and real framework packages — there is nothing to install.

The tracks

Notebooks are organized into curated tracks in the left sidebar:

  • Framework tracks — LangChain (and LangGraph), LlamaIndex.ts, AWS Strands Agents SDK, OpenAI Agents SDK, Vercel AI SDK, Google ADK, and Multi-Agent Systems with LangGraph.js. Each track teaches the framework's own primitives (agents, tools, handoffs, state machines) in its idiomatic style.
  • Foundations Lab — prompt engineering and multimodal work built on raw fetch, so you see the wire format before any framework hides it.
  • Agentic Evals — eight notebooks from deterministic checks through LLM-as-judge, juries, the RAG triad, trajectory grading, red-teaming, and operational metrics.
  • Failure Modes Lab — one long notebook that reproduces twelve real production failures (runaway loops, prompt injection, RAG poisoning, context rot, cost blow-ups) and ships the fix for each.
  • Standalone Agents, Enterprise Ops & Safety, Real-world Examples — applied patterns: cost routing, semantic chunking, MCP servers, and end-to-end builds.

How cells run

  • Each code cell is a real editor (CodeMirror) — edit the code, then run it with the play button or Shift+Enter. Output, errors, and run duration appear under the cell.
  • Cells execute in your browser. Framework packages (LangChain, LlamaIndex, and the rest) are loaded as version-pinned ES modules from a CDN at run time.
  • Model calls go through an authenticated, OpenAI-compatible proxy scoped to the notebook (/api/notebooks/…/ai/v1 with chat, embeddings, and image endpoints), so notebooks work without putting an API key in the browser.
  • A Reset control restores every cell to its original source and clears outputs — experiments are free.
Notebooks are TypeScript, not Python, on purpose: the same language the platform's exports use, runnable with zero environment setup. The reasoning is written up in the blog post on why we built TypeScript notebooks.

Where notebooks fit

Notebooks teach the code-level view of the same patterns the rest of the platform teaches visually. A typical loop: meet a pattern in the lessons, run it as a graph on the Swarm Canvas, then open the matching notebook to build the same thing in framework code you could ship anywhere.