Block IX · Agents that work on their own · Lesson 51
Build your own agents
You'll learn to build custom agents with the Anthropic, OpenAI and Google SDKs, and when it's worth using frameworks for stateful workflows or teams of agents with roles.
- 11 min
- 9 animated slides
- 4-question quiz
- Narrated in 6 languages
What you'll see in this lesson
- An agent from the inside: a loop with tools
An agent is a model that, in a loop, decides which tool to use, gets the result and keeps going until the task is done.
- The minimal loop, by hand, with the Claude API
Ten lines are enough: while the model asks for tools, you run them and send back the results.
- Claude Agent SDK: the engine of Claude Code
Anthropic's SDK gives you Claude Code's loop, tools, permissions and hooks as a library.
- OpenAI Agents SDK: lightweight, with handoffs
You create an Agent with instructions and tools, and the Runner runs the loop; a decorator turns a function into a tool.
- Google ADK: from one agent to a system of agents
Google's Agent Development Kit is optimized for Gemini, supports other models and includes a web interface for testing.
- LangGraph: stateful workflows you can pause
You draw the process as a graph of steps that share state, with branches, retries and pauses for a person to approve.
- CrewAI: teams of agents with roles
You define agents as if you were hiring people, with a role, a goal and a backstory, and CrewAI coordinates who does each task.
- Which one to use in each case
Start with the simplest thing that works: your main model's SDK, and a framework only when the workflow calls for it.
- Summary: build your own agents
Deep down, every SDK does the same thing: a loop of model and tools; what changes is the parts they give you ready-made.
Tools and concepts
- Claude Agent SDK
- OpenAI Agents SDK
- Google ADK
- LangGraph
- CrewAI
Sign in with your Google account to access this lesson and the whole course.