Mid-level Track Roadmap

AI agents: autonomous

This course builds AI agents in Ruby against the Claude API, without a framework. It defines an agent as a loop where the model chooses the next step and your code runs the requested tools. Lessons cover writing that loop by hand, branching on stop_reason, and designing tool descriptions and schemas. They also cover the Ruby SDK tool runner, approval gates, budgets and prompt injection, plus context editing, compaction and memory for long runs. The final lesson assembles an agent as Rails objects with recorded steps and tests.

What you'll learn

  • ✓Telling a single call, a workflow and an agent apart
  • ✓Writing the agentic loop by hand and branching on stop_reason
  • ✓Designing tool descriptions, schemas and result sizes
  • ✓Gating irreversible actions and limiting the reach of prompt injection
  • ✓Managing long runs with caching, context editing, compaction and memory
  • ✓Recording, testing and evaluating agent runs in Rails
Free preview · Lesson 1 5 min read

What makes a system an agent

Everything in the previous four courses had the same shape: you decide what happens, and the model fills in one step. You retrieve chunks, build a prompt, make one call, parse the answer. The control flow is yours.

Read the full lesson free →

Curriculum

7 lessons
Type to start searching...