buttercup.sh

em dashes welcome — lessons · github · feedback · blocks.ai

NOT READY
 ┌────────────────────────────────────────────────┐
 │  B U T T E R C U P                             │
 │  a new agent lesson weekly                     │
 └────────────────────────────────────────────────┘

Em dashes welcome — a free, week-by-week course on building AI Agents. Each lesson is one idea, the code that makes it work, and an exercise you run right here. They build from a bare completion call up to a working agent: the tool-call loop, tool definitions, context and compaction, screenshots, browser control, planning, and the failure modes nobody warns you about. Miss a week and the archive keeps it.

No backend, no signup to play: open and paste an API key. It stays in this browser's localStorage; model traffic goes straight from this tab to the vendor you pick.

Try it now: “scaffold a blocks.ai research agent, then run it”. What it builds lands in the . /help lists the commands; /undo rewinds the files and the context.

workspace /

Drag files or a folder anywhere onto the page to put them here — text only, and /undo takes an import back out.

  • empty workspace

tool definitions

Handed to the model verbatim on every turn. Each one is a plain JS function in js/tools.js — no server touches them. Switch one off and the model never sees it.

    agent preview

    sandboxed iframe

    Nothing mounted. The preview tool points this frame at a file in the workspace; run_agent executes one and reports back. Once something is mounted, the model can screenshot it and navigate it — click, type, scroll — and SEND TO MODEL attaches a picture of it to your next prompt. The page cannot read inside the sandbox, so the frame photographs and operates itself and posts the result back out.

    completion backend

    provider
    harness

    SAVE checks the key against the vendor's model list — no tokens spent — and the lamp in the title bar turns READY only when the vendor accepts it. base url appears for OpenAI-compatible backends, so any gateway that speaks /chat/completions works without a code change.

    When the last request's token count crosses compact at, the conversation is summarized into one handover note and the session continues from it — workspace files are never touched, and /undo restores the full context. Set it below your model's window with room for one more turn.

    A key in localStorage is readable by anything that can run script in this origin. Use a scoped, revocable key, and prefer a key you don't mind rotating.