|
1 | | -# AgentPatterns Examples: Runnable AI Agent Patterns in Python |
| 1 | +# AgentPatterns Examples: Python AI Agent Patterns (ReAct, RAG, Routing, Tool Calling) |
2 | 2 |
|
3 | | -Production-style and beginner-friendly **AI agent examples** that map directly to the guides on [agentpatterns.tech](https://agentpatterns.tech). |
| 3 | +Production-ready and beginner-friendly **Python AI agent examples** that map directly to guides on [agentpatterns.tech](https://agentpatterns.tech). |
4 | 4 |
|
5 | | -If you want to learn how to build agents with real execution loops, tool boundaries, routing, and safety checks, this repo is the fastest way to run and inspect working code. |
| 5 | +This repository helps you build and understand **LLM agents** with real execution loops, tool calling, memory, routing, orchestration, safety constraints, and recovery strategies. |
6 | 6 |
|
7 | 7 | ## Why this repository |
8 | 8 |
|
9 | | -- Learn by running real code, not pseudo-code. |
10 | | -- Move from simple loops to advanced multi-step agent patterns. |
11 | | -- Reuse minimal, clean implementations in your own projects. |
12 | | -- Follow examples that are aligned with concrete docs and architecture explanations. |
| 9 | +- Run real AI agent code, not pseudo-code. |
| 10 | +- Learn a practical path from first agent to advanced multi-agent systems. |
| 11 | +- Reuse minimal production-style implementations in your own projects. |
| 12 | +- Follow examples that stay aligned with architecture guides on `agentpatterns.tech`. |
13 | 13 |
|
14 | | -## Available examples |
| 14 | +## Topics covered (SEO keywords) |
| 15 | + |
| 16 | +- Python AI agents |
| 17 | +- LLM agent architecture |
| 18 | +- ReAct agent pattern |
| 19 | +- RAG agent in Python |
| 20 | +- Tool calling and function calling |
| 21 | +- Multi-agent collaboration and orchestration |
| 22 | +- Agent memory, routing, reflection, and guardrails |
| 23 | +- AI agent reliability: fallback and recovery |
15 | 24 |
|
16 | | -### Agent Patterns (Core Block) |
| 25 | +## Available examples |
17 | 26 |
|
18 | | -The most important block of the site and the main architecture layer for production agents. |
| 27 | +### Start here |
19 | 28 |
|
20 | 29 | | Example | Local path | Article | |
21 | 30 | | --- | --- | --- | |
22 | | -| <strong><big>ReAct Agent</big></strong> | `examples/agent-patterns/react-agent/python` | [Read article](https://agentpatterns.tech/en/agent-patterns/react-agent) | |
23 | | -| <strong><big>Routing Agent</big></strong> | `examples/agent-patterns/routing-agent/python` | [Read article](https://agentpatterns.tech/en/agent-patterns/routing-agent) | |
24 | | -| <strong><big>Task Decomposition Agent</big></strong> | `examples/agent-patterns/task-decomposition-agent/python` | [Read article](https://agentpatterns.tech/en/agent-patterns/task-decomposition-agent) | |
| 31 | +| Write Your First Agent | `examples/start-here/write-your-first-agent/python` | [Read article](https://agentpatterns.tech/en/start-here/write-your-first-agent) | |
25 | 32 |
|
26 | 33 | ### Foundations |
27 | 34 |
|
28 | 35 | | Example | Local path | Article | |
29 | 36 | | --- | --- | --- | |
30 | | -| **Write Your First Agent** | `examples/start-here/write-your-first-agent/python` | [Read article](https://agentpatterns.tech/en/start-here/write-your-first-agent) | |
31 | | -| **Tool Calling Basics** | `examples/foundations/tool-calling-basics/python` | [Read article](https://agentpatterns.tech/en/foundations/tool-calling-basics) | |
32 | | -| **Tool Calling** | `examples/foundations/tool-calling/python` | [Read article](https://agentpatterns.tech/en/foundations/tool-calling) | |
33 | | -| **LLM Limits in Agents** | `examples/foundations/llm-limits-agents/python` | [Read article](https://agentpatterns.tech/en/foundations/llm-limits-agents) | |
34 | | - |
35 | | -## Project structure |
36 | | - |
37 | | -```text |
38 | | -examples/ |
39 | | - agent-patterns/ |
40 | | - react-agent/ |
41 | | - python/ |
42 | | - routing-agent/ |
43 | | - python/ |
44 | | - task-decomposition-agent/ |
45 | | - python/ |
46 | | - foundations/ |
47 | | - tool-calling-basics/ |
48 | | - python/ |
49 | | - tool-calling/ |
50 | | - python/ |
51 | | - llm-limits-agents/ |
52 | | - python/ |
53 | | - start-here/ |
54 | | - write-your-first-agent/ |
55 | | - python/ |
56 | | -``` |
| 37 | +| Tool Calling Basics | `examples/foundations/tool-calling-basics/python` | [Read article](https://agentpatterns.tech/en/foundations/tool-calling-basics) | |
| 38 | +| Tool Calling | `examples/foundations/tool-calling/python` | [Read article](https://agentpatterns.tech/en/foundations/tool-calling) | |
| 39 | +| Agent Memory | `examples/foundations/agent-memory/python` | Code example | |
| 40 | +| Allowed Actions | `examples/foundations/allowed-actions/python` | Code example | |
| 41 | +| Planning vs Reactive | `examples/foundations/planning-vs-reactive/python` | [Read article](https://agentpatterns.tech/en/foundations/planning-vs-reactive) | |
| 42 | +| Stop Conditions | `examples/foundations/stop-conditions/python` | Code example | |
| 43 | +| LLM Limits in Agents | `examples/foundations/llm-limits-agents/python` | [Read article](https://agentpatterns.tech/en/foundations/llm-limits-agents) | |
| 44 | + |
| 45 | +### Agent patterns |
| 46 | + |
| 47 | +| Example | Local path | Article | |
| 48 | +| --- | --- | --- | |
| 49 | +| ReAct Agent | `examples/agent-patterns/react-agent/python` | [Read article](https://agentpatterns.tech/en/agent-patterns/react-agent) | |
| 50 | +| Routing Agent | `examples/agent-patterns/routing-agent/python` | [Read article](https://agentpatterns.tech/en/agent-patterns/routing-agent) | |
| 51 | +| Task Decomposition Agent | `examples/agent-patterns/task-decomposition-agent/python` | [Read article](https://agentpatterns.tech/en/agent-patterns/task-decomposition-agent) | |
| 52 | +| RAG Agent | `examples/agent-patterns/rag-agent/python` | [Read article](https://agentpatterns.tech/en/agent-patterns/rag-agent) | |
| 53 | +| Supervisor Agent | `examples/agent-patterns/supervisor-agent/python` | [Read article](https://agentpatterns.tech/en/agent-patterns/supervisor-agent) | |
| 54 | +| Orchestrator Agent | `examples/agent-patterns/orchestrator-agent/python` | [Read article](https://agentpatterns.tech/en/agent-patterns/orchestrator-agent) | |
| 55 | +| Research Agent | `examples/agent-patterns/research-agent/python` | Code example | |
| 56 | +| Data Analysis Agent | `examples/agent-patterns/data-analysis-agent/python` | Code example | |
| 57 | +| Reflection Agent | `examples/agent-patterns/reflection-agent/python` | [Read article](https://agentpatterns.tech/en/agent-patterns/reflection-agent) | |
| 58 | +| Self-Critique Agent | `examples/agent-patterns/self-critique-agent/python` | [Read article](https://agentpatterns.tech/en/agent-patterns/self-critique-agent) | |
| 59 | +| Memory-Augmented Agent | `examples/agent-patterns/memory-augmented-agent/python` | [Read article](https://agentpatterns.tech/en/agent-patterns/memory-augmented-agent) | |
| 60 | +| Multi-Agent Collaboration | `examples/agent-patterns/multi-agent-collaboration/python` | [Read article](https://agentpatterns.tech/en/agent-patterns/multi-agent-collaboration) | |
| 61 | +| Guarded Policy Agent | `examples/agent-patterns/guarded-policy-agent/python` | Code example | |
| 62 | +| Fallback Recovery Agent | `examples/agent-patterns/fallback-recovery-agent/python` | Code example | |
| 63 | +| Code Execution Agent | `examples/agent-patterns/code-execution-agent/python` | Code example | |
57 | 64 |
|
58 | 65 | ## Quick start |
59 | 66 |
|
@@ -83,9 +90,9 @@ python main.py |
83 | 90 |
|
84 | 91 | ## How this maps to agentpatterns.tech |
85 | 92 |
|
86 | | -- **Docs** explain when and why to use each agent pattern. |
87 | | -- **This repo** shows runnable implementations of those exact patterns. |
88 | | -- Each example folder includes its own README with direct links to related concepts. |
| 93 | +- **Docs** explain when and why to use each AI agent pattern. |
| 94 | +- **This repo** provides runnable implementations of those exact patterns. |
| 95 | +- Each example folder includes its own README and direct links to relevant concepts. |
89 | 96 |
|
90 | 97 | ## License |
91 | 98 |
|
|
0 commit comments