MCPcopy Index your code
hub / github.com/cloudwego/eino-examples

github.com/cloudwego/eino-examples @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
1,569 symbols 4,813 edges 304 files 325 documented · 21%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Eino Examples

English | 中文

概述

本仓库包含了 Eino 框架的示例和演示代码,提供了实用的示例来帮助开发者更好地理解和使用 Eino 的功能。

仓库结构

📦 ADK (Agent Development Kit)

目录 名称 说明
adk/helloworld Hello World Agent 最简单的 Agent 示例,展示如何创建一个基础的对话 Agent
adk/intro/chatmodel ChatModel Agent 展示如何使用 ChatModelAgent 并配合 Interrupt 机制
adk/intro/custom 自定义 Agent 展示如何实现符合 ADK 定义的自定义 Agent
adk/intro/workflow Workflow Agents Loop、Parallel、Sequential Agent 模式
adk/intro/session Session 管理 展示如何通过 Session 在多个 Agent 之间传递数据和状态
adk/intro/transfer Agent 转移 展示 ChatModelAgent 的 Transfer 能力,实现 Agent 间的任务转移
adk/intro/agent_with_summarization 带摘要的 Agent 展示如何为长对话 ChatModelAgent 添加对话摘要能力
adk/intro/http-sse-service HTTP SSE 服务 展示如何将 ADK Runner 暴露为支持 Server-Sent Events 的 HTTP 服务
adk/agentic Agentic 示例 AgenticModel 示例,包括研究助手和 max-output-token 截断重试
adk/agent/ralph-loop Ralph Loop 自主迭代循环,结合文件系统工作状态和验证门控
adk/cancel/graceful-exit Graceful Exit 展示如何安全取消和恢复 Agent
adk/middlewares Middlewares Skill 中间件和动态工具检索中间件示例
adk/human-in-the-loop 人机协作 8 个示例:审批、审核编辑、反馈循环、追问、Supervisor 等模式
adk/multiagent 多 Agent 协作 Supervisor、Plan-Execute-Replan、Deep Agents、Project Manager、Excel Agent 示例
adk/common/tool/graphtool GraphTool 将 Graph/Chain/Workflow 封装为 Agent 工具

🔗 Compose (编排)

目录 名称 说明
compose/chain Chain 使用 compose.Chain 进行顺序编排,包含 Prompt + ChatModel
compose/graph Graph 图编排示例:状态图、单次工具调用、异步节点、中断机制
compose/workflow Workflow 工作流示例:字段映射、纯数据流、纯控制流、静态值、流式处理
compose/batch BatchNode 批量处理组件,支持并发控制和中断恢复

🌊 Flow (流程模块)

目录 名称 说明
flow/agent/react ReAct Agent ReAct Agent,包含记忆、动态选项、未知工具处理
flow/agent/multiagent Multi-Agent Host Multi-Agent(日记助手)、Plan-Execute 模式
flow/agent/manus Manus Agent 基于 Eino 实现的 Manus Agent,参考 OpenManus 项目
flow/agent/deer-go Deer-Go 参考 deer-flow 的 Go 语言实现,支持研究团队协作

🧩 Components (组件)

目录 名称 说明
components/model Model A/B 测试路由、cURL 风格的 HTTP 传输日志
components/retriever Retriever 多查询检索、路由检索
components/tool Tool JSON Schema 工具、MCP 工具、中间件(错误移除、JSON 修复)
components/document Document 自定义解析器、扩展解析器、文本解析器
components/prompt Prompt Chat Prompt 模板示例
components/lambda Lambda Lambda 函数组件示例

🚀 QuickStart (快速开始)

目录 名称 说明
quickstart/chat Chat 快速开始 最基础的 LLM 对话示例,包含模板、生成、流式输出
quickstart/eino_assistant Eino 助手 完整的 RAG 应用示例,包含知识索引、Agent 服务、Web 界面
quickstart/todoagent Todo Agent 简单的 Todo 管理 Agent 示例
quickstart/chatwitheino Chat with Eino 11 章渐进式教程,从 ChatModel 到 Runner、Session、Tool、Middleware、Callback、Interrupt、GraphTool、Skill、A2UI 和 TurnLoop

🛠️ DevOps (开发运维)

目录 名称 说明
devops/debug 调试工具 展示如何使用 Eino 的调试功能,支持 Chain 和 Graph 调试
devops/visualize 可视化工具 将 Graph/Chain/Workflow 渲染为 Mermaid 图表

详细文档

每个示例的详细说明请参考 COOKBOOK.md

相关资源

  • Eino 框架: https://github.com/cloudwego/eino
  • Eino 扩展组件: https://github.com/cloudwego/eino-ext
  • 官方文档: https://www.cloudwego.io/zh/docs/eino/

安全

如果你在该项目中发现潜在的安全问题,或你认为可能发现了安全问题,请通过我们的安全中心漏洞报告邮箱通知字节跳动安全团队。

不要创建公开的 GitHub Issue。

开源许可证

本项目依据 Apache-2.0 许可证 授权。

Extension points exported contracts — how you extend this code

MemoryStore (Interface)
MemoryStore persists and restores short-term conversation history. Implementations are responsible for storing a slice o [2 …
flow/agent/react/memory_example/memory/store.go
Logger (Interface)
Logger is a minimal printf-style logger used when no context is required. [1 implementers]
components/model/httptransport/curlrt.go
Option (FuncType)
Option is a function that configures batch invocation options.
compose/batch/batch/options.go
MyOption (FuncType)
(no doc)
components/lambda/lambda.go
CloseFn (FuncType)
(no doc)
adk/common/trace/coze_loop.go
ToolRequestPreprocess (FuncType)
(no doc)
adk/multiagent/deep/tools/wrap.go
ServerConfig (Interface)
(no doc) [3 implementers]
flow/agent/deer-go/biz/infra/mcp.go
CtxLogger (Interface)
CtxLogger is a context-aware logger; use this to inject request IDs or structured logging derived from the HTTP request [1 …
components/model/httptransport/curlrt.go

Core symbols most depended-on inside this repo

Printf
called by 347
components/model/httptransport/curlrt.go
Close
called by 96
components/model/httptransport/curlrt.go
String
called by 62
adk/common/tool/follow_up_tool.go
Errorf
called by 58
internal/logs/logger.go
Error
called by 48
quickstart/chatwitheino/scripts/sync_eino_ext_skills.go
Infof
called by 44
internal/logs/logger.go
NewChatModel
called by 38
adk/common/model/chat_model.go
Invoke
called by 38
compose/batch/batch/node.go

Shape

Function 818
Struct 411
Method 303
FuncType 15
TypeAlias 13
Interface 8
Class 1

Languages

Go98%
TypeScript2%
Python1%

Modules by API surface

flow/agent/multiagent/plan_execute/tools/theme_park.go48 symbols
quickstart/chatwitheino/server/server.go31 symbols
components/model/httptransport/curlrt.go26 symbols
compose/batch/main.go20 symbols
adk/common/tool/graphtool/graph_tool.go20 symbols
quickstart/chatwitheino/server/server_test.go18 symbols
adk/human-in-the-loop/8_supervisor-plan-execute/tools.go18 symbols
quickstart/chatwitheino/mem/store.go17 symbols
adk/multiagent/plan-execute-replan/tools/travel_tools.go17 symbols
quickstart/chatwitheino/cmd/ch10/main.go16 symbols
flow/agent/manus/manus.go16 symbols
adk/multiagent/integration-excel-agent/tools/wrap.go16 symbols

For agents

$ claude mcp add eino-examples \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact