Skip to content
Valery

Module 3 · Lesson 5 of 6

Agent SDKs: OpenAI Agents SDK, Vercel AI SDK and friends

What an agent SDK gives a developer, how the main ones compare, and when a no-code tool is the better choice.

8 min

Everything in this module so far, the loop, tool calls, permissions and limits, has to be written by someone. An agent SDK is a code library that has already written most of it. A developer adds the SDK to a project, describes the agent's instructions and tools, and the SDK runs the loop, calls the tools, streams the answer to the screen and records what happened.

You may never write SDK code yourself. But as the person who scopes AI work for a brokerage, you will be asked "should we build this in n8n or have a developer use an SDK?" This lesson gives you enough to answer, and to understand what a developer means when they name one.

What an SDK gives you

Key term
SDK (software development kit)

A ready-made code library for one job. An agent SDK handles the agent loop and the plumbing around it so a developer writes the brokerage-specific parts: instructions, tools and rules.

Most agent SDKs, as of October 2026, offer the same core pieces under different names:

PieceWhat it doesWhy a brokerage cares
Tool loopSends the request, runs the tool calls, feeds results back, stops at a limitNobody has to rebuild the loop from scratch
Tool definitionsTurns a normal function into a tool with a schemaFewer mistakes in the inputs the model sends
HandoffsOne agent passes the conversation to a more specialized oneA front-desk agent hands a rental question to a leasing agent
GuardrailsChecks on what comes in and goes out, which can stop a runBlock a reply that quotes a price or names a client
Sessions or memoryKeeps the conversation across turnsThe assistant remembers the client's budget from earlier
TracingA step-by-step record of every runYou can show the broker of record what the agent did and why
StreamingShows the answer word by word as it is writtenThe website chat feels responsive
Human approvalPauses a run until a person approves a tool callA showing request waits for the listing agent
MCP supportConnects to MCP servers as toolsReuse the HubSpot or Drive servers from the last lesson

The main SDKs

OpenAI Agents SDK. OpenAI's library, in Python and TypeScript. Its core ideas are agents (a model with instructions and tools), handoffs and agents-as-tools for teams of agents, and guardrails that run alongside the agent and stop the run early when a check fails. It includes sessions, built-in tracing, human-in-the-loop approval, MCP tools, and voice agents. It is built around OpenAI models and also supports other providers.

Vercel AI SDK. A TypeScript toolkit from Vercel, the company that hosts many Next.js websites (Module 10). It gives one way to call many model providers, so switching from one vendor's model to another is a small change. Its ToolLoopAgent runs the loop, with settings that decide when to stop. Its UI hooks make chat screens in React, Next.js, Vue and Svelte straightforward. It can also run established harnesses, such as Claude Code or Codex, through one interface. It is a common choice when the agent lives on a brokerage website.

Claude Agent SDK. Anthropic's library, in Python and TypeScript, that packages the harness behind Claude Code. It comes with built-in tools to read and edit files, run commands and search the web, plus permissions, hooks (your code runs at set points, for example before a tool runs), subagents, sessions and MCP. It suits agents that work with files and documents, such as a deal-file checker. It uses an API key, billed per use, not a Claude subscription.

Friends. You will also hear about Google's Agent Development Kit (ADK), LangGraph and Mastra. They cover similar ground with different styles. Pick the one your developer knows well and that supports the models you have approved.

Three agent SDKs, as of October 2026
QuestionOpenAI Agents SDKVercel AI SDKClaude Agent SDK
LanguagesPython and TypeScriptTypeScriptPython and TypeScript
Made forMulti-agent workflows with guardrailsApps and websites that call many model providersAgents that work with files, commands and documents
The loopRunner handles tools and handoffsToolLoopAgent with stop conditionsClaude Code's own agent loop
Teams of agentsHandoffs and agents as toolsYou compose them yourselfSubagents
Safety controlsInput and output guardrails, human approvalYour checks inside each tool and stepPermission modes and hooks
Watching runsBuilt-in tracingTelemetry you send to a monitoring toolSession logs and hooks
ModelsOpenAI first, others supportedMany providers through one interfaceClaude models

Read the table as a rough guide, not a ranking. All three change monthly; check each project's documentation before you commit.

When you need an SDK and when you do not

Most brokerage automations do not need an SDK. n8n's AI Agent node, Zapier Agents and Make's AI Agents (Module 4) run the same loop with a visual editor, built-in logins to common apps and a run history. Reach for an SDK when one of these is true:

  • The agent is part of a product. A chat assistant on your public website, inside your own app, with your design.
  • You need fine control. Custom guardrails, unusual approval rules, or many agents passing work between them.
  • You need proper testing and version history. Code lives in GitHub (Module 10), changes are reviewed, and tests run before each release.
  • Volume or cost matters. At high volume, code you control can be cheaper and faster than per-task automation pricing.
  • A developer will own it. An SDK project without a maintainer becomes a liability within months.

Stay with a no-code tool when the work is internal, moderate in volume, built from common apps, and owned by someone who is not a developer.

Prototype first

Build the first version in a no-code tool, run it for a few weeks, and collect real examples. If you later move to an SDK, those examples become the developer's test cases, and the spec is already proven.

In practice

Maple & Main Realty (fictional) wants a website assistant that answers questions about its listings and collects showing requests. Devon, the operations lead, works through the decision.

  1. Prototype. Devon builds it in n8n: a chat trigger, an AI Agent node with search_listings and request_showing tools, and an approval step. Twenty agents test it for three weeks. Devon saves 60 real (anonymized) conversations as test cases.
  2. Decide. The brokerage wants the chat on its Next.js website, matching its design, with answers that stream in. That points to a developer and the Vercel AI SDK.
  3. Carry over the rules. The developer reuses the same tools and permissions: read freely, request_showing creates a pending request only, no sending. A guardrail checks every reply for client names or seller notes before it is shown.
  4. Keep the trace. Every run is logged, so when a visitor complains the broker of record can see exactly what the assistant said.

Common mistakes

  • Choosing an SDK because it sounds more serious, for a task a no-code tool handles well.
  • Starting an SDK project with no developer who will maintain it.
  • Assuming the SDK's guardrails cover your rules automatically. You still write the brokerage-specific checks.
  • Switching models without rerunning your test cases.

Key takeaways

  • An agent SDK is a library that runs the loop, tools, approvals, tracing and streaming so developers write only the brokerage-specific parts.
  • OpenAI Agents SDK: multi-agent workflows and guardrails. Vercel AI SDK: websites and many providers. Claude Agent SDK: Claude Code's harness for file and document work.
  • Use a no-code tool for most internal automations; use an SDK for products, fine control, testing and scale, with a developer who owns it.
  • Prototype in no-code, collect examples, then rebuild in code only if you need to.

Finished reading? Move on when you're ready.