"A jack of all trades is a master of none, but oftentimes better than a master of one."
Agent X, Versatile AI Agent
Chapter Overview
While the preceding chapters cover general agent principles, specialized agents are purpose-built for specific domains and tasks. This chapter surveys the most impactful agent specializations: code generation agents (Claude Code, Cursor, Devin), browser and web agents (Playwright MCP, Stagehand), computer use agents (Anthropic Computer Use, screenshot-based reasoning), and research and data analysis agents.
The chapter also covers domain-specific agent design patterns for healthcare, legal, finance, and customer service, where compliance constraints, safety requirements, and domain knowledge integration demand careful architectural choices. It concludes with a detailed examination of AI-generated code quality, security vulnerabilities, and trust calibration strategies for human-AI collaboration in software engineering.
While Chapters 22 through 24 cover general agent principles, this chapter focuses on domain-specific agent types: coding assistants, research agents, data analysis agents, and more. Understanding specialization patterns helps you design agents that excel at specific tasks rather than being mediocre generalists.
Learning Objectives
- Design code generation agent architectures using self-debugging loops, test-driven development, and SWE-bench evaluation patterns
- Build browser and web agents using Playwright MCP, Stagehand, and WebArena-style task automation
- Implement computer use agents with screenshot-based reasoning, GUI automation, and desktop interaction using Anthropic Computer Use
- Construct research and data analysis agents for literature review, scientific discovery workflows, and data pipeline automation
- Apply domain-specific agent design patterns for healthcare, legal, finance, and customer service with appropriate compliance constraints
- Evaluate AI-generated code quality using static analysis tools (CodeQL, Semgrep, Bandit) and establish trust calibration for code review
Prerequisites
- Chapter 22: AI Agent Foundations (agent architectures, memory, planning)
- Chapter 23: Tool Use, Function Calling & Protocols (function calling, MCP, tool design)
- Chapter 10: LLM APIs (chat completions, streaming, structured outputs)
- Experience building at least one simple agent or tool-calling pipeline
Sections
- 25.1 Code Generation Agents Claude Code, Cursor, Devin, Windsurf, SWE-bench patterns, self-debugging loops, test-driven agent development.
- 25.2 Browser & Web Agents Playwright MCP, browser-use, Stagehand, WebArena patterns, web scraping agents, and form automation.
- 25.3 Computer Use Agents Anthropic computer use, OS-World, GUI automation, screenshot-based reasoning, and desktop agent architectures.
- 25.4 Research & Data Analysis Agents Deep research agents, data pipeline automation, scientific discovery workflows, literature review agents, and analytical reasoning.
- 25.5 Domain-Specific Agent Design Patterns Healthcare, legal, finance, and customer service agent architectures. Compliance constraints, domain knowledge integration, and safety requirements.
- 25.6 SWE-bench and Agentic Software Engineering Evaluation SWE-bench, SWE-bench Verified, SWE-bench Live, evaluation methodology, agent scaffold design, pass@1, contamination risks, and building a minimal coding agent.
- 25.7 Code/Work Workflows and Agentic Coding Systems Claude Code, Codex, Cursor, Devin, Copilot Workspace: agentic coding architectures, CLAUDE.md conventions, background agents, comparison framework, and best practices.
- 25.8 Analysis and Quality of AI-Generated Code Security vulnerabilities in LLM-generated code, code hallucination, functional bugs, automated testing and verification, static analysis integration (CodeQL, Semgrep, Bandit), human review patterns, and trust calibration.
What's Next?
In the next chapter, Chapter 26: Agent Safety and Production, we address the safety, reliability, and observability requirements for deploying agents in production.
