Lesson 6 of 8 · 35 min

OpenAI Agents SDK vs Claude Agent SDK vs Google ADK vs Pydantic AI

Compare four agent SDKs by language support, licence and key concepts, with a minimal example of each.

In this lesson1. OpenAI Agents SDK2. Claude Agent SDK3. Google Agent Development Kit (ADK)4. Pydantic AI5. Comparison table

OpenAI Agents SDK

The OpenAI Agents SDK is a Python library, openai-agents on PyPI, published under the MIT licence and requiring Python 3.10 or later. A JavaScript and TypeScript version lives in a separate repository and installs as @openai/agents. Its README describes it as provider agnostic, supporting the OpenAI Responses and Chat Completions APIs as well as many other models. The core concepts are agents, tools, handoffs and agents as tools, guardrails, human in the loop, sessions and tracing, with newer sandbox, realtime and voice agents.

The hello world from the docs shows the style: define an Agent with a name and instructions, then call Runner.run_sync with a prompt and read result.final_output. Tools are added as Python functions, and handoffs let a triage agent pass a conversation to a specialist, for example from a general helpdesk agent to a billing agent. Sessions keep conversation history across runs, and tracing records each step for debugging.

python · illustrative
# Illustrative, check the official docs for the current API
# pip install openai-agents ; needs OPENAI_API_KEY
from agents import Agent, Runner

agent = Agent(name="Assistant", instructions="You are a helpful assistant")

result = Runner.run_sync(agent, "Write a haiku about recursion in programming.")
print(result.final_output)

Claude Agent SDK

Anthropic's Claude Agent SDK gives you the tools, agent loop and context management that power Claude Code, as a library for Python (claude-agent-sdk) and TypeScript (@anthropic-ai/claude-agent-sdk). It needs Python 3.10 or Node.js 18 or later. It differs from the others because it ships built in tools, for reading, writing and editing files, running commands and searching the web. Key concepts are built in tools, permissions, hooks, subagents, MCP, sessions, skills and plugins. Use is governed by Anthropic's Commercial Terms of Service rather than an open source licence.

The quick start below lets the agent read and edit files in the current folder, which is how the official tutorial builds a bug fixing agent. allowed_tools pre approves specific tools and permission_mode controls how much oversight you keep; acceptEdits approves file changes automatically. The query function returns an async stream of messages, so you can show progress as the agent works. Start with read only tools and add Edit or Bash only when you trust the setup.

python · illustrative
# Illustrative, check the official docs for the current API
# pip install claude-agent-sdk ; needs ANTHROPIC_API_KEY
import asyncio
from claude_agent_sdk import query, ClaudeAgentOptions, ResultMessage


async def main():
    async for message in query(
        prompt="Review utils.py for bugs that would cause crashes. Fix any issues you find.",
        options=ClaudeAgentOptions(
            allowed_tools=["Read", "Edit", "Glob"],  # auto approve these tools
            permission_mode="acceptEdits",  # auto approve file edits
        ),
    ):
        if isinstance(message, ResultMessage):
            print(f"Done: {message.subtype}")


asyncio.run(main())

Google Agent Development Kit (ADK)

Google's Agent Development Kit is available in five languages according to an October 2026 Google Cloud blog post: Python, which is the reference implementation, Go, TypeScript, Java and Kotlin. The adk-python repository is licensed under Apache 2.0. Every language includes an MCP client, and ADK supports the Agent2Agent (A2A) protocol over HTTP so agents written in different languages or frameworks can work together. ADK also ships evaluation tooling, covered in the next lesson.

In Python, a tool is a plain function; ADK reads its type hints and docstring to build the schema the model sees, so a clear docstring matters as much as the code. The agent itself is declared with a name, a model, an instruction and a list of tools. Go, TypeScript, Java and Kotlin each define tools in their own idiom, such as Zod schemas in TypeScript. Replace the model string with a current model name from the ADK docs.

python · illustrative
# Illustrative, check the official docs for the current API
# Based on the ADK five languages post on the Google Cloud blog
from google.adk.agents.llm_agent import Agent


def get_weather(city: str) -> dict:
    """Retrieves the current weather report for a specified city.

    Args:
        city (str): The name of the city.
    """
    return {"status": "success", "report": f"Sunny and 31C in {city}."}


root_agent = Agent(
    name="weather_agent",
    model="your-gemini-model-name",
    instruction="Answer questions about the weather in a city.",
    tools=[get_weather],
)

Pydantic AI

Pydantic AI is a Python agent framework from the team behind Pydantic, released under the MIT licence. Its documentation describes an agent as a container for instructions, function tools and toolsets, a structured output type, a dependency type, an optional default model, model settings and reusable capabilities. The model is named as a provider and model string and can be changed per run, which makes switching providers simple. Agents run with run(), run_sync() or run_stream().

Its strength is type safety. Outputs can be validated against a structured output type, so a support agent that must return an order ID and a status either returns a valid object or fails clearly. Dependencies such as a database connection or an API client are declared as a type and passed in at run time rather than through global variables, which makes agents easier to test. Change the provider prefix in the model string to try another vendor.

python · illustrative
# Illustrative, check the official docs for the current API
# pip install pydantic-ai ; set the API key for your chosen provider
from pydantic_ai import Agent

agent = Agent("openai:your-model-name")  # provider:model string

result = agent.run_sync("What is the capital of Italy?")
print(result.output)

Comparison table

The table summarises what each project's own documentation or package listing said when this course was written. Licences apply to the packages named; check each repository if you use another language version. A team at an Indian SaaS company selling into the Gulf might weigh these differently from a UK agency, but the table gives a shared starting point. Treat it as a snapshot and verify before you commit.

text · illustrative
SDK                 Languages                         Licence                       Key concepts
OpenAI Agents SDK   Python, JS/TS                     MIT (Python package)          Agents, tools, handoffs, guardrails,
                                                                                    sessions, tracing, human in the loop
Claude Agent SDK    Python, TypeScript                Anthropic Commercial Terms    Built in tools, permissions, hooks,
                                                                                    subagents, MCP, sessions, skills
Google ADK          Python, Go, TypeScript,           Apache 2.0 (adk-python)       Agents, function tools, MCP client,
                    Java, Kotlin                                                    A2A, evaluation
Pydantic AI         Python                            MIT                           Typed outputs, dependencies, tools,
                                                                                    model agnostic provider strings
Key takeaways
  • The OpenAI Agents SDK is MIT licensed, provider agnostic and available in Python and JS/TS.
  • The Claude Agent SDK embeds Claude Code's loop and built in tools, under Anthropic's Commercial Terms.
  • Google ADK covers five languages and includes MCP, A2A and evaluation tooling.
  • Pydantic AI focuses on type safe outputs and dependencies in Python.
  • Verify licence and language support in each repository before committing.
Try it

Implement the same small agent, one tool that looks up an order status from a dictionary, in two of the four SDKs. Compare lines of code, how tool schemas are defined and how easy it is to switch model provider. Record your findings in a short table.

Check your understanding

1. Which of these SDKs is governed by commercial terms rather than an open source licence?

2. How many languages does Google ADK support according to Google's October 2026 post?

3. Which OpenAI Agents SDK concept lets one agent pass a conversation to a specialist?

← PreviousAutoGen, AG2, Semantic Kernel and Microsoft Agent Framework: What Happened and What to UseNext lesson →AI Agent Evaluation, Guardrails and Human Approval Gates in Production
XDQ Partner Network

Turn what you learn into monthly income

Resell AI agents and apps under your own brand. Up to 30% off credits, up to 30% recurring share, and apps built by XDQ Labs for your clients. Free to join.

Partner NetworkFor developer agenciesFor resellersFor consultantsWhite-label buildsDeal registration
Join the Partner Network free →
XDQ xAgents · AI lab for your company
While you sleep, your AI agents keep working.

From USD 49 or INR 2,999 a month. A person approves every step.

Start free, 14 days →See every agent300 credits · no card needed · prices include taxes🚀 Startup? Free landing page for 30 days →Need custom software or a security review? Send a brief →