vercel avatar

Develop Ai Functions Example

vercel/aiOfficial

This is a structured workspace for validating AI SDK functions across providers. You'd use it when adding new provider support, debugging issues, or demonstrating features like tool calling, streaming, or structured output. Everything follows consistent naming patterns (provider-feature.ts) and lives in category directories like generate-text, stream-object, or agent. The templates are practical, the run() wrapper handles errors and env loading, and there are helpers for colored streaming output and saving test fixtures. It's internal tooling that treats examples as both documentation and validation, which is the right approach when you're shipping an SDK that needs to work consistently across OpenAI, Anthropic, Bedrock, and everyone else.

skills.sh installs
1.9K
GitHub stars
27.8K
last updated
Aug 21, 2026

Install

$ npx -y skills add vercel/ai --skill develop-ai-functions-example --agent claude-code

Installs into .claude/skills of the current project.

Files

AI Functions Examples

The examples/ai-functions/ directory contains reusable scripts for validating, testing, and iterating on AI SDK functions across providers. Place examples under examples/ai-functions/src/<function>/<provider>/. Reproduction-only scripts belong only in the PR description's End-to-End Verification section and must never be committed; see Bug Reproductions.

Example Categories

Examples are organized by AI SDK function in examples/ai-functions/src/:

Sponsors

Details

Repository
github.com/vercel/ai
Categories
Testing & QA, AI & Agent Building, Cloud & Infrastructure

More from vercel/ai

All 8
1anthropics avatarbusiness-pulseanthropics/knowledge-work-pluginsProduces a one-page cross-functional business snapshot for SMB owners — cash position (QuickBooks), sales trend (PayPal/Square), pipeline movement (HubSpot), th1.9Kskills.sh installs
2nvidia avatarnemo-rl-docsnvidia/skillsDocumentation conventions for NeMo-RL. Covers docs/index.md updates and docstring format. Do NOT use for: bug fixes, test fixes, dependency bumps, refactoring, 1.8Kskills.sh installs
3capawesome-team avatarionic-angularcapawesome-team/skillsGuides the agent through Angular-specific patterns for Ionic app development. Covers project structure, standalone vs NgModule architecture detection, Angular R1.8Kskills.sh installs
4github avatargtm-product-led-growthgithub/awesome-copilotBuild self-serve acquisition and expansion motions. Use when deciding PLG vs sales-led, optimizing activation, driving freemium conversion, building growth equa1.8Kskills.sh installs
5colbymchenry avataragent-evalcolbymchenry/codegraphBenchmark CodeGraph retrieval quality on a real codebase by comparing agent behavior with vs without CodeGraph. Use when the user runs /agent-eval or asks to te1.8Kskills.sh installs
6pproenca avatartypescriptpproenca/dot-skillsTypeScript performance, tsconfig, type errors, async patterns — triggered when the user asks to "optimize TypeScript performance", "speed up tsc compilation", "1.8Kskills.sh installs