Skip to content

SDK Tutorials

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

Follow these tutorials in order for a structured learning experience:

  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.

  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.

  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.

  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.

  • Go 1.21 or higher
  • Basic Go programming knowledge
  • API key for OpenAI, Anthropic, or Google

By completing these tutorials, you’ll:

  • Create conversational AI applications with minimal code
  • Implement streaming and tool calling
  • Build approval workflows for sensitive operations
  • Understand SDK architecture and patterns

Start with Your First Conversation