Agents
AgileFlow includes 131 specialized agents, each an expert in their domain. Agents can be spawned by the /babysit mentor or invoked directly using the Task tool.
How Agents Work
- Expertise-First: Each agent loads their expertise file to understand your codebase patterns
- Context-Aware: Agents read project docs, status.json, and recent changes
- Context Preservation: Enhanced agents use compact_context configuration to preserve critical knowledge during conversation compaction
- Collaborative: Agents communicate via the message bus and update story status
- Self-Improving: Agents update their expertise after completing work
Compact Context Feature
To maintain focus during long conversations, AgileFlow agents use compact_context configuration to preserve critical information when context is automatically compacted. This ensures agents don't lose important rules, state, and priorities mid-conversation.
How It Works
Each agent has a compact_context configuration with three components:
Priority Level: Determines how aggressively the agent's context is preserved
critical- Always preserved (highest priority agents like mentor, api, ui)high- Preserved in most compactions (important agents)medium- Preserved when possible (standard agents)low- First to be removed (rare, used for advisory agents)
Preserve Rules: Core behavioral rules that must never be lost
- Agent identity and role
- Critical constraints and safety rules
- Must-follow procedures (e.g., "Load expertise first")
- State management requirements
- Coordination protocols
State Fields: Dynamic state that changes during work
- Current story being implemented (US-#### ID)
- Task progress and completion percentage
- Known blockers and dependencies
- Next prioritized actions
- Test/build status
Example Configuration
compact_context:
priority: critical
preserve_rules:
- "LOAD EXPERTISE FIRST: Read packages/cli/src/core/experts/api/expertise.yaml"
- "VERIFY TEST BASELINE: Check test_status before starting"
- "PRIORITIZE AG-UI BLOCKERS: Unblock UI stories waiting on API endpoints"
- "DIFF-FIRST APPROACH: Show edits with confirmation before applying"
state_fields:
- current_story
- endpoints_implemented
- blocked_ui_stories
- test_status_baselineWhen Claude Code compresses context, it preserves these rules and state fields for all agents, ensuring continuity even after multiple rounds of conversation compaction.
Agent Priority Distribution
- Critical (4 agents): mentor, api, ui, database
- High (14 agents): ci, devops, testing, security, documentation, performance, codebase-query, orchestrator, team-coordinator, team-lead, error-analyzer, code-reviewer, multi-expert, browser-qa
- Medium (27 agents): datamigration, qa, accessibility, monitoring, research, adr-writer, analytics, integrations, mobile, design, compliance, refactor, product, readme-updater, rlm-subcore, council-*, *-consensus (9 consensus coordinators)
- Low (66 agents): logic-analyzer-, legal-analyzer-, security-analyzer-, perf-analyzer-, test-analyzer-, completeness-analyzer-, seo-analyzer-, ads-audit-, brainstorm-analyzer-*, epic-planner, api-validator, schema-validator, ui-validator
This tiered approach ensures the most critical agents always maintain focus while others gracefully degrade context when needed.
Agent Categories
Core Development
The primary agents for building features:
| Agent | Description |
|---|---|
mentor | End-to-end implementation guidance from idea to PR |
epic-planner | Break down features into epics and stories |
database | Schema design, migrations, query optimization |
api | Backend services, business logic, data layer |
ui | Frontend components, styling, accessibility |
Quality & Testing
Agents focused on code quality:
| Agent | Description |
|---|---|
testing | Test strategy, patterns, coverage optimization |
qa | Test planning, quality metrics, release readiness |
security | Vulnerability analysis, auth patterns, compliance |
performance | Optimization, profiling, benchmarking |
accessibility | WCAG compliance, assistive technology support |
Infrastructure
Agents for DevOps and operations:
| Agent | Description |
|---|---|
devops | Deployment setup, testing infrastructure, quality checks |
ci | CI/CD workflows, linting, type checking, coverage |
monitoring | Observability, logging, alerting, dashboards |
datamigration | Zero-downtime migrations, data validation, rollback |
Documentation & Research
Agents for knowledge management:
| Agent | Description |
|---|---|
documentation | Technical docs, API docs, user guides |
research | Gathering information, research notes, best practices |
adr-writer | Architecture Decision Records |
readme-updater | Auditing and updating documentation files |
codebase-query | Intelligent codebase search using programmatic queries |
Specialized Domains
Agents for specific use cases:
| Agent | Description |
|---|---|
mobile | React Native, Flutter, cross-platform mobile |
integrations | Third-party APIs, webhooks, payment processors |
analytics | Event tracking, metrics dashboards, data analysis |
compliance | GDPR, HIPAA, SOC2, audit trails |
design | UI/UX design systems, visual design, patterns |
Meta Agents
Agents that coordinate other agents:
| Agent | Description |
|---|---|
multi-expert | Deploys 3-5 experts on the same problem for high-confidence answers |
orchestrator | Multi-expert orchestrator that coordinates parallel domain experts |
team-coordinator | Orchestrates builder+validator pairs for systematic verification |
team-lead | Native Agent Teams lead that coordinates teammate sessions in delegate mode |
product | Requirements analysis, user stories, acceptance criteria |
refactor | Technical debt cleanup, legacy code modernization |
Security Analysis
Agents for automated security vulnerability detection:
| Agent | Description |
|---|---|
security-analyzer-injection | SQL injection, command injection, XSS, template injection, path traversal |
security-analyzer-auth | Authentication weaknesses, password handling, session management, token security |
security-analyzer-input | Input validation, sanitization, type coercion attacks, prototype pollution |
security-analyzer-secrets | Hardcoded secrets, API keys in code, credential exposure, insecure storage |
security-analyzer-deps | Known vulnerable dependencies, outdated packages, supply chain risks |
security-analyzer-api | API security, rate limiting, CORS misconfiguration, data exposure |
security-analyzer-authz | Authorization flaws, IDOR, privilege escalation, access control gaps |
security-analyzer-infra | Infrastructure security, headers, TLS configuration, CSP, HSTS |
security-consensus | Consensus coordinator for security audit findings |
Logic Analysis
Agents for automated code analysis and bug detection:
| Agent | Description |
|---|---|
logic-analyzer-edge | Edge case detection for boundary conditions and off-by-one errors |
logic-analyzer-flow | Control flow analysis for dead code and unreachable branches |
logic-analyzer-invariant | State consistency analysis for invariant violations |
logic-analyzer-race | Race condition and concurrency issue detection |
logic-analyzer-type | Type safety analysis for coercion and null issues |
logic-consensus | Consensus coordinator for logic audit voting |
Legal Analysis
Agents for automated legal risk analysis and compliance auditing:
| Agent | Description |
|---|---|
legal-analyzer-privacy | Privacy and data protection (GDPR, CCPA, cookie consent) |
legal-analyzer-terms | Terms of service, disclaimers, and legal documents |
legal-analyzer-a11y | Accessibility compliance (ADA, WCAG, Section 508) |
legal-analyzer-licensing | Open source license compliance and IP risks |
legal-analyzer-consumer | Consumer protection, dark patterns, FTC/COPPA |
legal-analyzer-security | Security legal obligations (breach notification, PCI-DSS) |
legal-analyzer-ai | AI compliance (EU AI Act, FTC disclosure, bias) |
legal-analyzer-content | Content moderation, DMCA, Digital Services Act |
legal-analyzer-international | International compliance (LGPD, PIPL, data localization) |
legal-consensus | Consensus coordinator for legal audit findings |
Performance Analysis
Agents for automated performance bottleneck detection:
| Agent | Description |
|---|---|
perf-analyzer-queries | N+1 queries, unindexed lookups, missing pagination, ORM anti-patterns |
perf-analyzer-rendering | Unnecessary re-renders, missing memoization, expensive render computations |
perf-analyzer-memory | Memory leaks, event listener cleanup, closure captures, large object retention |
perf-analyzer-bundle | Large imports, missing tree-shaking, missing dynamic imports, duplicate dependencies |
perf-analyzer-compute | Sync I/O on main thread, CPU-intensive loops, blocking operations |
perf-analyzer-network | HTTP waterfall, missing request batching, no compression, large payloads |
perf-analyzer-caching | Missing memoization, redundant computations, no HTTP cache headers |
perf-analyzer-assets | Unoptimized images, render-blocking resources, missing lazy loading |
perf-consensus | Consensus coordinator for performance audit findings |
Test Analysis
Agents for automated test quality analysis:
| Agent | Description |
|---|---|
test-analyzer-coverage | Untested critical paths, missing error path tests, low branch coverage |
test-analyzer-fragility | Timing-dependent tests, order-dependent tests, flaky indicators |
test-analyzer-mocking | Over-mocking, mock leakage, mocking what you own, testing mocks not code |
test-analyzer-assertions | Weak assertions, missing negative tests, snapshot overuse |
test-analyzer-structure | Missing describe/it nesting, unclear test names, duplication |
test-analyzer-integration | Missing API endpoint tests, no E2E coverage, unit-only suites |
test-analyzer-maintenance | Dead tests, outdated assertions, tests passing for wrong reasons |
test-analyzer-patterns | Testing private methods, deep mock chains, oversized snapshots |
test-consensus | Consensus coordinator for test audit findings |
SEO Analysis
Agents for automated search engine optimization audit and improvements:
| Agent | Description |
|---|---|
seo-analyzer-technical | Technical SEO: site structure, crawlability, indexation, XML sitemaps, robots.txt |
seo-analyzer-content | On-page content optimization: keywords, meta tags, headings, keyword density |
seo-analyzer-images | Image optimization: alt text, compression, format, responsive images, lazy loading |
seo-analyzer-performance | Performance impact on SEO: Core Web Vitals, page speed, rendering, JavaScript |
seo-analyzer-schema | Structured data: schema.org markup, rich snippets, SERP features |
seo-analyzer-sitemap | Sitemap optimization: coverage, freshness, priority, URL patterns |
seo-consensus | Consensus coordinator for SEO audit findings |
Brainstorm Analysis
Agents for analyzing product opportunities and feature ideation:
| Agent | Description |
|---|---|
brainstorm-analyzer-features | Feature opportunity analysis: competitive gaps, user needs, differentiation |
brainstorm-analyzer-ux | User experience improvements: usability, conversion, retention opportunities |
brainstorm-analyzer-market | Market analysis: TAM expansion, segment opportunities, pricing models |
brainstorm-analyzer-growth | Growth opportunities: viral loops, engagement metrics, scaling strategies |
brainstorm-analyzer-integration | Integration opportunities: partner networks, API ecosystems, third-party services |
brainstorm-consensus | Consensus coordinator for brainstorm analysis findings |
Advertising Analysis
Agents for automated paid advertising audit and optimization:
| Agent | Description |
|---|---|
ads-audit-google | Google Ads auditor with 74 checks across tracking, spend, structure, keywords, ads, settings |
ads-audit-meta | Meta/Facebook auditor with 46 checks for Pixel/CAPI, creative, structure, audience |
ads-audit-budget | Budget and bidding strategy auditor with 24 checks across allocation, bidding, scaling |
ads-audit-creative | Creative quality auditor with 21 checks for copy, video, platform specs, testing |
ads-audit-tracking | Conversion tracking auditor with 7 critical checks for pixels, tags, attribution |
ads-audit-compliance | Compliance and benchmarks auditor with 18 checks for policy, regulations, performance |
ads-consensus | Consensus coordinator for advertising audit - aggregates findings into Ads Health Score |
Validation
Read-only validator agents that verify implementations:
| Agent | Description |
|---|---|
api-validator | API contract validation and quality gates |
schema-validator | Database migration and schema validation |
ui-validator | UI accessibility and design system validation |
AI Council
Three-perspective strategic decision making:
| Agent | Description |
|---|---|
council-advocate | Devil's Advocate - critical examination of risks and blind spots |
council-analyst | Neutral Analyst - objective trade-off evaluation |
council-optimist | Optimist Strategist - identifies opportunities and success paths |
Completeness Analysis
Agents for detecting forgotten features, dead code, and incomplete implementations:
| Agent | Description |
|---|---|
completeness-analyzer-api | Frontend-backend endpoint mismatches, missing API handlers, orphaned endpoints |
completeness-analyzer-conditional | Dead feature flags, hardcoded false conditions, unreachable code blocks |
completeness-analyzer-handlers | Empty onClick/onSubmit/onChange, console-only handlers, noop callbacks |
completeness-analyzer-imports | Dead exports, orphaned source files, unused dependencies, dead barrel re-exports |
completeness-analyzer-routes | Placeholder hrefs, missing route targets, orphaned navigation items |
completeness-analyzer-state | Unused useState/useReducer, orphaned context providers, dead store slices |
completeness-analyzer-stubs | TODO/FIXME comments, empty function bodies, hardcoded mock data, placeholder text |
completeness-consensus | Consensus coordinator for completeness audit findings |
Debugging & Analysis
Agents for debugging and problem diagnosis:
| Agent | Description |
|---|---|
error-analyzer | Error diagnosis, stack trace analysis, root cause identification |
browser-qa | Agentic browser automation for exploratory UI testing with Playwright |
code-reviewer | Comprehensive code review with security and performance analysis |
rlm-subcore | Document search sub-agent for RLM pattern (cost-optimized) |
Spawning Agents
Via /babysit (Recommended)
The /babysit mentor automatically detects which agent is needed:
/agileflow:babysit
# Then describe your task - babysit will spawn the right agentDirect Spawning
You can also spawn agents directly using the Task tool:
Task(
description: "Design user sessions schema",
prompt: "Create a sessions table to track user logins with proper indexes",
subagent_type: "agileflow-database"
)Parallel Agents
For full-stack features, spawn multiple agents simultaneously:
# API work
Task(subagent_type: "agileflow-api", run_in_background: true, ...)
# UI work (runs in parallel)
Task(subagent_type: "agileflow-ui", run_in_background: true, ...)Agent Communication
Agents coordinate through docs/09-agents/:
Status Updates
Agents update status.json as they work:
{
"stories": {
"US-0042": {
"status": "in-progress",
"owner": "AG-DATABASE",
"summary": "Created sessions table with indexes"
}
}
}Message Bus
Agents log coordination messages:
{"timestamp": "2025-12-24T10:00:00Z", "type": "assign", "story": "US-0042", "owner": "AG-DATABASE"}
{"timestamp": "2025-12-24T11:00:00Z", "type": "handoff", "story": "US-0042", "from": "AG-DATABASE", "to": "AG-API"}Best Practices
- Let babysit choose: The mentor knows which agent fits best
- Provide context: Tell agents about existing patterns in your codebase
- Review updates: Check status.json changes agents make
- Use multi-expert for uncertainty: When you need high confidence, deploy multiple experts
On This Page
AgentsHow Agents WorkCompact Context FeatureHow It WorksExample ConfigurationAgent Priority DistributionAgent CategoriesCore DevelopmentQuality & TestingInfrastructureDocumentation & ResearchSpecialized DomainsMeta AgentsSecurity AnalysisLogic AnalysisLegal AnalysisPerformance AnalysisTest AnalysisSEO AnalysisBrainstorm AnalysisAdvertising AnalysisValidationAI CouncilCompleteness AnalysisDebugging & AnalysisSpawning AgentsVia /babysit (Recommended)Direct SpawningParallel AgentsAgent CommunicationStatus UpdatesMessage BusBest Practices