ai

Abstract low-level LLM provider APIs and streaming logic for Python applications.

159|19|Updated Jan 16, 2026
One-click install
npx skills add https://github.com/vercel-labs/ai-python --skill ai-vercel-labs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ai
Source: https://github.com/vercel-labs/ai-python/tree/main/skills/ai
Command: npx skills add https://github.com/vercel-labs/ai-python --skill ai-vercel-labs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill eliminates the complexity of manually integrating LLM provider APIs, handling async streaming, managing agent loops, and executing custom tools when building LLM-powered applications in Python.

Core Features & Use Cases

  • LLM Provider Integration: Supports OpenAI, Anthropic, and AI Gateway with lazy loading of official SDKs for direct provider routes.
  • Agent & Tool Orchestration: Build autonomous agents that execute custom Python tools, manage message history, and handle multi-step workflows with built-in event streaming.
  • Structured Output & Media Generation: Generate validated Pydantic structured outputs, images, and videos directly from LLM calls for use cases like data extraction, content creation, and automated reporting.

Quick Start

Use the ai skill to build an async weather assistant agent that streams real-time responses and executes custom tool calls for city weather lookups.

Frequently Asked Questions about ai

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build autonomous agents in Python that execute custom tools?

Build autonomous agents in Python by abstracting low-level LLM provider API integrations and streaming logic. This Skill handles agent orchestration, custom async tool execution, and message history management for multi-step workflows.

How do I generate structured Pydantic output from LLM calls?

Generate structured Pydantic output from LLM calls using built-in validation features. This allows direct data extraction and automated reporting by returning validated Python objects instead of raw text responses.

Does this Python agent framework support OpenAI and Anthropic?

Yes, it supports OpenAI, Anthropic, and AI Gateway integrations. It uses lazy loading of official SDKs for provider-agnostic model routing, allowing you to switch LLM providers without rewriting core logic.

Can I use async streaming for real-time responses in LLM applications?

Yes, you can use async context manager-based streaming for real-time responses. The framework includes built-in event handling for tool calls, hooks, and partial results during media generation and agent loops.

What is the best way to manage multi-agent orchestration and hook-based approvals?

Manage multi-agent orchestration and hook-based approvals by utilizing the built-in event streaming and async context managers. This handles message routing and workflow approvals across multiple autonomous agents.

Does it support generating images and videos alongside text from LLM providers?

Yes, it supports text, image, and video media generation directly from LLM calls. This enables content creation and automated reporting workflows alongside structured output generation and tool execution.