Samples
All samples are located in the samples/ directory.
Running a sample
Section titled “Running a sample”# Set your API keyexport OPENAI_API_KEY=your-api-key# Or: export GOOGLE_GENAI_API_KEY=your-api-key
# Navigate to a sample and runcd samples/openai./run.sh
# Or with Genkit Dev UI (recommended)genkit start -- ./run.shAvailable samples
Section titled “Available samples”Model provider samples
Section titled “Model provider samples”| Sample | Description |
|---|---|
| openai | Basic OpenAI integration with flows and tools |
| google-genai | Google Gemini integration with image generation |
| anthropic | Anthropic Claude integration with streaming |
| aws-bedrock | AWS Bedrock models integration |
| azure-foundry | Azure AI Foundry models integration |
| xai | xAI Grok models integration |
| deepseek | DeepSeek models integration |
| cohere | Cohere Command models integration |
| mistral | Mistral AI models integration |
| groq | Groq ultra-fast inference integration |
| ollama | Local Ollama models with Gemma 3n |
Feature samples
Section titled “Feature samples”| Sample | Description |
|---|---|
| dotprompt | DotPrompt files with complex inputs/outputs, variants, and partials |
| structured-output | Type-safe structured output generation |
| rag | RAG application with local vector store |
| chat-session | Multi-turn chat with session persistence |
| evaluations | Custom evaluators and evaluation workflows |
| evaluators-plugin | Pre-built RAGAS-style evaluators plugin demo |
| complex-io | Complex nested types, arrays, maps in flow inputs/outputs |
| middleware | Middleware patterns for logging, caching, rate limiting |
| multi-agent | Multi-agent orchestration patterns |
| interrupts | Flow interrupts and human-in-the-loop patterns |
| mcp | Model Context Protocol (MCP) integration |
Deployment & infrastructure samples
Section titled “Deployment & infrastructure samples”| Sample | Description |
|---|---|
| firebase | Firebase integration with Firestore RAG and Cloud Functions |
| spring | Spring Boot HTTP server integration |
| weaviate | Weaviate vector database RAG |
| postgresql | PostgreSQL pgvector RAG |
| pinecone | Pinecone vector database RAG |