Agent Mode: Delegate Complex Tasks
Agent Mode treats AI as a capable worker, not just an answering machine. You describe an outcome, and the AI figures out the steps to get there. It’s the difference between asking for directions and hiring a driver.
What Agent Mode Is For
Agent Mode excels at:
- Multi-step creation: “Create a React component with props, tests, and documentation”
- Research synthesis: “Research the top 5 competitors and create a comparison report”
- Complex generation: “Generate a database schema for an e-commerce platform”
- Workflow execution: “Set up a new Node.js project with TypeScript, ESLint, and Prettier”
- Content creation: “Write a complete blog post about X including outline, body, and SEO metadata”
The common thread: outcomes require multiple steps that AI handles autonomously.
The Agent Mode Mindset
flowchart TD
A[Define Outcome] --> B[Provide Context]
B --> C[Set Constraints]
C --> D[AI Determines Steps]
D --> E[AI Executes]
E --> F[Review & Iterate]
You’re not telling AI how to do something—you’re telling it what to achieve. This requires trusting the AI to make reasonable decisions about implementation.
Agent Mode Patterns
The Builder Pattern
Create something from scratch with multiple components.
Template:
Create a [thing] that includes:
- [Component 1]
- [Component 2]
- [Component 3]
Requirements:
- [Requirement 1]
- [Requirement 2]
Context: [relevant background]
Example:
Create a REST API endpoint for user registration that includes:
- Input validation
- Password hashing
- Database insertion
- Email verification trigger
- Error handling
- Response formatting
Requirements:
- Use Express.js and TypeScript
- Follow REST conventions
- Return appropriate status codes
Context: This is for a SaaS application with PostgreSQL database.
The Researcher Pattern
Gather information and synthesize it into useful output.
Template:
Research [topic] and create a [deliverable].
Include:
- [Aspect 1]
- [Aspect 2]
- [Aspect 3]
Format: [desired structure]
Depth: [level of detail]
Example:
Research authentication strategies for single-page applications
and create a recommendation report.
Include:
- Session-based vs token-based comparison
- Security considerations for each approach
- Implementation complexity
- Recommended libraries/tools
Format: Executive summary + detailed sections
Depth: Technical enough for senior developers to implement
The Generator Pattern
Produce multiple related items at once.
Template:
Generate [number] [things] for [purpose].
Each should include:
- [Element 1]
- [Element 2]
Variation: [how they should differ]
Constraints: [rules to follow]
Example:
Generate 10 email subject lines for our product launch.
Each should:
- Be under 50 characters
- Create urgency or curiosity
- Avoid spam trigger words
Variation: Mix curiosity-driven, benefit-driven, and urgency-driven approaches
Constraints: Our product is a project management tool for remote teams
The Setup Pattern
Configure or initialize something complex.
Template:
Set up [system/project] with the following:
- [Tool/Config 1]
- [Tool/Config 2]
- [Tool/Config 3]
Provide:
- Configuration files
- Installation commands
- Verification steps
Example:
Set up a new React project with:
- TypeScript
- Tailwind CSS
- ESLint + Prettier
- Vitest for testing
- Path aliases configured
Provide:
- All configuration files with comments
- Step-by-step installation commands
- A simple test to verify setup works
The Audit Pattern
Analyze something comprehensively and report findings.
Template:
Audit this [thing] for [criteria].
Check for:
- [Issue type 1]
- [Issue type 2]
- [Issue type 3]
Output:
- Summary of findings
- Prioritized issues
- Recommended fixes
Example:
Audit this React component for performance issues.
Check for:
- Unnecessary re-renders
- Missing memoization
- Expensive operations in render
- State management issues
Output:
- Summary of findings
- Issues ranked by impact
- Specific fixes with code examples
[Component code here]
Agent Mode for Different Domains
Software Development
Create a complete CRUD API for a blog system.
Entities:
- Posts (title, content, author, timestamps, status)
- Comments (content, author, post reference, timestamps)
- Authors (name, email, bio)
Include:
- Route definitions
- Controller functions
- Data validation
- Error handling
- Basic authentication middleware
Stack: Node.js, Express, TypeScript, Prisma
Content Creation
Create a complete content package for announcing our new feature.
Deliverables:
- Blog post (800-1000 words)
- Email to existing customers (300 words)
- 5 social media posts (Twitter/LinkedIn)
- Press release template
Feature: AI-powered meeting summaries that automatically
create action items and send follow-ups
Tone: Professional but approachable
Audience: B2B, project managers and team leads
Data & Analysis
Create a data pipeline specification for our analytics system.
Requirements:
- Ingest data from 3 sources (web events, mobile events, CRM)
- Transform and normalize the data
- Load into data warehouse
- Support incremental updates
Deliverables:
- Architecture diagram (as text description)
- Schema definitions for each stage
- Transformation rules
- Error handling strategy
- Monitoring recommendations
Business Operations
Create a complete onboarding process for new customers.
Include:
- Email sequence (5 emails over 14 days)
- Checklist of onboarding steps
- FAQ document for common questions
- Template for kickoff call agenda
- Success metrics to track
Context: SaaS product for small business accounting
Customer segment: Small business owners with 1-10 employees
Crafting Effective Agent Prompts
Be Outcome-Focused
Process-focused (less effective):
“First create a file, then add imports, then write a function…”
Outcome-focused (more effective):
“Create a utility function that validates and formats phone numbers for US, UK, and Canadian formats.”
Let AI determine the steps.
Provide Sufficient Context
AI needs to understand:
- What you’re building
- Why it exists (use case)
- Where it fits (existing system context)
- Who it’s for (users/audience)
Set Clear Boundaries
Without boundaries, AI makes assumptions. Be explicit about:
- Technologies to use (or avoid)
- Patterns to follow
- Scale/complexity level
- What NOT to include
Request Verification
For complex tasks, ask for verification:
Create X...
Also provide:
- How to test that it works correctly
- What edge cases to watch for
- Any assumptions you made that I should verify
Common Agent Mode Mistakes
1. Too Vague
Vague: “Build me a website” Specific: “Create the homepage for a SaaS landing page with hero section, features grid, testimonial carousel, and pricing table. Use React and Tailwind.”
2. Micromanaging
Micromanaging: “First create a file called utils.js. Then import lodash. Then write a function called processData…” Delegating: “Create a utility module for data processing that handles cleaning, validation, and transformation of our user import CSV files.”
3. Missing Constraints
Unconstrained: “Generate test data for our system” Constrained: “Generate 50 realistic test records for our user database. Include variety in names (diverse backgrounds), emails (mix of providers), and creation dates (spanning last 6 months).“
4. No Success Criteria
Unclear: “Create good documentation” Clear: “Create API documentation that a junior developer could use to implement a client. Include endpoint descriptions, request/response examples, error codes, and authentication requirements.”
When Agent Mode Isn’t Right
Agent Mode isn’t always the answer:
- Simple questions → Use Ask Mode
- Single transformations → Use Edit Mode
- Need step-by-step control → Break into multiple Edit/Ask prompts
- Exploratory work → Use Vision/Strategy Mode first
- Sensitive/critical systems → Review AI output more carefully
Practice Exercise
Create three Agent Mode prompts for tasks you actually need:
1. Builder Task Identify something you need to create that has multiple components. Write a prompt that specifies the outcome, includes all requirements, provides context, and sets clear constraints.
2. Research/Synthesis Task Identify a topic you need to understand comprehensively. Write a prompt that requests research, specifies what to include, and defines the output format.
3. Setup/Configuration Task Identify a setup or configuration task you’ve been putting off. Write a prompt that specifies exactly what needs to be configured and what deliverables you need.
Review: Are your prompts outcome-focused? Do they provide enough context without micromanaging?
Key Takeaways
- Agent Mode delegates complex, multi-step tasks to AI
- Focus on outcomes, not step-by-step instructions
- Provide context: what, why, where, and who
- Set clear boundaries and constraints
- Request verification for complex deliverables
- Know when simpler modes (Ask, Edit) are more appropriate
Next lesson: Plan Mode—creating structured roadmaps for complex goals.