🤖 AI Agents

Build an AI agent in code

Quick answer: Best overall to build an AI agent in code: LangChain / LangGraph. Largest ecosystem; LangGraph for controllable agents. Runner-up: OpenAI Agents SDK (Minimal primitives: agents, handoffs, guardrails, tracing). Also strong: Claude Agent SDK. We list 14 tools below, ranked by quality and fit.

Use an SDK/framework to build agents with tools, planning and multi-step reasoning.

Top picks, ranked

▸ Largest ecosystem; LangGraph for controllable agents.

Open-source frameworks for LLM apps and stateful agents, plus the LangSmith platform.

#2

OpenAI Agents SDK

free (open source)

▸ Minimal primitives: agents, handoffs, guardrails, tracing.

Lightweight open-source SDK for multi-agent workflows.

#3

Claude Agent SDK

free (pay for API usage)

▸ Reuse the Claude Code agent loop, tools and context management.

SDK exposing the Claude Code agent harness for custom agents.

#4

Pydantic AI

free (open source)

▸ Typed, production-friendly Python agents.

Type-safe Python agent framework from the Pydantic team.

#5

Mastra

freemium

▸ Top choice for TypeScript developers.

TypeScript agent framework with memory, tools, MCP and observability.

#7

Google ADK

free (open source)

▸ Model-agnostic, deploys easily to Google Cloud.

Google's open-source Agent Development Kit.

#8

CrewAI

freemium

▸ Simple role-based multi-agent orchestration.

Framework and platform for multi-agent 'crews'.

#9

LlamaIndex

freemium

▸ Agent workflows over your data.

Agent framework plus LlamaParse document parsing and workflows.

#10

Agno

freemium

▸ Fast, lightweight agents with built-in memory.

Python framework and runtime for multi-agent systems.

#11

smolagents

free (open source)

▸ Tiny codebase; agents that write Python actions.

Hugging Face's minimal code-acting agent library.

#12

AutoGen

free (open source)

▸ Influential research multi-agent framework; check project status before new work.

Microsoft's open-source multi-agent framework.

Related use cases

Add long-term memory and knowledge to an agentBuild a full-stack web app from a promptBuild agent workflows without codingLaunch a phone/voice AI agentLet an agent use a web browserGive your agent live web search and data

More in AI Agents.