Categories

Learning path Intermediate

Frameworks to Build AI Agents

The libraries to build your own agents: OpenAI Agents SDK, Pydantic AI, smolagents, Google ADK, LlamaIndex, Semantic Kernel, Mastra, Agno and Haystack.

  • 9 resources
  • 3 views
  • ~72 min

This path covers nine frameworks for building production AI agents, from OpenAI’s official SDK to specialized options like Pydantic AI or Haystack, built for developers who already understand what an agent is and need to pick the right tool for their project.

What you’ll be able to do

By the end of this path you’ll be able to compare the main agent frameworks by their programming model, typing support, tooling ecosystem and fit for different languages, and decide with confidence which one to use on a given project. This is an intermediate-level path: come with a basic grasp of LLM calls, function calling and, ideally, some Python or TypeScript experience.

How the path builds

It starts with the OpenAI Agents SDK, the most widely used reference for orchestrating agents with tools and handoffs, then moves to Pydantic AI, which adds strict typing and data validation to the same pattern. Hugging Face’s smolagents takes a different approach: agents reason by writing Python code instead of calling predefined functions. From there the path moves into fuller orchestration frameworks, Google ADK, LlamaIndex and Microsoft’s Semantic Kernel, before closing with three frameworks with a distinct personality: Mastra for TypeScript developers, Agno for its performance focus and Haystack for its retrieval-pipeline and agent approach. Nine frameworks, nine different ways of solving the same problem: how to give a language model autonomy and tools.

Artificial Intelligence

The OpenAI Agents SDK

The OpenAI Agents SDK is a lightweight Python framework for building agents and multi-agent workflows with few primitives: agents, tools, handoffs, guardrails, sessions and built-in tracing. It is the production-ready evolution of Swarm, works with the OpenAI API and with over 100 other LLMs.

Artificial Intelligence

Pydantic AI: typed agents

Pydantic AI is the agent framework from the Pydantic team: you build agents in Python where every model output is validated against a type you define. You declare the expected answer as a Pydantic model and the agent guarantees that structure, with dependency injection, tools and support for more than twenty model providers.

Artificial Intelligence

Hugging Face smolagents: Agents That Think in Code

smolagents is Hugging Face's agent library: in under a thousand lines of code it lets you build an agent that reasons by writing Python instead of filling in JSON. Its CodeAgent runs those actions as code, takes around 30% fewer steps than classic tool calling and works with any model, local or API.

Artificial Intelligence

Building Agents with LlamaIndex

LlamaIndex is a Python framework focused on connecting your data to a language model. Its AgentWorkflow module lets you build agents that reason and call tools: FunctionAgent for models with function calling, and ReActAgent for any model. This guide shows how to turn a RAG pipeline into an agent that acts over your own documents.

Artificial Intelligence

Microsoft’s Semantic Kernel

Semantic Kernel is Microsoft's open-source kit for integrating AI models into C#, Python and Java through a kernel that orchestrates plugins and functions. In 2026 its successor is Microsoft Agent Framework, which merges Semantic Kernel and AutoGen; Semantic Kernel itself keeps support for at least one more year.

Artificial Intelligence

Mastra: Agents in TypeScript

Mastra is an open-source TypeScript framework for building AI agents and applications with a single package: agents, tools, workflows, memory, RAG and evals. It was built by the team behind Gatsby, hit version 1.0 in January 2026 and connects to over 40 model providers through one interface.

Artificial Intelligence

Agno: a high-performance agent framework

Agno, the Python framework formerly known as Phidata, builds AI agents with one clear goal: performance. It creates each agent in about two microseconds and uses roughly 3.75 KiB of memory, so it scales to thousands of concurrent agents. It offers agents, teams and workflows, over twenty model providers and the AgentOS runtime.

Artificial Intelligence

Haystack: Pipelines and Agents

Haystack is a Python framework by deepset, Apache 2.0 licensed, for building AI applications as pipelines of connected components: retrievers, generators and routers. Since the 2.0 rewrite it allows cycles, which lets you add an Agent component that calls tools in a loop. It serves both RAG and production agents.