Eino: Cookbook
This document serves as an example index for the eino-examples project, helping developers quickly find the sample code they need.
GitHub Repository: https://github.com/cloudwego/eino-examples
π¦ ADK (Agent Development Kit)
Hello World
| Directory | Name | Description |
| adk/helloworld | Hello World Agent | The simplest Agent example, demonstrating how to create a basic conversational Agent |
Intro Examples
| Directory | Name | Description |
| adk/intro/chatmodel | ChatModel Agent | Demonstrates how to use ChatModelAgent with Interrupt mechanism |
| adk/intro/custom | Custom Agent | Demonstrates how to implement a custom Agent conforming to ADK definition |
| adk/intro/workflow/loop | Loop Agent | Demonstrates how to use LoopAgent to implement loop reflection pattern |
| adk/intro/workflow/parallel | Parallel Agent | Demonstrates how to use ParallelAgent for parallel execution |
| adk/intro/workflow/sequential | Sequential Agent | Demonstrates how to use SequentialAgent for sequential execution |
| adk/intro/session | Session Management | Demonstrates how to pass data and state between multiple Agents through Session |
| adk/intro/transfer | Agent Transfer | Demonstrates ChatModelAgent's Transfer capability for task transfer between Agents |
| adk/intro/agent_with_summarization | Agent with Summarization | Demonstrates how to add conversation summarization functionality to an Agent |
| adk/intro/http-sse-service | HTTP SSE Service | Demonstrates how to expose ADK Runner as an HTTP service supporting Server-Sent Events |
Human-in-the-Loop
| Directory | Name | Description |
| adk/human-in-the-loop/1_approval | Approval Mode | Demonstrates human approval mechanism before sensitive operations, requiring user confirmation before Agent execution |
| adk/human-in-the-loop/2_review-and-edit | Review and Edit Mode | Demonstrates human review and editing of tool call parameters, supporting modification, approval, or rejection |
| adk/human-in-the-loop/3_feedback-loop | Feedback Loop Mode | Multi-Agent collaboration where Writer generates content, Reviewer collects human feedback, supporting iterative optimization |
| adk/human-in-the-loop/4_follow-up | Follow-up Mode | Intelligently identifies missing information, collects user requirements through multiple rounds of follow-up questions, completes complex task planning |
| adk/human-in-the-loop/5_supervisor | Supervisor + Approval | Supervisor multi-Agent mode combined with approval mechanism, sensitive operations require human confirmation |
| adk/human-in-the-loop/6_plan-execute-replan | Plan-Execute-Replan + Review Edit | Plan-Execute-Replan mode combined with parameter review and editing, supporting reservation parameter modification |
| adk/human-in-the-loop/7_deep-agents | Deep Agents + Follow-up | Deep Agents mode combined with follow-up mechanism, proactively collecting user preferences before analysis |
| adk/human-in-the-loop/8_supervisor-plan-execute | Nested Multi-Agent + Approval | Supervisor nested with Plan-Execute-Replan sub-Agent, supporting deep nested interrupts |
Multi-Agent
| Directory | Name | Description |
| adk/multiagent/supervisor | Supervisor Agent | Basic Supervisor multi-Agent mode, coordinating multiple sub-Agents to complete tasks |
| adk/multiagent/layered-supervisor | Layered Supervisor | Multi-layer Supervisor nesting, one Supervisor as sub-Agent of another |
| adk/multiagent/plan-execute-replan | Plan-Execute-Replan | Plan-Execute-Replan mode, supporting dynamic adjustment of execution plans |
| adk/multiagent/integration-project-manager | Project Manager | Project management example using Supervisor mode, including Coder, Researcher, Reviewer |
| adk/multiagent/deep | Deep Agents (Excel Agent) | Intelligent Excel assistant, step-by-step understanding and processing Excel files, supporting Python code execution |
| adk/multiagent/integration-excel-agent | Excel Agent (ADK Integration) | ADK integrated Excel Agent, including Planner, Executor, Replanner, Reporter |
GraphTool
| Directory | Name | Description |
| adk/common/tool/graphtool | GraphTool Package | Toolkit for wrapping Graph/Chain/Workflow as Agent tools |
| adk/common/tool/graphtool/examples/1_chain_summarize | Chain Document Summary | Document summarization tool using compose.Chain |
| adk/common/tool/graphtool/examples/2_graph_research | Graph Multi-source Research | Parallel multi-source search and streaming output using compose.Graph |
| adk/common/tool/graphtool/examples/3_workflow_order | Workflow Order Processing | Order processing using compose.Workflow, combined with approval mechanism |
| adk/common/tool/graphtool/examples/4_nested_interrupt | Nested Interrupt | Demonstrates dual-layer interrupt mechanism with outer approval and inner risk control |
π Compose (Orchestration)
Chain
| Directory | Name | Description |
| compose/chain | Chain Basic Example | Demonstrates how to use compose.Chain for sequential orchestration, including Prompt + ChatModel |
Graph
| Directory | Name | Description |
| compose/graph/simple | Simple Graph | Basic Graph usage example |
| compose/graph/state | State Graph | Graph example with state |
| compose/graph/tool_call_agent | Tool Call Agent | Building a tool-calling Agent using Graph |
| compose/graph/tool_call_once | Single Tool Call | Demonstrates single tool call Graph implementation |
| compose/graph/two_model_chat | Two Model Chat | Graph example of two models chatting with each other |
| compose/graph/async_node | Async Node | Demonstrates async Lambda nodes, including report generation and real-time transcription scenarios |
| compose/graph/react_with_interrupt | ReAct + Interrupt | Ticket booking scenario, demonstrating Interrupt and Checkpoint practices |
Workflow
| Directory | Name | Description |
| compose/workflow/1_simple | Simple Workflow | Simplest Workflow example, equivalent to Graph |
| compose/workflow/2_field_mapping | Field Mapping | Demonstrates Workflow field mapping functionality |
| compose/workflow/3_data_only | Data Only Flow | Data-only Workflow example |
| compose/workflow/4_control_only_branch | Control Flow Branch | Control-only branch example |
| compose/workflow/5_static_values | Static Values | Demonstrates how to use static values in Workflow |
| compose/workflow/6_stream_field_map | Stream Field Mapping | Field mapping in streaming scenarios |
Batch
| Directory | Name | Description |
| compose/batch | BatchNode | Batch processing component, supporting concurrency control and interrupt recovery, suitable for document batch review scenarios |
π Flow
ReAct Agent
| Directory | Name | Description |
| flow/agent/react | ReAct Agent | Basic ReAct Agent example, restaurant recommendation scenario |
| flow/agent/react/memory_example | Short-term Memory | Short-term memory implementation for ReAct Agent, supporting memory and Redis storage |
| flow/agent/react/dynamic_option_example | Dynamic Options | Dynamically modify Model Option at runtime, controlling thinking mode and tool selection |
| flow/agent/react/unknown_tool_handler_example | Unknown Tool Handler | Handling unknown tool calls generated by model hallucination, improving Agent robustness |
Multi-Agent
| Directory | Name | Description |
| flow/agent/multiagent/host/journal | Journal Assistant | Host Multi-Agent example, supporting writing journals, reading journals, answering questions based on journals |
| flow/agent/multiagent/plan_execute | Plan-Execute | Plan-Execute mode Multi-Agent example |
Complete Application Examples
| Directory | Name | Description |
| flow/agent/manus | Manus Agent | Manus Agent implemented based on Eino, referencing OpenManus project |
| flow/agent/deer-go | Deer-Go | Go language implementation referencing deer-flow, supporting research team collaboration state graph transitions |
π§© Components
Model
| Directory | Name | Description |
| components/model/abtest | A/B Test Routing | Dynamic routing ChatModel, supporting A/B testing and model switching |
| components/model/httptransport | HTTP Transport Logging | cURL-style HTTP request logging, supporting streaming responses and sensitive information masking |
Retriever
| Directory | Name | Description |
| components/retriever/multiquery | Multi-query Retrieval | Using LLM to generate multiple query variants, improving retrieval recall |
| components/retriever/router | Router Retrieval | Dynamically routing to different retrievers based on query content |
Tool
| Directory | Name | Description |
| components/tool/jsonschema | JSON Schema Tool | Demonstrates how to define tool parameters using JSON Schema |
| components/tool/mcptool/callresulthandler | MCP Tool Result Handler | Demonstrates custom handling of MCP tool call results |
| components/tool/middlewares/errorremover | Error Remover Middleware | Tool call error handling middleware, converting errors to friendly prompts |
| components/tool/middlewares/jsonfix | JSON Fix Middleware | Fixing malformed JSON parameters generated by LLM |
Document
| Directory | Name | Description |
| components/document/parser/customparser | Custom Parser | Demonstrates how to implement a custom document parser |
| components/document/parser/extparser | Extension Parser | Using extension parser to handle HTML and other formats |
| components/document/parser/textparser | Text Parser | Basic text document parser example |
Prompt
| Directory | Name | Description |
| components/prompt/chat_prompt | Chat Prompt | Demonstrates how to use Chat Prompt templates |
Lambda
| Directory | Name | Description |
| components/lambda | Lambda Component | Lambda function component usage example |
π QuickStart
| Directory | Name | Description |
| quickstart/chat | Chat QuickStart | Most basic LLM conversation example, including templates, generation, streaming output |
| quickstart/eino_assistant | Eino Assistant | Complete RAG application example, including knowledge indexing, Agent service, Web interface |
| quickstart/todoagent | Todo Agent | Simple Todo management Agent example |
π οΈ DevOps
| Directory | Name | Description |
| devops/debug | Debug Tools | Demonstrates how to use Eino's debugging features, supporting Chain and Graph debugging |
| devops/visualize | Visualization Tools | Rendering Graph/Chain/Workflow as Mermaid diagrams |
π Related Resources
- Eino Framework: https://github.com/cloudwego/eino
- Eino Extension Components: https://github.com/cloudwego/eino-ext
- Official Documentation: https://www.cloudwego.io/docs/eino/