# Vibes Agent SDK > Pydantic AI patterns for TypeScript. Using Vercel AI SDK. ## Docs - [Direct Model Requests](https://vibes-sdk.a7ul.com/advanced/direct-model-requests.md): Call AI models directly with generateText and streamText when you don't need the agent wrapper. - [Error Handling](https://vibes-sdk.a7ul.com/advanced/error-handling.md): Understand the Vibes error taxonomy and apply the right recovery strategy for each error type. - [HTTP Retries](https://vibes-sdk.a7ul.com/advanced/http-retries.md): How the Vibes SDK handles retries for model requests and how to configure retry behaviour. - [Multimodal](https://vibes-sdk.a7ul.com/advanced/multimodal.md): Send images, audio, video, and documents to models, and receive binary content from tools. - [MemoryToolset](https://vibes-sdk.a7ul.com/community/memory-toolset.md): Persistent key-value memory scratchpad — store, recall, search, and delete named facts from inside any @vibesjs/sdk agent. - [Community Toolsets](https://vibes-sdk.a7ul.com/community/overview.md): Ready-made toolsets built by the community that you can drop into any @vibesjs/sdk agent. - [SkillsToolset](https://vibes-sdk.a7ul.com/community/skills-toolset.md): Dynamic skill discovery toolset — let an agent load skill instructions at runtime from a directory of markdown files. - [Publishing Custom Toolsets](https://vibes-sdk.a7ul.com/community/third-party-tools.md): How to build, package, and publish a community toolset for the Vibes SDK — conventions, the SkillLoader pattern, and guidelines for toolset authors. - [TodoToolset](https://vibes-sdk.a7ul.com/community/todo-toolset.md): Task tracking toolset — add, list, update, and clear todos from inside any @vibesjs/sdk agent. - [Agents](https://vibes-sdk.a7ul.com/concepts/agents.md): An Agent is the central building block in Vibes — a typed, reusable container that combines a model, system prompt, tools, and output schema into a single cohesive object. - [Built-in Toolsets](https://vibes-sdk.a7ul.com/concepts/built-in-tools.md): Reference for every toolset class that ships with the Vibes SDK, with constructor signatures, options, and usage examples. - [Debugging and Monitoring](https://vibes-sdk.a7ul.com/concepts/debugging.md): Instrument agents with OpenTelemetry tracing using instrumentAgent() and TelemetrySettings - structured spans per model call and tool invocation. - [Dependencies](https://vibes-sdk.a7ul.com/concepts/dependencies.md): Dependency injection in Vibes — declare what your agent needs, inject it at run time, and access it everywhere inside tools, prompts, and validators without globals. - [Evaluation Framework](https://vibes-sdk.a7ul.com/concepts/evals.md): Production-grade evals in code - typed datasets, built-in and LLM-as-judge evaluators, experiment runners that live in your repo and run in CI. - [Graph Workflows](https://vibes-sdk.a7ul.com/concepts/graph.md): Build multi-step pipelines as finite state machines with BaseNode and Graph - with built-in persistence and Mermaid visualization. - [Graph Patterns](https://vibes-sdk.a7ul.com/concepts/graph-patterns.md): Practical patterns for conditional branching, error handling, and state design in Vibes graph workflows. - [Human-in-the-Loop](https://vibes-sdk.a7ul.com/concepts/human-in-the-loop.md): Gate sensitive tool execution behind human approval with requiresApproval, ApprovalRequiredError, and agent.resume(). - [Messages and Chat History](https://vibes-sdk.a7ul.com/concepts/messages.md): Managing conversation context with result.messages and history processors - trim, summarize, filter, and serialize messages across sessions. - [Models](https://vibes-sdk.a7ul.com/concepts/models.md): Vibes uses the Vercel AI SDK model abstraction, accepting any AI SDK-compatible provider. Swap models at construction time or override per run. - [Multi-Agent Systems](https://vibes-sdk.a7ul.com/concepts/multi-agent.md): One agent is rarely enough for complex tasks. Learn how to compose specialist agents, pass dependencies through the hierarchy, and aggregate usage across an entire delegation chain. - [Results](https://vibes-sdk.a7ul.com/concepts/results.md): Agent runs return RunResult or StreamResult, carrying the typed output, full message history, new messages, and token usage. - [Streaming](https://vibes-sdk.a7ul.com/concepts/streaming.md): Real-time token and event streaming with agent.stream() and agent.runStreamEvents() - text deltas, tool call visibility, and progressive structured output. - [Testing](https://vibes-sdk.a7ul.com/concepts/testing.md): First-class testing with no real API calls - TestModel, FunctionModel, and setAllowModelRequests(false) make every agent fully testable in CI. - [Thinking / Extended Reasoning](https://vibes-sdk.a7ul.com/concepts/thinking.md): Enable extended reasoning for Anthropic and Google models by configuring thinking at the model constructor level via provider-specific options. - [Tool Patterns](https://vibes-sdk.a7ul.com/concepts/tool-patterns.md): Advanced patterns for building tools: conditional availability with prepare, multimodal returns, sequential execution, role-based toolset composition, and approval workflows. - [Tools](https://vibes-sdk.a7ul.com/concepts/tools.md): Tools are how agents act on the world. The model decides when to call them; Vibes validates the arguments, runs the function, and feeds results back into the conversation. - [Toolsets](https://vibes-sdk.a7ul.com/concepts/toolsets.md): Toolsets are composable, per-turn tool collections. They let you group, filter, rename, intercept, and dynamically expose tools based on runtime context. - [Usage Limits](https://vibes-sdk.a7ul.com/concepts/usage-limits.md): Cap token consumption and request counts per run to prevent runaway agents and control costs. - [A2A (Agent-to-Agent)](https://vibes-sdk.a7ul.com/examples/a2a.md): Two agents communicating via Google's A2A protocol - a research agent server and a client that queries it over HTTP. - [Bank Support](https://vibes-sdk.a7ul.com/examples/bank-support.md): Port of Pydantic AI's canonical bank support example to TypeScript - demonstrates dependency injection, dynamic instructions, and structured output. - [Chat App](https://vibes-sdk.a7ul.com/examples/chat-app.md): A multi-turn chat application connecting a Vibes streaming agent to a React frontend with Vercel AI UI. - [Graph Workflow](https://vibes-sdk.a7ul.com/examples/graph-workflow.md): A multi-step article pipeline using Vibes Graph - demonstrates BaseNode, state transitions with next(), and terminal output(). - [Hello World](https://vibes-sdk.a7ul.com/examples/hello-world.md): The simplest possible Vibes agent - create and run an agent in 5 lines. - [Human-in-the-Loop](https://vibes-sdk.a7ul.com/examples/human-in-the-loop.md): End-to-end deferred tool approval - the agent pauses when it needs to send an email, a human approves, and the agent resumes. - [Examples](https://vibes-sdk.a7ul.com/examples/index.md): Copy-paste runnable examples covering the full Vibes feature surface, from hello world to multi-agent A2A. - [RAG (Retrieval-Augmented Generation)](https://vibes-sdk.a7ul.com/examples/rag.md): Retrieval-augmented generation using a Vibes tool for vector search - swap the mock retriever for any real vector DB. - [Weather Agent](https://vibes-sdk.a7ul.com/examples/weather-agent.md): A weather lookup agent demonstrating tools, external API calls, and structured output. - [Getting Help](https://vibes-sdk.a7ul.com/getting-started/getting-help.md): Where to ask questions, report bugs, and get the most out of the Vibes community. - [Hello World](https://vibes-sdk.a7ul.com/getting-started/hello-world.md): Build your first AI agent in 5 minutes. Start simple, add tools, structured output, and tests. - [Installation](https://vibes-sdk.a7ul.com/getting-started/install.md): Install Vibes SDK and configure your AI provider in under 2 minutes. - [Troubleshooting](https://vibes-sdk.a7ul.com/getting-started/troubleshooting.md): Solutions for common setup issues, provider errors, failed tool calls, and Zod schema mistakes. - [Vibes Agent SDK](https://vibes-sdk.a7ul.com/index.md): TypeScript agent framework for building production-grade, type-safe AI applications and workflows, the [Pydantic AI](https://ai.pydantic.dev) way, using [Vercel AI SDK](https://sdk.vercel.ai). - [A2A (Agent-to-Agent)](https://vibes-sdk.a7ul.com/integrations/a2a.md): Expose a Vibes agent as an A2A-compatible server for cross-vendor agent interoperability using A2AAdapter. - [AG-UI](https://vibes-sdk.a7ul.com/integrations/ag-ui.md): Connect a Vibes agent to CopilotKit and AG-UI-compatible frontends using AGUIAdapter. - [MCP Client](https://vibes-sdk.a7ul.com/integrations/mcp-client.md): The Model Context Protocol gives agents a standardized way to call tools on any server — local or remote. Learn how to connect Vibes agents to MCP servers using MCPStdioClient, MCPHttpClient, MCPToolset, and MCPManager. - [MCP Server](https://vibes-sdk.a7ul.com/integrations/mcp-server.md): Expose a Vibes agent as an MCP server so any MCP-compatible client - Claude Desktop, Cursor, or another AI agent - can call it as a tool. - [Temporal](https://vibes-sdk.a7ul.com/integrations/temporal.md): Run Vibes agents as durable, fault-tolerant workflows using Temporal's orchestration platform. - [Vercel AI UI](https://vibes-sdk.a7ul.com/integrations/vercel-ai-ui.md): Stream Vibes agent output to React frontends using Vercel AI SDK's useChat and useCompletion hooks. - [Introduction](https://vibes-sdk.a7ul.com/introduction.md): Why Vibes exists, its design philosophy, and the projects that inspired it. - [Acknowledgments](https://vibes-sdk.a7ul.com/meta/acknowledgments.md): Vibes stands on the shoulders of giants - thanks to the teams who built the foundations we build on. - [Agent Skill](https://vibes-sdk.a7ul.com/meta/agent-skill.md): Give your coding assistant complete knowledge of @vibesjs/sdk - install in one command. - [Auto-Updates from Pydantic AI](https://vibes-sdk.a7ul.com/meta/auto-updates.md): How @vibesjs/sdk tracks Pydantic AI releases and stays up to date. - [Contributing](https://vibes-sdk.a7ul.com/meta/contributing.md): How to set up the development environment, run tests, follow code style, and open a pull request. - [Feature Parity](https://vibes-sdk.a7ul.com/reference/features.md): Comparison with Pydantic AI features and links to documentation ## OpenAPI Specs - [openapi](https://vibes-sdk.a7ul.com/api-reference/openapi.json)