vercel-ai-sdk

Installation
SKILL.md

Vercel AI SDK (Python)

uv add vercel-ai-sdk
import vercel_ai_sdk as ai

Core workflow

ai.run(root, *args, checkpoint=None) is the entry point. It creates a Runtime (stored in a context var), starts root as a background task, processes an internal step queue, and yields Message objects. All SDK functions (stream_step, execute_tool, hooks) require this Runtime context -- they must be called within ai.run().

The root function is any async function. If it declares a param typed ai.Runtime, it's auto-injected.

Installs
25
GitHub Stars
70
First Seen
Mar 4, 2026
vercel-ai-sdk — vercel-labs/py-ai