By Abhijith N M · Reviewed 24 October 2026 · Editorial standards
Agent frameworks look like they contain dozens of ideas. Almost all of them are built from four patterns. Learn these and you can read any framework's source.
| Pattern | Buys you | Costs you | The failure it invites |
|---|---|---|---|
| Reflection | Better first drafts; catches obvious errors | 2–3× the calls | Infinite polishing loops; the critic is as wrong as the writer |
| Tool use | Facts and actions instead of guesses | Schemas, permissions, retries | Wrong arguments; acting without permission |
| Planning | Handles tasks too big for one prompt | A plan can be wrong at step 1 | Executing a bad plan confidently |
| Multi-agent | Different context per specialist; parallel work | Coordination, cost, debugging | Handoffs lose information; loops between agents |
Each module follows the same shape: the pattern, a worked example on Atlas, the measurement that tells you whether it helped, and a graded lab where you implement the core logic yourself.
The labs run against a scripted model — a small object that returns canned responses. That is deliberate: you are being graded on your loop, your validation and your orchestration, not on whether an API key works today.
class ScriptedModel:
"""Returns canned replies in order, so a loop is testable offline."""
def __init__(self, replies):
self.replies = list(replies)
self.calls = 0
def reply(self, prompt: str) -> str:
value = self.replies[min(self.calls, len(self.replies) - 1)]
self.calls += 1
return value
model = ScriptedModel(["draft v1", "draft v2"])
print(model.reply("write"), model.calls) # draft v1 1Key takeaways
Four patterns: reflection, tool use, planning, multi-agent.
Each buys something and costs calls, latency or coordination.
The course order is reflection → tools → planning → multi-agent.
Labs use a scripted model so your logic is what gets graded.
Written and edited by the nexGenCoders team. Spotted a mistake? Tell us and we will fix it.
Don't lose this lesson
Create a free account to save your progress, keep your streak, and work toward a shareable certificate.