Code Recipes are self-contained examples that demonstrate how to accomplish specific tasks with Freeplay. Each recipe includes complete, working code that you can copy and adapt for your own projects.Documentation Index
Fetch the complete documentation index at: https://docs.freeplay.ai/llms.txt
Use this file to discover all available pages before exploring further.
How Recipes Relate to Other Documentation
| Resource | Purpose | When to Use |
|---|---|---|
| Code Recipes | Complete, runnable examples | Starting a new integration or looking for working code |
| SDK Documentation | Detailed API reference | Understanding all available methods and options |
| API Reference | HTTP endpoint documentation | Building custom integrations or debugging |
| How-To Guides | Step-by-step implementation guides | Learning patterns and best practices |
Recipe Categories
Basic Patterns
Get started with fundamental Freeplay integration patterns.- Single Prompt - Fetch and call a single prompt template
- Multi-Prompt Chain - Chain multiple prompts together
- Record Agent Traces - Group related completions into traces
- Multi-Chain Prompt with Traces - Complex multi-step workflows
Chat & Conversations
Build conversational AI applications.- Managing Multi-Turn Chat History - Maintain conversation context across turns
Tool Calling
Implement function calling with different providers.- OpenAI Function Calls - Use tools with OpenAI models
- Anthropic Tools - Use tools with Claude models
- Google GenAI Chat with Tools - Multi-turn chat with tools using Google Gemini models
Providers & Model Hosting
Connect to models hosted on different platforms.- OpenAI on Azure - Use Azure-hosted OpenAI models
- Anthropic on Bedrock - Use Claude via AWS Bedrock
- Llama on SageMaker - Deploy Llama models on SageMaker
- Provider Switching - Switch between providers dynamically
- LiteLLM Proxy - Use LiteLLM for unified provider access
Testing
Run tests and evaluations programmatically.- Test Runs - Execute test runs against datasets
- Tests with Tools - Run tests that include tool calls
Specialized
Advanced patterns and integrations.- OpenAI Responses API - Use OpenAI’s Responses API with text, images, tools, and structured outputs
- Structured Outputs - Get typed, structured responses from models
- OpenAI Batch API - Process large batches efficiently
- Pipecat Observer - Monitor Pipecat voice pipelines
- Pipecat Processor - Process audio with Pipecat
- LangGraph - Comprehensive LangGraph integration guide
Using Recipes
Each recipe follows a consistent structure:- Prerequisites - What you need before starting
- Setup - Environment and client configuration
- Implementation - Step-by-step code with explanations
- Complete Example - Full working code you can run

