Where to Go Next
You built a real AI agent from scratch: the think-act-observe loop, a model call, a tool the model can use, the full agent loop, and error handling for when a tool fails. That is the foundation everything else in the agent world is built on. This short lesson points you toward the next steps and clears up where frameworks fit.
What You'll Learn
- What you have actually learned (more than it might feel like)
- Where frameworks like LangChain and CrewAI come in
- How to deepen your skills from here
- A few habits that will keep your agents reliable
You learned the thing under the frameworks
It is easy to feel like "real" agents must need a big library. They do not. What you built in Lesson 4 is the same loop that powers the popular frameworks. When you eventually open LangChain or CrewAI, you will recognize the pieces: a model call, tool definitions, a loop, and result handling. You will be reading those libraries with understanding instead of copying examples on faith.
That is the most valuable outcome of building from scratch first. The loop is the concept; frameworks are conveniences layered on top.
Where frameworks fit
So why use a framework at all? As agents grow, you start wanting features you would otherwise build yourself: memory across sessions, retries and tracing, connectors to many tools, and ways to coordinate several agents. Frameworks package those so you do not reinvent them.
Frameworks save work on big agents; the loop you learned is still underneath.
| Criteria | From scratch (this course) | A framework |
|---|---|---|
| Best for | Learning, small focused agents | Larger apps with many tools or agents |
| You write | The loop and each tool | Tool functions; the loop is provided |
| Extras included | Whatever you add | Memory, tracing, connectors, retries |
| What to learn next | You are here | LangChain, LangGraph, CrewAI |
From scratch (this course)
- Best for
- Learning, small focused agents
- You write
- The loop and each tool
- Extras included
- Whatever you add
- What to learn next
- You are here
A framework
- Best for
- Larger apps with many tools or agents
- You write
- Tool functions; the loop is provided
- Extras included
- Memory, tracing, connectors, retries
- What to learn next
- LangChain, LangGraph, CrewAI
The honest guidance: keep building from scratch while you are learning and for small agents. Reach for a framework when you feel the pain it solves, not before.
Two natural next courses
When you are ready to go deeper, two FreeAcademy courses pick up exactly where this one ends:
- Agentic AI with Python: LangChain & LangGraph is the next step for depth. It takes the loop you now understand and shows how a framework handles tools, memory, and more complex control flow, so you can build bigger single agents without writing every piece yourself.
- Multi-Agent Systems with CrewAI is where to look when one agent is not enough and you want several agents working together, each with its own role, on different parts of a task.
You also already have the model-call skill to build full apps. Build Your First AI Data App with Python uses the same model call inside a small data application, which pairs well with what you learned here.
Habits that keep agents reliable
A few practices, drawn from the whole course, will carry you a long way:
- Always cap the loop. A
max_turnslimit prevents runaway cost and infinite loops. - Write tools that never crash. Validate input, catch exceptions, and return clear error strings so the model can recover.
- Keep the model out of the driver's seat for risky actions. The model proposes a tool; your code decides whether to run it. Confirm before anything destructive or costly.
- Name a specific model. A pinned model name keeps behavior predictable;
claude-opus-4-8is a strong current choice, andclaude-sonnet-4-6is a lighter option for simpler tasks. - Start small. One tool, one clear job. Add tools only when a task needs them.
A challenge to finish on
The best way to lock this in is to build one agent for something you actually do. Pick a small task, write one tool for the fact or action the model cannot do alone, drop it into the loop from Lesson 4, and run it. When it works, you will have proven to yourself that agents are not magic. They are a loop, a model, and a few good tools that you now know how to write.
Key Takeaways
- You learned the loop that sits underneath every agent framework, so those frameworks will now make sense instead of feeling like magic.
- Frameworks add memory, tracing, connectors, and multi-agent coordination. Reach for them when you feel the need, not by default.
- Go deeper with the LangChain and LangGraph course for bigger single agents, and the CrewAI course for multiple agents working together.
- Keep agents reliable: cap the loop, write tools that never crash, guard risky actions, and pin your model.
- Finish by building one small agent for a real task of your own.

