ben-vargas/ai-sdk-provider-claude-code
Vercel AI SDK community provider for Claude Agent SDK
What it solves
This project bridges the gap between the Vercel AI SDK and Anthropic's official Claude Agent SDK. It allows developers to use Claude Code's agentic capabilities—such as tool use, session management, and structured output validation—within the standard Vercel AI SDK workflow.
How it works
It acts as a provider for the Vercel AI SDK, wrapping the Claude Agent SDK. You install the package, authenticate via the Claude Code CLI, and use the claudeCode function to initialize models like Sonnet or Haiku. It supports streaming, multi-turn conversations, and native structured output validation, where the CLI ensures the model's response adheres to your defined Zod schema.
Who it’s for
Developers who want to build agentic applications using the Vercel AI SDK but need the specific, robust tool-use and session-control features provided by the official Claude Agent SDK and Claude Code CLI.
Highlights
- Native structured output support with schema validation.
- Full compatibility with Vercel AI SDK streaming and tool-calling patterns.
- Advanced session controls, including resuming sessions and custom tool management.
- Support for MCP (Model Context Protocol) servers and custom plugins.
- Explicit configuration options for system prompts and filesystem settings to ensure predictable behavior in CI/CD environments.
Related
- Project
- Project
- Project
- Project
- Project