SDK v2 Tutorials

Step-by-step tutorials to learn the PromptKit SDK v2 pack-first architecture.

Learning Path

Follow these tutorials in order for a structured learning experience:

Getting Started

  1. Your First Conversation
    Build a chatbot in 5 lines of code. Learn sdk.Open() and basic message sending.

  2. Streaming Responses
    Implement real-time streaming with conv.Stream(). Display incremental results.

Building Features

  1. Tool Integration
    Add function calling with OnTool(). Register handlers and build a weather assistant.

  2. Variables and Templates
    Use SetVar()/GetVar() for template variables. Manage conversation context.

Advanced Topics

  1. Human-in-the-Loop Implement approval workflows with OnToolAsync(). Build safe AI agents.

  2. Working with Media Handle images and multimodal content. Optimize memory with storage.

Voice & Audio

  1. Audio Sessions Build voice-enabled conversations with VAD and ASM modes. Real-time audio streaming.

  2. TTS Integration Add text-to-speech to responses. Configure voices, formats, and providers.

  3. Variable Providers Inject dynamic context with RAG, database lookups, and session state.

Prerequisites

What You’ll Build

By completing these tutorials, you’ll:

Getting Help

Start with Your First Conversation