Latest AI Techniques: RAG, Tool Use, Agents & MCPAgent loops, multi-agent patterns and memory · Lesson 13 of 20

Agent frameworks, SDKs and platforms: how to choose

Article · 13 min · 9 min lecture

Video lecture

Agent frameworks, SDKs and platforms: how to choose

16 chapters · about 9 min · full transcript

Coming soon

Chapter 1 of 16

Choosing agent tooling

  • Two questions that cut the noise
  • Six categories
  • Same agent, two SDKs

The narrated lecture is in production

Every chapter is scripted and ready. Browse the chapters and read the full transcript now — the video will appear here when it’s published.

Chapters

You do not have to build every loop by hand

You have now written a tool loop yourself, which is the best way to understand agents. In production you will usually lean on a framework, SDK or platform. The market is crowded and moves monthly, so this lesson gives you a durable way to choose, a map of the main categories (with current examples, verified at the time of writing) and a portable hello-world in two SDKs.

Two questions that separate the options

  1. Who supplies the harness? The harness is the agent loop plus context management, tool execution, retries, approvals and tracing.
  2. Who supplies the deployment? Where the loop runs, where tools execute (sandboxes), and who operates it.
CategoryHarnessDeploymentCurrent examplesGood when
Raw API + your loopYouYouAny model APIYou need total control or minimal dependencies
SDK loop helpersSDKYouAnthropic SDK tool runner; OpenAI Agents SDKCustom tools, your infrastructure, less boilerplate
Full agent harness as a librarySDK (batteries included)YouClaude Agent SDK (the Claude Code harness as a library); OpenAI Agents SDK sandbox agentsFile, shell and coding-style agents on your own infra
Graph/workflow frameworksFrameworkYouLangGraph, LlamaIndex workflows, Microsoft's agent frameworks, CrewAIExplicit state machines, multi-step graphs, human checkpoints, model-agnostic stacks
Hosted agent platformsProviderProviderClaude Managed Agents (beta); cloud agent services on AWS, Google Cloud and AzureLong-running, scheduled or sandboxed agents without running infrastructure
No-code / low-code agent buildersPlatformPlatformn8n AI Agent node, Zapier Agents, Microsoft Copilot StudioBusiness teams, integrations-heavy automations

Products change quickly (for example, OpenAI has announced the retirement of its drag-and-drop Agent Builder canvas and points code-based users to the Agents SDK), so check vendor docs before committing.

Selection criteria that matter

  • Control flow: do you need an explicit graph (predictable, auditable) or model-directed loops (flexible)? Many teams combine them: a graph with an agent node inside.
  • Model portability: some frameworks are provider-agnostic; others are tied to one vendor's features. Portability costs you some native features; lock-in costs you negotiating power.
  • Tooling standards: first-class MCP support, Agent Skills support and structured outputs save integration work.
  • Human-in-the-loop: built-in approval pauses and resumable runs.
  • Observability: tracing of every model call and tool call, exportable to your stack (many support OpenTelemetry).
  • State and durability: can a run survive a crash, wait days for an approval and resume?
  • Security model: sandboxing for code and files, secret handling, permission policies.
  • Team fit: languages your team uses, maturity, documentation and community.

Worked example: choosing for three teams

  • A two-person agency automating lead research and CRM updates chooses n8n with its AI Agent node, MCP client tools and human review steps on the tools that write to the CRM. No servers to run beyond the n8n instance; business staff can read the flow.
  • A SaaS scale-up building an in-product support agent chooses an SDK loop helper on the model provider's API, with its own tools, tracing and evaluation, because it needs tight control over latency, UX and data.
  • An enterprise data team running nightly, multi-hour research jobs across internal documents chooses a hosted agent platform with sandboxed workspaces and scheduled runs, reviewed against its security requirements, so it does not operate long-running containers itself.

None of these is "best"; each matches the team's control, skills and risk needs.

Hands-on: the same agent in two SDKs

Anthropic Python SDK tool runner (beta helper that runs the loop for your tools):

import anthropic
from anthropic import beta_tool

client = anthropic.Anthropic()

@beta_tool
def get_exchange_rate(base: str, quote: str) -> str:
    """Return today's reference exchange rate between two ISO currency codes, e.g. AED and PKR."""
    rates = {("AED", "PKR"): 76.0, ("GBP", "AED"): 4.9}   # illustrative; call your real rates API
    rate = rates.get((base.upper(), quote.upper()))
    return f"{rate}" if rate else "Unknown pair; ask the user to confirm the currencies."

runner = client.beta.messages.tool_runner(
    model="claude-opus-5",            # check the current model list
    max_tokens=4000,
    tools=[get_exchange_rate],
    messages=[{"role": "user", "content": "Roughly how many PKR is AED 2,500? Show the rate you used."}],
)
for message in runner:
    final = message
print("".join(b.text for b in final.content if b.type == "text"))

OpenAI Agents SDK (provider-agnostic agent framework):

from agents import Agent, Runner, function_tool

@function_tool
def get_exchange_rate(base: str, quote: str) -> str:
    """Return today's reference exchange rate between two ISO currency codes."""
    rates = {("AED", "PKR"): 76.0, ("GBP", "AED"): 4.9}   # illustrative values
    rate = rates.get((base.upper(), quote.upper()))
    return f"{rate}" if rate else "Unknown pair; ask the user to confirm the currencies."

agent = Agent(name="FX helper", instructions="Answer briefly and show the rate used.",
              tools=[get_exchange_rate])
result = Runner.run_sync(agent, "Roughly how many PKR is AED 2,500?")
print(result.final_output)

Install with pip install anthropic and pip install openai-agents, set ANTHROPIC_API_KEY or OPENAI_API_KEY, and run both. Notice how similar they are: a typed function with a docstring becomes a tool; the framework runs the loop. The differences that matter show up later, in tracing, approvals, state, sandboxes and model choice.

Avoiding framework regret

  • Keep business logic in plain functions and tool definitions you own; frameworks should call them, not contain them.
  • Keep prompts, tool descriptions and evaluation sets in version control, framework-independent.
  • Wrap model calls behind a thin interface so you can switch providers for a route.
  • Run your evaluation suite on any candidate before migrating.
  • The flagship Building Production AI Agents course builds production agents on these foundations; Integrating AI Platforms: Claude, OpenAI, Gemini and Open Models via API covers provider APIs in depth.

Go deeper

Related courses: for coding agents specifically, see AI-Assisted Software Development: Coding Agents in Practice; to run open-weight models yourself, see Open-Weight and Local AI: Run, Choose and Deploy Your Own Models; for agents that operate browsers and desktop apps, see Computer-Use and Browser Agents.

Key takeaways

  • Separate options by who supplies the harness (loop, context, tools) and who supplies the deployment.
  • Categories: raw API loops, SDK helpers, full harness libraries, graph frameworks, hosted platforms and no-code builders.
  • Choose on control flow, portability, MCP and Skills support, human-in-the-loop, observability, durability, security and team fit.
  • Keep business logic, prompts and evaluations framework-independent to avoid lock-in and regret.

Check your understanding

Quick questions to lock in the lesson. They don’t count towards your certificate.

  1. A small agency with no engineers wants lead research that updates the CRM with approval. Which option fits best?
  2. What does a hosted agent platform add compared with an SDK loop helper?
  3. Which practice best reduces framework lock-in?

Put it into practice

Score two candidate frameworks or platforms for one agent you plan, using the eight selection criteria. Build the FX hello-world in one of them and note what tracing and approvals it offers.

Enrol for free to save your progress

Reading is always free. Enrol to keep your place, take the final assessment and earn a verifiable certificate.