Akshay Parkhi's Weblog

Subscribe

Agentic Engineering Patterns — Key Takeaways from Simon Willison’s Guide

8th March 2026

Simon Willison recently published an excellent guide on agentic engineering patterns — practical lessons from building with AI coding agents. Here are the key takeaways that matter most for AI agent developers, distilled from his full guide.


The Core Insight

Writing code is cheap now, but bad code is still expensive. The guide isn’t about generating more code faster — it’s about building guardrails for quality into your agent workflows.


Key Patterns Worth Adopting

1. Red/Green TDD as a Default Agent Pattern

The prompt “Use red/green TDD” is a concise way to get dramatically better results. Have your agent write tests first, confirm they fail, then implement. This prevents hallucinated or dead code and builds a regression suite. Consider baking this into your agent’s default workflow.

2. “First Run the Tests” as a Session Opener

Starting every agent session with “first run the tests” does three things: teaches the agent the test harness exists, gives it a sense of project size, and puts it in a testing mindset. A great pattern to embed in your agent’s initialization.

3. Agentic Manual Testing

Unit tests aren’t enough. Have agents test their own work manually — using curl for APIs, python -c for quick checks, and browser automation tools (Playwright, Rodney, agent-browser) for web UIs. This catches bugs that automated tests miss.

4. Hoard Working Examples

Build a personal library of working code snippets, proofs-of-concept, and tools. These become powerful inputs for agents — you can tell an agent to combine two existing working examples into something new. The recombination pattern is extremely effective.

5. Linear Walkthroughs to Understand Agent-Written Code

When you vibe-code a project, use agents to generate structured walkthroughs of the codebase. Tools like Showboat capture the agent’s exploration with real commands and outputs (not hallucinated summaries). This pays down cognitive debt.

6. Interactive Explanations

For complex algorithms, have agents build animated/interactive visualizations. This is a powerful way to truly understand what your agent built rather than treating it as a black box.

7. Never Inflict Unreviewed Code on Collaborators

The #1 anti-pattern: dumping agent-generated PRs without reviewing them yourself. Include evidence of testing (screenshots, manual test notes, small focused PRs).

8. Bias Toward Action — Prompt Anyway

When your instinct says “not worth the time,” fire off an async agent session anyway. The worst case is you check back and discard the result.


Most Actionable for Agent Development

PatternHow to Apply It
Red/green TDD built-inMake your agent default to test-first development
“First run the tests” initializationHave your agent discover and run existing tests at session start
Manual verificationIntegrate curl, python -c, and browser automation — not just unit tests
Hoarding + recombinationBuild a searchable library of working examples your agent can reference
Browser automationIntegrate Playwright/Rodney for agents building web UIs — visual verification catches what unit tests miss
Linear walkthroughsUse agents to document agent-written code with real commands and outputs, not summaries
Small focused PRsBreak agent work into reviewable chunks with evidence of testing

Bottom Line

The biggest shift is treating agents not as code generators but as junior developers who need process. Give them TDD, give them test suites to run, give them manual verification tools, and review their work before shipping. The patterns that make human teams productive make agent teams productive too.

Read the full guide: simonwillison.net/guides

This is Agentic Engineering Patterns — Key Takeaways from Simon Willison’s Guide by Akshay Parkhi, posted on 8th March 2026.

Next: OpenClaw / ClawdBot Architecture — How a Telegram AI Bot Actually Works

Previous: How AWS Strands Hooks Work