Skip to main content
Completions

Claude Code and agents · Coming soon

Write the agent loop yourself instead of fighting a framework

You tried an agent framework and spent more time digging through its layers than building. You write an agent in plain Python or TypeScript: a model call, tools, a loop and stopping rules, in a few hundred lines with a log of every step. You finish knowing what any framework does for you, and when you need one.

The course: Build an AI agent without a framework

$19 $39 early-bird price

This course is being built now. Join the early-access list to reserve the early-bird price and shape what it covers.

Joining the list is free. You only pay if you buy at launch, at the early-bird price.

If this sounds like your week

  • Changing one small detail means tracing it through layers of someone else’s abstractions.
  • When the agent misbehaves, you cannot see the exact prompt and tool result that caused it.
  • The agent stops before the task is done, or keeps going when it should stop, and you cannot see why.
  • A new framework appears every month, and you cannot judge any of them without knowing what they wrap.

What you do now, and where it stops working

Today you follow a framework’s quick-start, then read its source when you need something it did not anticipate. Or you drop to the raw API and stitch a loop together from blog snippets. Both run, but neither leaves you with a design you understand end to end.

What changes after the course

  • A working agent loop that calls a model, runs your tools and stops on rules you wrote.
  • Three tools of your own, with descriptions the model follows and errors it can recover from.
  • A run log of each prompt, tool call and result, so you can see why the agent did what it did.
  • A short checklist for deciding whether a framework would help on your next project.

How it works: The plain loop

  1. 1Call the model once and read the raw request and response.
  2. 2Add one tool: describe it, run it when the model asks, and return the result.
  3. 3Wrap it in a loop with explicit stopping rules: task done, step limit or error.
  4. 4Log every step to a file and read runs in the log viewer.
  5. 5Add two more tools, then compare your code with what a framework would give you.

What you get

  • Agent source code in Python and TypeScript, under a few hundred lines
  • Tool templates with error handling
  • Run log viewer
  • Video walkthrough of the agent built line by line

This is for you if

  • You can write a little Python or TypeScript.
  • You tried an agent framework and want to know what it was doing.
  • You judge agent proposals at work and want to have built one yourself.

Skip it if

  • You need a production multi-agent system this month. This course builds one small agent you understand.
  • You want a LangChain or other framework tutorial; this course uses none.
  • You have never written code. Start with Claude Code for non-engineers.

Before you join

Why not just use LangChain or another framework?
You may still, and the course ends with a checklist for when one helps. Anthropic’s own guidance on building agents suggests starting with the model API directly. Writing the loop first means you know what a framework does for you before you adopt one.
Is a few hundred lines realistic for a useful agent?
For one agent with a handful of tools, yes: the core is a model call, tool dispatch and a loop. What grows is error handling, logging and stopping rules, which is where the course spends its time. Jay West runs agent loops with review gates in his own daily work, and those parts are where they need the most care.
Is my coding good enough?
If you can write a function, read JSON and run a script, you can follow it. The code is short on purpose, and the walkthrough explains every line.
Do I need to pay for a model API?
Yes. You need an API key from a model provider with some credit on it, which the course price does not include. The exercises are kept short, and the course shows you where to check your usage before you start.
Will this be out of date when the next model ships?
The loop does not depend on a model version: call the model, act on tool requests, check whether to stop, repeat. The model name in the code is one setting you change.

Reserve the $19 early-bird price

Rather have it built for you? Describe the project and the same work can be done for your team.

All courses