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.

Go to the course

What you'll see in this lesson

  1. 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.

  2. 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.

  3. Claude Agent SDK: the engine of Claude Code

    Anthropic's SDK gives you Claude Code's loop, tools, permissions and hooks as a library.

  4. 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.

  5. 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.

  6. 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.

  7. 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.

  8. 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.

  9. 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

Sign in with your Google account to access this lesson and the whole course.

Go to the courseSee the full syllabus

More lessons in this block