Skip to main content
ZICQ

Skills ZICQ category:Media ai

Ai

AI SDK for Python (the `ai` package). Use for Python model calls (LLMs, image, video, speech, embedding, transcription, reranking, or evaluation), agents, model interaction tests, tool calling, subagents, approvals, durable execution, telemetry, AI SDK UI backends, and custom providers.

129 installs

Official URL:skills.sh

What this skill does

Intro in this page language first. The official description stays in its original wording; we do not rewrite SKILL.md.

What it does

AI SDK for Python (the `ai` package). Use for Python model calls (LLMs, image, video, speech, embedding, transcription, reranking, or evaluation), agents, model interaction tests, tool calling, subagents, approvals, durable execution, telemetry, AI SDK UI backends, and custom providers.

When to use it

The official description does not include a separate “Use when”. Per the spec, agents activate this skill when the task matches keywords in that description.

How agents load it

Per Agent Skills progressive disclosure: name and description load at startup (~100 tokens); the full SKILL.md body loads when the skill activates; scripts/, references/, and assets/ load only as needed. This file's sections: AI SDK for Python; Basic use; Advanced work.

File analysis

File analysis: besides SKILL.md, the body references references/streaming-tools.md, references/custom-loops.md, references/serverless.md, references/durable.md, references/ui.md, references/custom-provider.md. Those resources load on demand.

AI SDK for PythonBasic useAdvanced work

Source category:skills.sh agent-skill

SKILL.md & Agent activation

Official spec ↗
name
ai
description
AI SDK for Python (the `ai` package). Use for Python model calls (LLMs, image, video, speech, embedding, transcription, reranking, or evaluation), agents, model interaction tests, tool calling, subagents, approvals, durable execution, telemetry, AI SDK UI backends, and custom providers.
  1. DiscoverThe client exposes names and descriptions to the agent.
  2. ActivateYour request or the task context selects the skill and loads its instructions.
  3. Load resourcesReferenced scripts, documentation and assets are used when needed.
Files referenced by the instructions · 6
  • references/streaming-tools.md
  • references/custom-loops.md
  • references/serverless.md
  • references/durable.md
  • references/ui.md
  • references/custom-provider.md

These paths are extracted from the text. Check the upstream package to verify the files exist.

Invocation syntax and available tools depend on your Agent client. Client integration guide ↗

Install this skill

Skills CLI ↗

Choose the target agent and installation scope, keep referenced package files, then verify the skill appears in the client's catalog.

This skill references supporting files. Retrieve the complete directory from the source; copying SKILL.md alone may leave missing dependencies.

Ask your Agent to install

Copy these instructions to a compatible agent and confirm the target directory matches your client.

Install the agent skill "ai" into my project. The full SKILL.md and official description are at https://zicq.com/en/skills/skl-fe2d61429ed79955-Ai.html
Save it as .cursor/skills/ai/SKILL.md or .claude/skills/ai/SKILL.md and keep the frontmatter name and description exactly as-is.
This skill also ships scripts/, references/, or assets/ — fetch the whole folder from https://github.com/vercel-labs/ai-python instead of creating only a SKILL.md.

Full package on GitHub ↗

Install from the terminal · Skills CLI

Requires Node.js and npx. First inspect the repository's skill list to confirm the name.

npx skills add 'https://github.com/vercel-labs/ai-python' --list

npx skills add 'https://github.com/vercel-labs/ai-python' --skill 'ai'

The CLI lets you choose the agent interactively. The default scope is the project; use -g for user scope. Confirm package availability with the discovery command, then use npx skills list to inspect installed skills.

Readable layout

name: ai description: AI SDK for Python (the ai package). Use for Python model calls (LLMs, image, video, speech, embedding, transcription, reranking, or evaluation), agents, model interaction tests, tool calling, subagents, approvals, durable execution, telemetry, AI SDK UI backends, and custom providers. metadata: sdk-version: "0.5.0"

AI SDK for Python

Package: ai. Requires Python 3.12+. Install with uv add ai.

Unprefixed model IDs use AI Gateway and AI_GATEWAY_API_KEY. Direct providers use provider:model, their API key, and an extra:

uv add "ai[openai]"     # OPENAI_API_KEY,    ai.get_model("openai:gpt-5")
uv add "ai[anthropic]"  # ANTHROPIC_API_KEY, ai.get_model("anthropic:claude-sonnet-4")

Basic use

Use ai.stream for one model call without Python tool execution:

import ai

model = ai.get_model("anthropic/claude-sonnet-4")
messages = [
    ai.system_message("Be concise."),
    ai.user_message("Write a haiku about rain."),
]

async with ai.stream(model, messages) as stream:
    async for event in stream:
        if isinstance(event, ai.events.TextDelta):
            print(event.chunk, end="", flush=True)

answer = stream.output
message = stream.message

Use ai.Agent for a loop that executes Python tools and manages history:

@ai.tool
async def get_weather(city: str) -> str:
    """Get the weather for a city."""
    return "Sunny"


agent = ai.Agent(tools=[get_weather])
async with agent.run(model, messages) as run:
    async for event in run:
        if isinstance(event, ai.events.TextDelta):
            print(event.chunk, end="", flush=True)

answer = run.output
history = run.messages

These examples are sufficient for basic model calls, messages, tools, and agents.

Advanced work

For an advanced task, fetch its page under https://ai-python.dev/docs/ and read the listed local notes before writing code.

| Task | Page | Local notes | |---|---|---| | Provider clients, options, discovery | basics/providers.md | — | | Structured output, complex streams | basics/streaming.md | — | | Buffered language-model calls | basics/streaming.md | — | | Images, video, speech, embeddings, transcription, reranking, evaluation | basics/model-operations.md | — | | Events and serialization | basics/messages-and-events.md | — | | Advanced tools, streaming, aggregation | basics/tools.md | streaming-tools.md | | Advanced agent behavior | basics/agents.md | — | | Deterministic model and agent tests | basics/testing.md | — | | Subagents and multi-agent | basics/subagents-and-multi-agent.md | streaming-tools.md | | Custom agent loops | basics/custom-loops.md | custom-loops.md | | Approvals and hooks | basics/human-in-the-loop.md | — | | Serverless resume | basics/human-in-the-loop.md | serverless.md | | Durable execution | basics/durable-execution.md | durable.md | | Telemetry and tracing | basics/telemetry.md | — | | AI SDK UI backends | basics/ai-sdk-ui.md | ui.md | | Custom providers | basics/providers.md | custom-provider.md |

For exact APIs, use reference.md and the relevant reference/*.md page.

Related skills

Media

Nano Banana Pro

Generate/edit images with Nano Banana Pro (Gemini 3 Pro Image). Use for image create/modify requests incl. edits. Supports text-to-image + i…

Media

Youtube Watcher

Fetch and read transcripts from YouTube videos. Use when you need to summarize a video, answer questions about its content, or extract infor…

Media

Atxp

Access ATXP paid API tools for web search, AI image generation, music creation, video generation, X/Twitter search, email, and agent account…

Media

Youtube

YouTube Data API integration with managed OAuth. Search videos, manage playlists, access channel data, and interact with comments. Use this …