The Agentic Pipeline
Agents read. Code acts. You approve what goes out.
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
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
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
Sections in this exercise.
- 01What You'll Build
- 02What You'll Need
- 03The Boring Work
- 04Building Block One: The Intake Agent
- 05Building Block Two: The Triage Agent
- 06The Hostile Entry
- 07Wiring the Pipe
- 08The Summary Report
- 09Connecting to GitHub
- 10Set It and Forget It
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.