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:
| Piece | What it does | Why a brokerage cares |
|---|---|---|
| Tool loop | Sends the request, runs the tool calls, feeds results back, stops at a limit | Nobody has to rebuild the loop from scratch |
| Tool definitions | Turns a normal function into a tool with a schema | Fewer mistakes in the inputs the model sends |
| Handoffs | One agent passes the conversation to a more specialized one | A front-desk agent hands a rental question to a leasing agent |
| Guardrails | Checks on what comes in and goes out, which can stop a run | Block a reply that quotes a price or names a client |
| Sessions or memory | Keeps the conversation across turns | The assistant remembers the client's budget from earlier |
| Tracing | A step-by-step record of every run | You can show the broker of record what the agent did and why |
| Streaming | Shows the answer word by word as it is written | The website chat feels responsive |
| Human approval | Pauses a run until a person approves a tool call | A showing request waits for the listing agent |
| MCP support | Connects to MCP servers as tools | Reuse 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.
| Question | OpenAI Agents SDK | Vercel AI SDK | Claude Agent SDK |
|---|---|---|---|
| Languages | Python and TypeScript | TypeScript | Python and TypeScript |
| Made for | Multi-agent workflows with guardrails | Apps and websites that call many model providers | Agents that work with files, commands and documents |
| The loop | Runner handles tools and handoffs | ToolLoopAgent with stop conditions | Claude Code's own agent loop |
| Teams of agents | Handoffs and agents as tools | You compose them yourself | Subagents |
| Safety controls | Input and output guardrails, human approval | Your checks inside each tool and step | Permission modes and hooks |
| Watching runs | Built-in tracing | Telemetry you send to a monitoring tool | Session logs and hooks |
| Models | OpenAI first, others supported | Many providers through one interface | Claude 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.
- Prototype. Devon builds it in n8n: a chat trigger, an AI Agent node with
search_listingsandrequest_showingtools, and an approval step. Twenty agents test it for three weeks. Devon saves 60 real (anonymized) conversations as test cases. - 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.
- Carry over the rules. The developer reuses the same tools and permissions: read freely,
request_showingcreates a pending request only, no sending. A guardrail checks every reply for client names or seller notes before it is shown. - 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.