MCPcopy Index your code
hub / github.com/ai-hero-dev/ai-sdk-v6-crash-course

github.com/ai-hero-dev/ai-sdk-v6-crash-course @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
392 symbols 1,274 edges 285 files 2 documented · 1%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

AI SDK v6 Crash Course

AI SDK 6 Crash Course

🚀 Master AI SDK v6 with AI Hero's comprehensive crash course. This repository contains all the code examples and exercises from our hands-on, practical course focused on AI SDK v6 - the incredible TypeScript library that's becoming the standard for AI app development.

Learn to build production-ready AI applications using AI SDK v6's powerful features and modern development patterns. Available on aihero.dev.

🎯 What You'll Master with AI SDK v6

This crash course will take you from AI SDK v6 basics to advanced production patterns:

  • AI SDK v6 Core Concepts - Understanding the modern AI development toolkit
  • Streaming with AI SDK v6 - Building real-time, responsive AI experiences using streamText
  • Tool Calling & Function Calling - Creating AI applications that can use external tools and APIs
  • Message Parts & Data - Working with structured message components and custom data
  • Multi-Provider Support - Seamlessly switching between OpenAI, Anthropic, Google, and more
  • File & Image Handling - Processing and working with multimedia content
  • Advanced Memory Patterns - Sophisticated state management and conversation handling
  • Production-Ready Features - Built-in testing, monitoring, and deployment capabilities

🚀 Quick Start

Prerequisites

Setup

  1. Clone this repository:
git clone https://github.com/ai-hero-dev/ai-sdk-v6-crash-course.git
cd ai-sdk-v6-crash-course
  1. Install dependencies:
pnpm install
  1. Configure your environment:
cp .env.example .env
  1. Add your API keys to .env and you're ready to start learning!

📚 Course Structure

Start by running pnpm dev:

pnpm dev

This will allow you to choose between the different course sections.

You can also run pnpm exercise <exercise-number> to jump to a specific exercise.

📁 AI SDK v6 Course Modules

exercises/
├── 01-basics/                    # AI SDK v6 fundamentals
│   ├── 01.1-what-is-the-ai-sdk/
│   ├── 01.2-choosing-a-model/
│   ├── 01.3-stream-text-to-terminal/
│   ├── 01.4-ui-message-streams/
│   ├── 01.5-stream-text-to-ui/
│   └── 01.6-system-prompts/
├── 02-agents/                    # Tool calling & agents
├── 03-advanced/                  # Advanced patterns
└── 99-reference/                 # Material reference

🛠️ Learning Workflow

Each exercise follows this learning structure:

problem/ folder

  • Your coding playground - Start here!
  • Contains readme.md with detailed instructions
  • Code files with TODO comments for you to implement

solution/ folder

  • Reference implementation - Check when you're stuck
  • Complete, working code for each exercise
  • Great for comparing approaches and learning best practices

explainer/ folder

  • Deep dives - Additional explanations and concepts
  • Extended walkthroughs of complex topics
  • Perfect for reinforcing your understanding

🤝 Getting Help

  1. Check the solution - Each exercise has a completed version
  2. Verify your setup - Ensure API keys and dependencies are correct
  3. Watch the course - Full explanations available on aihero.dev

Ready to master AI SDK v6 and become an AI development expert? Let's start building the future! 🚀

Extension points exported contracts — how you extend this code

Chat (Interface)
(no doc)
exercises/04-persistence/04.03-persistence/solution/api/persistence-layer.ts
PersistenceData (Interface)
(no doc)
exercises/04-persistence/04.03-persistence/solution/api/persistence-layer.ts
Chat (Interface)
(no doc)
exercises/04-persistence/04.03-persistence/problem/api/persistence-layer.ts
PersistenceData (Interface)
(no doc)
exercises/04-persistence/04.03-persistence/problem/api/persistence-layer.ts

Core symbols most depended-on inside this repo

runLocalDevServer
called by 52
shared/run-local-dev-server.ts
getRelativePath
called by 32
exercises/03-agents/03.03-showing-tools-in-the-frontend/solution/api/file-system-functionality.ts
getRelativePath
called by 32
exercises/03-agents/03.03-showing-tools-in-the-frontend/problem/api/file-system-functionality.ts
getRelativePath
called by 32
exercises/03-agents/03.01-tool-calling/solution/api/file-system-functionality.ts
getRelativePath
called by 32
exercises/03-agents/03.01-tool-calling/problem/api/file-system-functionality.ts
getRelativePath
called by 32
exercises/03-agents/03.04-tool-loop-agent/explainer/api/file-system-functionality.ts
getRelativePath
called by 32
exercises/03-agents/03.02-message-parts/explainer/file-system-functionality.ts
ensureBaseDir
called by 7
exercises/03-agents/03.03-showing-tools-in-the-frontend/solution/api/file-system-functionality.ts

Shape

Function 388
Interface 4

Languages

TypeScript100%

Modules by API surface

exercises/03-agents/03.04-tool-loop-agent/explainer/api/file-system-functionality.ts11 symbols
exercises/03-agents/03.03-showing-tools-in-the-frontend/solution/api/file-system-functionality.ts11 symbols
exercises/03-agents/03.03-showing-tools-in-the-frontend/problem/api/file-system-functionality.ts11 symbols
exercises/03-agents/03.02-message-parts/explainer/file-system-functionality.ts11 symbols
exercises/03-agents/03.01-tool-calling/solution/api/file-system-functionality.ts11 symbols
exercises/03-agents/03.01-tool-calling/problem/api/file-system-functionality.ts11 symbols
exercises/04-persistence/04.03-persistence/solution/api/persistence-layer.ts9 symbols
exercises/04-persistence/04.03-persistence/problem/api/persistence-layer.ts9 symbols
exercises/09-advanced-patterns/09.04-research-workflow/solution/api/chat.ts5 symbols
exercises/09-advanced-patterns/09.04-research-workflow/problem/api/chat.ts5 symbols
exercises/01-ai-sdk-basics/01.10-passing-images-and-files/solution/client/components.tsx5 symbols
exercises/01-ai-sdk-basics/01.10-passing-images-and-files/problem/client/components.tsx5 symbols

For agents

$ claude mcp add ai-sdk-v6-crash-course \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page