Agent learning guide
Skill Lemirq/agent-best-practices/skills/agent-learning-guide
Master guide for learning how to build AI agents -- provides a structured learning path through 9 agent-building skills covering prompting, memory, architecture, workflows, RAG, context engineering, multi-agent systems, evals, and security. Use when the user is starting to learn about building AI agents, wants to know which skill to read next, needs an overview of all agent-building topics, or asks "where do I start", "what should I learn first", "how do I build an agent", "agent best practices", "learning path", or "guide me through agent development".From its SKILL.md
npx -y skills add Lemirq/agent-best-practices --skill agent-learning-guideAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
9.6 KB, as published. Nobody here has run it
Agent Building: Learning Guide
This guide maps out 9 skills that teach you how to build production AI agents. Each skill is self-contained but they build on each other. Follow the learning path below for the smoothest progression.
Learning Path
FOUNDATION (start here)
1. agent-prompting-patterns -- How to talk to LLMs effectively
2. agent-memory-design -- How agents remember and use tools
3. agent-architecture-design -- How to plan and structure agents
INTERMEDIATE (build real systems)
4. agent-workflow-graphs -- How to add structure and control flow
5. agent-context-engineering -- How to manage what the agent sees
6. agent-rag-pipeline -- How to give agents external knowledge
ADVANCED (scale and harden)
7. agent-multi-agent-design -- How to coordinate multiple agents
8. agent-eval-workflow -- How to measure and improve quality
9. agent-security-patterns -- How to secure agents for production
Skill Map
Level 1: Foundation
These three skills cover the fundamentals. Read them in order before anything else.
1. agent-prompting-patterns
What you'll learn: System prompt design, structured output with schemas, few-shot/many-shot examples, agent UX patterns (confirmations, streaming, transparency).
Key takeaway: A well-crafted prompt transforms a general-purpose LLM into a specialized agent. Structured output makes agent responses reliable and parseable.
Prerequisites: None. Start here.
Read next: agent-memory-design
2. agent-memory-design
What you'll learn: Three types of memory (short-term, long-term, working), semantic recall with embeddings, tool design, MCP protocol for connecting agents to external services.
Key takeaway: Memory transforms a stateless LLM into a persistent agent. Tools are how agents interact with the outside world. MCP standardizes tool connections.
Prerequisites: agent-prompting-patterns
Read next: agent-architecture-design
3. agent-architecture-design
What you'll learn: Whiteboarding agent capabilities, evolving architecture iteratively (don't design the final system upfront), dynamic agents that adapt at runtime, human-in-the-loop patterns.
Key takeaway: Start with one agent that solves one burning problem. Split into specialists only when needed. Discover the architecture by solving problems, not by planning upfront.
Prerequisites: agent-prompting-patterns, agent-memory-design
Read next: agent-workflow-graphs
Level 2: Intermediate
These three skills teach you how to build robust, real-world agent systems. They can be read in any order, but the sequence below flows most naturally.
4. agent-workflow-graphs
What you'll learn: Graph-based workflows (branching, chaining, merging, conditions), suspend/resume for human approval, streaming updates to users, observability with OpenTelemetry tracing.
Key takeaway: When agents have too much freedom, use workflow graphs to constrain them. The LLM makes a few focused decisions instead of one big decision. Streaming is critical for UX.
Prerequisites: agent-architecture-design (understanding when to add structure)
Read next: agent-context-engineering
5. agent-context-engineering
What you'll learn: When to parallelize (and when not to), sharing context between subagents, five context failure modes (poisoning, distraction, confusion, clash, rot), compression strategies, feeding errors back for self-correction.
Key takeaway: Every token in context influences behavior. Large context windows don't solve quality problems. Compress proactively and protect critical information from summarization.
Prerequisites: agent-architecture-design (subagent concepts), agent-workflow-graphs (multi-step processes)
Read next: agent-rag-pipeline
6. agent-rag-pipeline
What you'll learn: The full RAG pipeline (chunking, embedding, vector DBs, querying, reranking, synthesis), vector database selection, and simpler alternatives (agentic RAG, ReAG, full context loading).
Key takeaway: Don't over-engineer RAG. Try full context loading first, then agentic RAG (tools), then build a pipeline only if needed. Start simple, check quality, get complex.
Prerequisites: agent-memory-design (embeddings concepts), agent-context-engineering (context management)
Read next: agent-multi-agent-design
Level 3: Advanced
These three skills cover scaling, quality assurance, and security. Read them when you're building production systems.
7. agent-multi-agent-design
What you'll learn: Six topologies (single, network, supervisor, hierarchical, custom), the supervisor pattern, control flow strategies (plan-then-execute), workflows as tools, A2A protocol for cross-framework agent communication.
Key takeaway: Multi-agent design is organizational design. Start with a single agent. Add specialists and supervisors only when the single agent becomes unwieldy. Workflows as tools give you deterministic structure.
Prerequisites: agent-architecture-design (splitting agents), agent-workflow-graphs (workflow primitives), agent-context-engineering (sharing context between agents)
Read next: agent-eval-workflow
8. agent-eval-workflow
What you'll learn: Classifying failure modes, defining business metrics, cross-referencing failures with metrics, building eval test suites, having domain experts (SMEs) label data, creating datasets from production data, LLM-as-judge evaluation.
Key takeaway: Raw accuracy tells you something changed, but not why. You need failure mode classification, domain expert review, and production data evaluation. Binary grading outperforms numerical scoring.
Prerequisites: All foundation + intermediate skills (you need a working agent to evaluate)
Read next: agent-security-patterns
9. agent-security-patterns
What you'll learn: The lethal trifecta (prompt injection via private data + untrusted content + exfiltration), sandboxing code execution, granular access control (planning mode, per-tool-call auth), input/output guardrails.
Key takeaway: If your agent has access to private data, processes untrusted content, AND can communicate externally -- you have a critical vulnerability. Remove one leg of the triangle. Guardrails are not optional for production.
Prerequisites: All previous skills (security applies to everything you've built)
Quick Reference: Which Skill Answers Which Question?
| Question | Skill |
|---|---|
| How do I write a good system prompt? | agent-prompting-patterns |
| How do I make my agent return JSON? | agent-prompting-patterns |
| How do I make my agent remember past conversations? | agent-memory-design |
| How do I connect my agent to external APIs? | agent-memory-design |
| What is MCP and when should I use it? | agent-memory-design |
| Where do I start building my agent? | agent-architecture-design |
| My agent is trying to do too many things | agent-architecture-design |
| How do I add human approval to my workflow? | agent-workflow-graphs |
| How do I make my agent feel responsive? | agent-workflow-graphs |
| How do I debug agent failures in production? | agent-workflow-graphs |
| My agent degrades on long conversations | agent-context-engineering |
| How do I share context between subagents? | agent-context-engineering |
| How do I build a knowledge base for my agent? | agent-rag-pipeline |
| Should I use RAG or just load everything? | agent-rag-pipeline |
| Which vector database should I use? | agent-rag-pipeline |
| How do I make multiple agents work together? | agent-multi-agent-design |
| What is the supervisor pattern? | agent-multi-agent-design |
| How do I measure my agent's quality? | agent-eval-workflow |
| How do I prevent prompt injection? | agent-security-patterns |
| How do I sandbox code execution? | agent-security-patterns |
Reading Strategies
"I'm building my first agent"
Read skills 1-3 (Foundation) in order. Build something. Then read skills 4-6 as you hit specific challenges.
"I have an agent but it's unreliable"
Start with agent-context-engineering (skill 5) for context issues, then agent-eval-workflow (skill 8) for systematic improvement.
"I need to ship to production"
Read agent-security-patterns (skill 9) and agent-eval-workflow (skill 8). Then agent-workflow-graphs (skill 4) for observability.
"My single agent is getting too complex"
Read agent-architecture-design (skill 3) for splitting strategies, then agent-multi-agent-design (skill 7) for coordination patterns.
Sources
These skills synthesize knowledge from two comprehensive guides:
-
"Principles of Building AI Agents" (2nd Edition) by Sam Bhagwat -- Covers foundational concepts: prompting, memory, tools, MCP, workflows, RAG, multi-agent systems, evals, and deployment.
-
"Patterns for Building AI Agents" -- Covers production patterns: architecture evolution, context engineering, evaluation workflows, and security hardening.
For the full reference, see references/skill-summaries.md.