Localized reading guide
ai-sdkPurpose, usage and source
Answer questions about the AI SDK and help build AI-powered features. Use when developers: (1) Ask about AI SDK functions like generateText, streamText, ToolLoopAgent, embed, or tools, (2) Want to build AI agents, chatbots, RAG systems, or text generation features, (3) Have questions about AI providers (OpenAI, Anthropic, Google, etc.), streaming, tool calling, structured output, or embeddings, (4) Use React hooks like useChat or useCompletion. Triggers on: "AI SDK", "Vercel AI SDK", "generateText", "streamText", "add AI to my app", "build an agent", "tool calling", "structured output", "useChat".
Source retrieved:
- Source repository
- vercel-labs/open-agents
- SKILL.md
.agents/skills/ai-sdk/SKILL.md- Repository stars
- 5,871
- Repository updated
- 2026-08-29
- Categories
- Agent workflows
- Last collected
License: MIT
Workflow excerpts are reading aids, not executable instructions from Codez. No third-party Skill was run to produce this page.
The purpose and workflow passages below are upstream material, organized and translated for reading. They are distinct from the separately labeled Codez editorial analysis.
What this Skill does
Answer questions about the AI SDK and help build AI-powered features. Use when developers: (1) Ask about AI SDK functions like generateText, streamText, ToolLoopAgent, embed, or tools, (2) Want to build AI agents, chatbots, RAG systems, or text generation features, (3) Have questions about AI providers (OpenAI, Anthropic, Google, etc.), streaming, tool calling, structured output, or embeddings, (4) Use React hooks like useChat or useCompletion. Triggers on: "AI SDK", "Vercel AI SDK", "generateText", "streamText", "add AI to my app", "build an agent", "tool calling", "structured output", "useChat".
How the upstream workflow works
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:
Upstream passage · L12 ↗ai@6.0.34+
Search bundled docs and source in node_modules/ai/: Docs: grep "query" node_modules/ai/docs/
Earlier versions
Fetch .md URLs from results (e.g., https://ai-sdk.dev/docs/agents/building-agents.md)
Requirements and setup
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.
Limits and quality checks
No separate limits passage was selected from this file. This does not mean the Skill is safe for every input or environment. Review the complete source and validate your own result.
Start with a safe trial
- Check the supported host and the repository installation instructions. Keep the Skill directory and its referenced scripts, assets and documentation together; SKILL.md alone may omit dependencies.
- Give the agent your real input, desired output and acceptance criteria. Invocation syntax and available tools depend on the host; this site does not assume a universal install command.
- Try the source workflow in a disposable project or on a copy. Review operations that change files, remote services or billable resources before allowing them.
- Validate the output against the source quality checks and your own requirements. A successful trigger or a high repository Star count does not establish a correct result.
Read further in the source
Related Skills
Translation and scope
This reading guide selects passages from the pinned upstream SKILL.md. Translation is assisted. It is not a complete manual or a claim of tested compatibility. Read the original and its referenced files before use.
This introduction refers to the pinned version below; current repository activity and collection time are shown separately.
- Pinned source
- Read the original ↗
- Source retrieved
- Source commit
cf865e94de7729751c747171785b6ce57e7b178c- Source SHA-256
07e3ac5f423104015bb6e324d9840c61f9df52542ad6f3141de0a419d8aefd2f