ai-sdk

ai-sdk is a skill for Claude Code, Codex from vercel-labs/open-agents. It costs 155 tokens per session (1,131 once invoked), scanned A, original, MIT.

A guide to the AI SDK, a software library for adding text generation, chat, search over documents, and agent behavior to applications.

In plain words
What is it for?
Use it to build AI features such as chatbots, agents, retrieval-augmented generation, text generation, streaming responses, embeddings, and tool calls.
Why use it?
It helps developers use current SDK interfaces and avoid relying on outdated examples or APIs.

Skill for Claude CodeCodex ✓ vendor

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Good fit Use it to build AI features such as chatbots, agents, retrieval-augmented generation, text generation, streaming responses, embeddings, and tool calls.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/vercel-labs/open-agents/ai-sdk
About the project

Open Agents is an open-source reference application for running background coding agents through a web interface, durable workflows, isolated Vercel sandboxes, and GitHub integration. Developers fork and adapt it to let agents make code changes without keeping a local computer running. The catalogue entries provide skills, agents, and instructions for its workflow.

vercel-labs/open-agents · 5,805 stars · on GitHub · open-agents.dev

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add vercel-labs/open-agents --skill ai-sdk
Clone the repo
git clone --depth 1 https://github.com/vercel-labs/open-agents

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ai-sdk

README.md
[![agentmods](https://agentmods.dev/badge/skills/vercel-labs/open-agents/ai-sdk.svg)](https://agentmods.dev/skills/vercel-labs/open-agents/ai-sdk)
Your own site
<a href="https://agentmods.dev/skills/vercel-labs/open-agents/ai-sdk"><img src="https://agentmods.dev/badge/skills/vercel-labs/open-agents/ai-sdk.svg" alt="Measured on agentmods" height="20"></a>
Per session 155 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,131 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00155 $0.01131
Opus 5 $0.00077 $0.00566
Sonnet 5 $0.00031 $0.00226
Haiku 4.5 $0.00015 $0.00113

Measured 7d ago against content hash 07e3ac5f4231, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

ai-sdk scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

7. **Always fetch current model IDs** - Never use model IDs from memory. Before writing code that uses a model, run `curl -s https://ai-gateway.vercel.sh/v1/models | jq -r '[.data[] | select(.id | startswith("provider/")
Origin

Copies of this mod

5 near-identical copies found in the catalogue:

  • ai-sdk — 100% identical, 0 lines differ
  • ai-sdk — 100% identical, 0 lines differ
  • ai-sdk — 100% identical, 0 lines differ
  • ai-sdk — 97% identical, 1 lines differ
  • ai-sdk — 97% identical, 1 lines differ
.agents/skills/ai-sdk/SKILL.md · 79 lines

How it starts

The opening of the file, as written. The whole thing — 79 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Prerequisites

Before searching docs, check if node_modules/ai/docs/ exists. If not, install only the ai package using the project's package manager (e.g., pnpm add ai).

Do not install other packages at this stage. Provider packages (e.g., @ai-sdk/openai) and client packages (e.g., @ai-sdk/react) should be installed later when needed based on user requirements.

Critical: Do Not Trust Internal Knowledge

Everything you know about the AI SDK is outdated or wrong. Your training data contains obsolete APIs, deprecated patterns, and incorrect usage.

When working with the AI SDK:

  1. Ensure ai package is installed (see Prerequisites)
  2. Search node_modules/ai/docs/ and node_modules/ai/src/ for current APIs
  3. If not found locally, search ai-sdk.dev documentation (instructions below)
  4. Never rely on memory - always verify against source code or docs
  5. useChat has changed significantly - check Common Errors before writing client code
  6. When deciding which model and provider to use (e.g. OpenAI, Anthropic, Gemini), use the Vercel AI Gateway provider unless the user specifies otherwise. See AI Gateway Reference for usage details.
  7. Always fetch current model IDs - Never use model IDs from memory. Before writing code that uses a model, run curl -s https://ai-gateway.vercel.sh/v1/models | jq -r '[.data[] | select(.id | startswith("provider/")) | .id] | reverse | .[]' (replacing provider with the relevant provider like anthropic, openai, or google) to get the full list with newest models first. Use the model with the highest version number (e.g., claude-sonnet-4-5 over claude-sonnet-4 over claude-3-5-sonnet).
  8. Run typecheck after changes to ensure code is correct
  9. Be minimal - Only specify options that differ from defaults. When unsure of defaults, check docs or source rather than guessing or over-specifying.

If you cannot find documentation to support your answer, state that explicitly.

Read the full file on GitHub · 79 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 79 lines · 155 tokens per session scan A 07e3ac5f4231

Subscribe to this mod's changes

ai-sdk is a skill published in the GitHub repository vercel-labs/open-agents (5,805 stars, last pushed 9d ago), licensed MIT. It adds 155 tokens to every session and 1,131 once invoked, about $0.0008 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

sglang

Fast structured generation and serving for LLMs with RadixAttention prefix caching. Use for JSON/regex outputs, constrained decoding, agentic workflows with tool calls, or when you need 5× faster inference than vLLM with prefix sharing. Powers 300,000+ GPUs at xAI, AMD, NVIDIA, and LinkedIn.

synthetic-sciences/openscience · 72 tokens

sglang

Fast structured generation and serving for LLMs with RadixAttention prefix caching. Use for JSON/regex outputs, constrained decoding, agentic workflows with tool calls, or when you need 5× faster inference than vLLM with prefix sharing. Powers 300,000+ GPUs at xAI, AMD, NVIDIA, and LinkedIn.

davila7/claude-code-templates · 72 tokens

bigquery-ai-ml

Skill for BigQuery AI and Machine Learning queries using standard SQL and AI. functions (preferred over dedicated tools).

google/adk-python · 31 tokens

data-leakage-detection

Detect sensitive information disclosure via escalating dialogue probes. Covers system prompt extraction, credential/API key leakage, PII, and internal configuration exposure.

Tencent/AI-Infra-Guard · 34 tokens

azure-search-documents-dotnet

Azure AI Search SDK for .NET (Azure.Search.Documents). Use for building search applications with full-text, vector, semantic, and hybrid search. Covers SearchClient (queries, document CRUD), SearchIndexClient (index management), and SearchIndexerClient (indexers, skillsets). Triggers: "Azure Search .NET"…

microsoft/skills · 102 tokens

azure-search-documents-ts

Build search applications using Azure AI Search SDK for JavaScript (@azure/search-documents). Use when creating/managing indexes, implementing vector/hybrid search, semantic ranking, or building agentic retrieval with knowledge bases.

microsoft/skills · 48 tokens