
Develop Ai Functions Example
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-codeInstalls 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