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

DirectoryNameDescription
adk/helloworldHello World AgentThe simplest Agent example, demonstrating how to create a basic conversational Agent

Intro Examples

DirectoryNameDescription
adk/intro/chatmodelChatModel AgentDemonstrates how to use ChatModelAgent with the Interrupt mechanism
adk/intro/customCustom AgentDemonstrates how to implement a custom Agent conforming to ADK definition
adk/intro/workflow/loopLoop AgentDemonstrates how to use LoopAgent to implement loop reflection pattern
adk/intro/workflow/parallelParallel AgentDemonstrates how to use ParallelAgent for parallel execution
adk/intro/workflow/sequentialSequential AgentDemonstrates how to use SequentialAgent for sequential execution
adk/intro/sessionSession ManagementDemonstrates how to pass data and state between multiple Agents through Session
adk/intro/transferAgent TransferDemonstrates the Transfer capability of ChatModelAgent for task transfer between Agents
adk/intro/agent_with_summarizationAgent with SummarizationDemonstrates how to add conversation summarization functionality to an Agent
adk/intro/http-sse-serviceHTTP SSE ServiceDemonstrates how to expose ADK Runner as an HTTP service supporting Server-Sent Events

Human-in-the-Loop

DirectoryNameDescription
adk/human-in-the-loop/1_approvalApproval ModeDemonstrates human approval mechanism before sensitive operations, requiring user confirmation before Agent execution
adk/human-in-the-loop/2_review-and-editReview and Edit ModeDemonstrates human review and editing of tool call parameters, supporting modification, approval or rejection
adk/human-in-the-loop/3_feedback-loopFeedback Loop ModeMulti-Agent collaboration where Writer generates content, Reviewer collects human feedback, supporting iterative optimization
adk/human-in-the-loop/4_follow-upFollow-up ModeIntelligently identifies missing information, collects user requirements through multiple rounds of follow-up questions, completes complex task planning
adk/human-in-the-loop/5_supervisorSupervisor + ApprovalSupervisor Multi-Agent mode combined with approval mechanism, requiring human confirmation for sensitive operations
adk/human-in-the-loop/6_plan-execute-replanPlan-Execute-Replan + Review EditPlan-Execute-Replan mode combined with parameter review editing, supporting reservation parameter modification
adk/human-in-the-loop/7_deep-agentsDeep Agents + Follow-upDeep Agents mode combined with follow-up mechanism, proactively collecting user preferences before analysis
adk/human-in-the-loop/8_supervisor-plan-executeNested Multi-Agent + ApprovalSupervisor nested with Plan-Execute-Replan sub-Agent, supporting deep nested interrupts

Multi-Agent

DirectoryNameDescription
adk/multiagent/supervisorSupervisor AgentBasic Supervisor Multi-Agent mode, coordinating multiple sub-Agents to complete tasks
adk/multiagent/layered-supervisorLayered SupervisorMulti-layer Supervisor nesting, one Supervisor as a sub-Agent of another
adk/multiagent/plan-execute-replanPlan-Execute-ReplanPlan-Execute-Replan mode, supporting dynamic execution plan adjustment
adk/multiagent/integration-project-managerProject ManagerProject management example using Supervisor mode, including Coder, Researcher, Reviewer
adk/multiagent/deepDeep Agents (Excel Agent)Intelligent Excel assistant, step-by-step understanding and processing Excel files, supporting Python code execution
adk/multiagent/integration-excel-agentExcel Agent (ADK Integration)ADK integrated Excel Agent, including Planner, Executor, Replanner, Reporter

GraphTool

DirectoryNameDescription
adk/common/tool/graphtoolGraphTool PackageToolkit for wrapping Graph/Chain/Workflow as Agent tools
adk/common/tool/graphtool/examples/1_chain_summarizeChain Document SummarizationImplementing document summarization tool using compose.Chain
adk/common/tool/graphtool/examples/2_graph_researchGraph Multi-source ResearchImplementing parallel multi-source search and streaming output using compose.Graph
adk/common/tool/graphtool/examples/3_workflow_orderWorkflow Order ProcessingImplementing order processing using compose.Workflow, combined with approval mechanism
adk/common/tool/graphtool/examples/4_nested_interruptNested InterruptDemonstrates dual-layer interrupt mechanism with outer approval and inner risk control

πŸ”— Compose (Orchestration)

Chain (Chain Orchestration)

DirectoryNameDescription
compose/chainChain Basic ExampleDemonstrates how to use compose.Chain for sequential orchestration, including Prompt + ChatModel

Graph (Graph Orchestration)

DirectoryNameDescription
compose/graph/simpleSimple GraphBasic Graph usage example
compose/graph/stateState GraphGraph example with state
compose/graph/tool_call_agentTool Call AgentBuilding tool calling Agent using Graph
compose/graph/tool_call_onceSingle Tool CallDemonstrates single tool call Graph implementation
compose/graph/two_model_chatTwo Model ChatGraph example of two models chatting with each other
compose/graph/async_nodeAsync NodeDemonstrates async Lambda nodes, including report generation and real-time transcription scenarios
compose/graph/react_with_interruptReAct + InterruptTicket booking scenario, demonstrating Interrupt and Checkpoint practices

Workflow (Workflow Orchestration)

DirectoryNameDescription
compose/workflow/1_simpleSimple WorkflowThe simplest Workflow example, equivalent to Graph
compose/workflow/2_field_mappingField MappingDemonstrates Workflow field mapping functionality
compose/workflow/3_data_onlyData Only FlowData-only Workflow example
compose/workflow/4_control_only_branchControl Flow BranchControl-flow-only branch example
compose/workflow/5_static_valuesStatic ValuesDemonstrates how to use static values in Workflow
compose/workflow/6_stream_field_mapStream Field MappingField mapping in streaming scenarios

Batch (Batch Processing)

DirectoryNameDescription
compose/batchBatchNodeBatch processing component with concurrency control and interrupt recovery, suitable for document batch review scenarios

🌊 Flow (Flow Modules)

ReAct Agent

DirectoryNameDescription
flow/agent/reactReAct AgentReAct Agent basic example, restaurant recommendation scenario
flow/agent/react/memory_exampleShort-term MemoryReAct Agent short-term memory implementation, supporting in-memory and Redis storage
flow/agent/react/dynamic_option_exampleDynamic OptionsDynamically modify Model Options at runtime, controlling thinking mode and tool selection
flow/agent/react/unknown_tool_handler_exampleUnknown Tool HandlerHandle unknown tool calls generated by model hallucination, improving Agent robustness

Multi-Agent

DirectoryNameDescription
flow/agent/multiagent/host/journalJournal AssistantHost Multi-Agent example, supporting writing journals, reading journals, answering questions based on journals
flow/agent/multiagent/plan_executePlan-ExecutePlan-Execute mode Multi-Agent example

Complete Application Examples

DirectoryNameDescription
flow/agent/manusManus AgentManus Agent implementation based on Eino, referencing the OpenManus project
flow/agent/deer-goDeer-GoGo language implementation referencing deer-flow, supporting research team collaboration state graph flow

🧩 Components

Model

DirectoryNameDescription
components/model/abtestA/B Test RoutingDynamic routing ChatModel, supporting A/B testing and model switching
components/model/httptransportHTTP Transport LoggingcURL-style HTTP request logging, supporting streaming responses and sensitive information masking

Retriever

DirectoryNameDescription
components/retriever/multiqueryMulti-Query RetrievalUsing LLM to generate multiple query variants, improving retrieval recall
components/retriever/routerRouter RetrievalDynamically routing to different retrievers based on query content

Tool

DirectoryNameDescription
components/tool/jsonschemaJSON Schema ToolDemonstrates how to use JSON Schema to define tool parameters
components/tool/mcptool/callresulthandlerMCP Tool Result HandlerDemonstrates custom handling of MCP tool call results
components/tool/middlewares/errorremoverError Remover MiddlewareTool call error handling middleware, converting errors to friendly prompts
components/tool/middlewares/jsonfixJSON Fix MiddlewareFixing malformed JSON parameters generated by LLM

Document

DirectoryNameDescription
components/document/parser/customparserCustom ParserDemonstrates how to implement a custom document parser
components/document/parser/extparserExtension ParserUsing extension parsers to handle HTML and other formats
components/document/parser/textparserText ParserBasic text document parser example

Prompt

DirectoryNameDescription
components/prompt/chat_promptChat PromptDemonstrates how to use Chat Prompt templates

Lambda

DirectoryNameDescription
components/lambdaLambda ComponentLambda function component usage example

πŸš€ QuickStart

DirectoryNameDescription
quickstart/chatChat QuickStartThe most basic LLM conversation example, including template, generation, streaming output
quickstart/eino_assistantEino AssistantComplete RAG application example, including knowledge indexing, Agent service, Web interface
quickstart/todoagentTodo AgentSimple Todo management Agent example

πŸ› οΈ DevOps

DirectoryNameDescription
devops/debugDebug ToolsDemonstrates how to use Eino debugging features, supporting Chain and Graph debugging
devops/visualizeVisualization ToolsRendering Graph/Chain/Workflow as Mermaid diagrams


Last modified March 2, 2026: feat: sync en files (c14c5a55)