New advertisers: 50% off your first month with code FIRSTMONTHSee slots
vercel avatar

Develop Ai Functions Example

vercel/aiOfficial

Guide for writing AI SDK function examples in examples/ai-functions/src, organized by function and provider.

skills.sh installs
1.9K
GitHub stars
28.1K
last updated
Aug 21, 2026
View on GitHub

What it does

  • Covers the example directory layout by AI SDK function, from generate-text/ through telemetry/, plus shared lib/ and tools/ folders
  • Specifies the <function>/<provider>/basic.ts naming pattern and bans flat provider files such as generate-text/openai.ts
  • Enforces that reproduction-only scripts appear only in PR descriptions and are never committed to the repository
  • Designed for contributors adding providers, features, provider options, or test fixtures to the AI SDK examples

Install

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

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

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/:

Details

Repository
github.com/vercel/ai
Categories
AI Agents & LLM Apps, Technical Documentation

More from vercel/ai

All 8

Similar to Develop Ai Functions Example

More AI Agents & LLM Apps