Overview of Hayhooks Pipeline Wrapper Examples
mainHayhooks provides several pipeline wrapper patterns to handle different AI workflows. Key patterns include:
- Streaming Support: Examples like
multi_llm_streamingandasync_question_answerdemonstrate automatic multi-component streaming and OpenAI-compatible chat interfaces. - Hybrid Sync/Async: The
async_hybrid_streamingexample shows how to useallow_sync_streaming_callbacks=Trueto bridge legacy synchronous components into an asynchronous pipeline. - Agentic Workflows: Examples like
open_webui_agent_eventsandopen_webui_agent_on_tool_callsdemonstrate how to integrate agents with Open WebUI, providing real-time status updates and tool-call lifecycle feedback. - File & Binary Handling:
image_generationshows how to returnFileResponse(e.g., images) directly, whilechat_completion_with_file_uploaddemonstrates using the/v1/filesendpoint with OpenAI-compatible multi-part content formats. - Multi-Agent Systems:
a2a_multi_agentdemonstrates Agent-to-Agent (A2A) communication where agents delegate tasks to each other using an A2A client tool and MCP (Model Context Protocol). - RAG Implementations:
rag_indexing_queryprovides a complete pattern for document indexing and querying using Elasticsearch.