Przejdź do treści
Biblioteka skilli
AI i agenci · Budowanie i kod

ai

/ai

Pomaga w bibliotece AI SDK dla Pythona: wywołania modeli, agenci, narzędzia, telemetria, subagenci i własni dostawcy.

Repozytorium
py-ai ↗
Licencja
Apache-2.0
Ostatnia zmiana repozytorium
10.11.2026

Ocena i bezpieczeństwo

95/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść30 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
7
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
1
Przestarzałość

Brak sygnałów. Repozytorium zmienione 10.11.2026, bez odwołań do wycofanych modeli i API.

Licencja

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

Co robi i kiedy

Pomaga w bibliotece AI SDK dla Pythona: wywołania modeli, agenci, narzędzia, telemetria, subagenci i własni dostawcy.

Oryginalny opis (EN)

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

Jak działa

  1. Basic use
  2. Advanced work
Sekcje z nagłówków SKILL.md, w oryginale · 83 linii, 359 słów
Podgląd SKILL.md
---
name: ai
description: AI SDK for Python (the `ai` package). Use for Python model calls (LLMs, image, video, speech, embedding, transcription, reranking, or decisions), 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:

```bash
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:

```python
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:

```python
@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, decisions | `basics/model-operations.md` | — |
| Events and serialization | `basics/messages-and-events.md` | — |
| Advanced tools, streaming, aggregation | `basics/tools.md` | [streaming-tools.md](references/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](references/streaming-tools.md) |
| Custom agent loops | `basics/custom-loops.md` | [custom-loops.md](references/custom-loops.md) |
| Approvals and hooks | `basics/human-in-the-loop.md` | — |
| Serverless resume | `basics/human-in-the-loop.md` | [serverless.md](references/serverless.md) |
| Durable execution | `basics/durable-execution.md` | [durable.md](references/durable.md) |
| Telemetry and tracing | `basics/telemetry.md` | — |
| AI SDK UI backends | `basics/ai-sdk-ui.md` | [ui.md](references/ui.md) |
| Custom providers | `basics/providers.md` | [custom-provider.md](references/custom-provider.md) |

For exact APIs, use `reference.md` and the relevant `reference/*.md` page.
Pliki w paczce (7)
  • SKILL.md 3 KB
  • references/custom-loops.md 1 KB
  • references/custom-provider.md 4 KB
  • references/durable.md 1 KB
  • references/serverless.md 1 KB
  • references/streaming-tools.md 1 KB
  • references/ui.md 2 KB

Wersje

RepozytoriumWynikLicencja
Ta strona · vercel-labs/py-ai95Apache-2.0
butterbase-ai/butterbase-skills100MIT
lilly-logic-labs/lll-skills100MIT
soummyaanon/engineering-os100MIT
zircote-plugins/sdlc-quality100MIT
Tyler-R-Kendrick/agent-skills100MIT
vercel-labs/ai-python95Apache-2.0
watchdoglab/watchdog90MIT

Migawka bazy z 13.11.2026 · wersja paczki c6e941203a76 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 95copilot-sdk
    Buduje aplikacje agentowe z GitHub Copilot SDK: osadzanie agentów AI, własne narzędzia, strumieniowanie odpowiedzi, sesje, serwery MCP i własni agenci.
  • 91copilot-sdk
    Buduje aplikacje agentowe w GitHub Copilot SDK: osadzanie agentów AI, własne narzędzia, odpowiedzi strumieniowe, sesje, serwery MCP i własni agenci.
  • 91copilot-sdk
    Pomaga budować aplikacje na GitHub Copilot SDK w Node.js, Pythonie, Go i .NET: sesje, własne narzędzia, streaming, hooki, serwery MCP, BYOK i własni agenci.
  • 100azure-ai-transcription-py
    Transkrybuje mowę na tekst w czasie rzeczywistym i wsadowo ze znacznikami czasu i diaryzacją mówców przy użyciu Azure AI Transcription SDK dla Pythona.
  • 84liter-llm
    Wywołuje modele LLM 174 dostawców w 14 językach: czat, strumienie, narzędzia, embeddingi, obrazy, serwer MCP i proxy.
  • 100langchain
    Buduje agentów z gotową architekturą i integracjami dla dowolnego modelu lub narzędzia: agenci wywołujący narzędzia, zmiana dostawców modeli i ustrukturyzowane wyjście.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.