# 5 Agent PATTERNS to SIMPLIFY Your Agentic Coding (Claude Code, Gemini CLI, MCP)

Source: https://www.youtube.com/watch?v=XojxD7hfaD4
Recap page: https://rapidrecap.app/video/XojxD7hfaD4
Generated: 2025-08-28T10:27:18.99+00:00

---
## Quick Overview

The video explores five key agent interaction patterns for simplifying agentic coding: Ad Hoc Prompts, Reusable Prompts, Sub-Agent Pattern, MCP Wrapper, and Full Application, with a focus on choosing the right pattern based on complexity and desired outcomes, emphasizing a 'start simple, scale when needed' approach.

**Key Points:**
- The video outlines five agent interaction patterns: Ad Hoc Prompts, Reusable Prompt, Sub-Agent Pattern, MCP Wrapper, and Full Application.
- Ad Hoc Prompts are ideal for first encounters with a problem, offering a simple, low-friction solution.
- Reusable Prompts are beneficial when a pattern is identified after 3+ repetitions, allowing for codification into custom commands.
- The Sub-Agent Pattern is used for specialization and parallel execution when complex tasks require focused expertise.
- MCP Wrappers are employed for agent interactions that need to expose agents to multiple services or unique assets, providing a single integration point.
- Full Application integration is the most comprehensive pattern, offering complete control and infinite extensibility, suitable for long-term vision or complex projects.
- The overarching principle is to 'start simple and scale when needed,' avoiding over-engineering and allowing patterns to emerge naturally from usage.

![Screenshot at 00:00: A person's hands typing on a laptop, with the text 'If you're an engineer using the BEST tool for the job, you know this as FACT' overlaid on the screen, setting the context for leveraging tools effectively.](https://ss.rapidrecap.app/screens/XojxD7hfaD4/00-00-00.png)

**Context:** This video serves as a tutorial for engineers working with AI agents, specifically focusing on how to structure interactions between agents and their environment. It introduces five distinct patterns, progressing from simple, immediate solutions to more complex, integrated systems. The content emphasizes a pragmatic approach to agent development, encouraging users to choose the most appropriate pattern based on the problem's complexity and the desired level of scalability and control.

## Detailed Analysis

The video presents five key patterns for architecting AI agent interactions, advocating for a 'start simple, scale when needed' philosophy. It begins with Ad Hoc Prompts, the most basic approach, suitable for initial problem-solving with no setup or friction. When repetition is observed (3+ times), the Reusable Prompt pattern emerges, allowing for the creation of codified commands, essentially turning prompts into reusable assets. For tasks requiring specialized expertise or parallel execution, the Sub-Agent Pattern is recommended, allowing the primary agent to delegate work to specialized sub-agents. When an agent needs to interact with multiple external services or unique assets, the MCP Wrapper pattern is introduced, providing a unified integration point. Finally, for complete integration, extensive customization, and long-term vision, the Full Application pattern is presented, offering CLUI/MCP/API/UI exposure for infinite extensibility. The video concludes with a pattern decision framework, guiding users to choose the appropriate pattern based on the problem's complexity and computational needs, and advises against premature optimization or building before validation.

### Pattern 1

- Ad Hoc Prompts: Start simple, fire off prompts to solve immediate problems, no setup, no friction
- WHEN: First encounter

### Pattern 2

- Reusable Prompt: Spot a pattern? After 3x repetition, codify it. Create custom slash commands
- WHEN: 3+ repetitions

### Pattern 3

- Sub-Agent Pattern: Need specialization? Deploy sub-agents for focused expertise and parallel execution
- WHEN: Specialize + Parallelize

### Pattern 4

- MCP Wrapper: Need agent interactions, need to expose agent to unique assets, need to integrate with multiple services
- WHEN: Expose agent to services OR expose agent to unique assets

### Pattern 5

- Full Application: Complete integration. Full app with CLI/MCP/API/UI exposure, infinite extensibility
- WHEN: Complete control + Customizability + Long-term vision

### Pattern Decision Framework

- Keep it simple, scale when needed
- DO THIS: Solve immediate problem, Recognize repetition patterns, Scale incrementally
- AVOID THIS: Pre-optimizing architecture, Building before validating, Complex first solutions

![Screenshot at 00:00: An engineer typing on a laptop, symbolizing the use of tools and the importance of choosing the right ones.](https://ss.rapidrecap.app/screens/XojxD7hfaD4/00-00-00.png)
![Screenshot at 00:25: Title slide showing 'AGENT INTERACTION PATTERNS' with a graphic illustrating agent connections.](https://ss.rapidrecap.app/screens/XojxD7hfaD4/00-00-25.png)
![Screenshot at 01:08: The setup scenario: a 'cracked GenAI engineer' taking on more responsibilities.](https://ss.rapidrecap.app/screens/XojxD7hfaD4/00-01-08.png)
![Screenshot at 01:36: Key knowledge points: 'Age of Agents', 'Agents = exponential leverage', 'Claude Code = best agent'.](https://ss.rapidrecap.app/screens/XojxD7hfaD4/00-01-36.png)
![Screenshot at 02:07: Diagram illustrating how to start designing a system using agents and various tools.](https://ss.rapidrecap.app/screens/XojxD7hfaD4/00-02-07.png)
![Screenshot at 02:47: The realization that one has 'no idea' about the optimal agent interaction pattern.](https://ss.rapidrecap.app/screens/XojxD7hfaD4/00-02-47.png)
![Screenshot at 03:13: Visual representation of the "Our Big Bet": a majority of AI's economic value will come from AI Agents.](https://ss.rapidrecap.app/screens/XojxD7hfaD4/00-03-13.png)
![Screenshot at 03:33: The core question: "What's the best interaction patterns you can use to QUICKLY scale your engineering impact with Agents like Claude Code, Gemini CLI, Codex CLI and \<The Next Big Agent\>?"](https://ss.rapidrecap.app/screens/XojxD7hfaD4/00-03-33.png)
![Screenshot at 03:55: Introduction to Pattern 1: Iterative HIL \(Human-In-the-Loop\), showing the flow from Agent to Replicate MCP to Outcome.](https://ss.rapidrecap.app/screens/XojxD7hfaD4/00-03-55.png)
![Screenshot at 04:30: Pros and Cons of the Iterative HIL pattern, highlighting direct human oversight vs. human bottleneck.](https://ss.rapidrecap.app/screens/XojxD7hfaD4/00-04-30.png)
