← All exercises
Exercise 08 / 10

The Agentic Pipeline

Agents read. Code acts. You approve what goes out.

DurationAbout an hour
DifficultyIntermediate–Advanced
PrerequisitesExercises 01–07 — Claude Code installed and signed in, gh authenticated, and a (throwaway) GitHub repository.
The Agentic Pipeline
Fig. 08Hands-On Guide
Introduction

Overview

You've been the one typing prompts. In every chapter so far, you started the conversation. You were the driver. The agent was the engine — but it only moved when you turned the key. This chapter is about removing yourself from the loop — or most of it.

You'll build a pipeline of tool-less, schema-constrained headless agents: raw feedback goes in, triaged issue drafts and a weekly report come out. A plain script files the issues on GitHub only after you've reviewed them — and a hostile feedback entry shows you why the agents that read strangers' text get no tools.

Don't rely on the model to resist. Arrange things so that a model that's been fooled can't do much harm: the agents that read untrusted text have no privileges, and the code that has privileges never takes instructions from that text.

— from the exercise
What you'll build

By the end of this exercise.

  • An intake agent that turns messy feedback into schema-validated JSON — with no tools at all
  • A triage agent that assigns category, priority, and labels from a fixed list
  • A summary agent that writes a weekly Markdown report
  • A pipeline script that proposes issues but never writes to GitHub
  • A plain create-issues.sh that re-validates the drafts and files them after your review
  • A cron job, or a GitHub Actions workflow whose issue-filing job waits for your approval
  • Hard limits everywhere: --max-budget-usd and --max-turns per call, an input cap, timeouts, and a kill switch
Key concepts

Terms you'll learn.

Headless mode
claude -p runs once, prints the result, and exits — composable with pipes
Structured output
--json-schema forces the answer to match a schema, validated before you use it
Tool-less agent
--tools "" — it can read its input and answer, nothing else
Prompt injection
Text in the input that tries to give the agent orders — like feedback entry 6
Lethal trifecta
Private data + untrusted content + a way to send data out — never all in one session
Triage
Sorting incoming items by type (bug, feature, praise) and priority (high, medium, low)
Required reviewers
A GitHub environment setting that makes a job wait for a human's approval
What's covered

Sections in this exercise.

  1. 01What You'll Build
  2. 02What You'll Need
  3. 03The Boring Work
  4. 04Building Block One: The Intake Agent
  5. 05Building Block Two: The Triage Agent
  6. 06The Hostile Entry
  7. 07Wiring the Pipe
  8. 08The Summary Report
  9. 09Connecting to GitHub
  10. 10Set It and Forget It
What just happened

You built an automated pipeline from shell scripts and AI agents — and decided what each part may touch. The agents that read strangers' text get no tools; the code that writes to GitHub gets no agent; and nothing is published until you've read it. You're no longer doing the work. You're designing the system that does it, including its limits.