Examples Overview

May 7, 2026 · View on GitHub

This page lists all maintained Hayhooks examples with detailed descriptions and links to the source code.

Pipeline wrapper examples

ExampleDocsCodeDescription
Chat with Website (Streaming)chat-with-website.mdGitHubWebsite Q&A with streaming
Chat with Website (basic)GitHubMinimal website Q&A wrapper
Chat with Website (MCP)GitHubExposes website Q&A as MCP Tool
Async Question Answer (Streaming)async-operations.mdGitHubAsync pipeline and streaming patterns
Custom Tracingtracing.mdGitHubDirect OpenAI-based YAML classifier (io_bound vs cpu_bound) with nested custom tracing spans
Open WebUI Agent Eventsopenwebui-events.mdGitHubUI events and status updates
Open WebUI Agent on Tool Callsopenwebui-events.mdGitHubTool call interception & feedback
Open WebUI Reasoning Agent (GPT-5.4 mini)openai-compatibility.mdGitHubStreams reasoning summaries to Open WebUI "Thinking" blocks using OpenAIResponsesChatGenerator
Responses File Upload (Server-side tools)openai-compatibility.mdGitHubResponses API file reading/upload via server-side agent tools
Agent Codex (Client-Side Tools)openai-compatibility.mdGitHubHybrid Responses API demo: server weather tool + Codex client-side tools (exec_command)
Image Generation (File Response)file-response-support.mdGitHubReturning binary files (images) from run_api
Shared Code Between WrappersGitHubReusing code across wrappers

End-to-end examples & patterns

ExampleDocsCodeDescription
RAG: Indexing and Query with Elasticsearchrag-system.mdGitHubFull indexing/query pipelines with Elasticsearch
API Key Authenticationadvanced-configuration.mdGitHubMiddleware-based API key auth with multi-key support and Swagger Authorize

How to use examples

Prerequisites:

  • Install Hayhooks: pip install hayhooks (additional deps per example may apply)

Deployment:

  • Pipeline wrappers: deploy directly with hayhooks pipeline deploy-files -n <name> <example_dir> and run via API (POST /<name>/run) or OpenAI-compatible chat endpoints if implemented
  • End-to-end examples: follow the example's documentation for full setup (services like Elasticsearch, multi-pipeline deployment, datasets, etc.)

For general usage and CLI commands, see the Getting Started Guide.

Try all examples with Docker Compose

The repository includes a compose.yml file that automatically deploys all pipeline wrapper examples:

# Clone the repository
git clone https://github.com/deepset-ai/hayhooks.git
cd hayhooks

# Set your API key (required for most examples)
export OPENAI_API_KEY=your-api-key

# Start Hayhooks with all examples
docker compose up -d

This will:

  • Start Hayhooks on port 1416 (API) and 1417 (MCP server)
  • Auto-deploy all pipeline wrappers from examples/pipeline_wrappers/
  • Install required dependencies like trafilatura

Check deployed pipelines:

curl localhost:1416/status

Access the API documentation at http://localhost:1416/docs.