github cloudwego/eino v0.8.0-alpha.1

latest releases: v0.10.0-alpha.32, v0.10.0-alpha.31, v0.10.0-alpha.30...
pre-release8 months ago

Agent-Level Callbacks for Eino ADK

Notice

This is an alpha version and does not guarantee compatibility.

Overview

en:

  • This release introduces agent-level callbacks and multi-agent architecture to Eino ADK, enhancing middleware flexibility, observability, and management of complex agent workflows. Key additions include middleware hooks (BeforeAgent/OnEvents), global middleware injection, and Multi-Agent structure for unified multi-agent scenarios.

zh:

  • 为 Eino ADK 引入Agent 级回调与多 Agent 架构,提升中间件灵活性、可观测性及复杂工作流管理能力。核心更新包括中间件切面(BeforeAgent/OnEvents)、全局中间件注入,以及 Multi-Agent 结构以统一多 Agent 场景。

Details

en:

  • Introduce agent-level callbacks for ADK.
    • Add callback hooks to current AgentMiddleware : BeforeAgent and OnEvents
    • Add AgentMiddlewareChecker interface. If an agent implements AgentMiddlewareChecker and enables agent middlewares internally, hooks run inside the agent; otherwise, agent middlewares are executed by the flowAgent.
    • flowAgent / ChatModelAgent / workflowAgent Run/Resume adapt to middleware aspect execution, with partial refactoring of ChatModelAgent to adapt to runtime middleware injection and execution.
    • Add middlewares configuration to Plan-Execute and Supervisor Agent
    • Add globalAgentMiddlewares to inject the same middleware at the outermost layer of all agent runtimes from a global perspective.
  • Introduce Multi-Agent for ADK.
    • Add Multi-Agent structure, at the same conceptual level as ChatModelAgent / WorkflowAgents, to solve the problem that Agent operations are at a flat level and difficult to observe in TransferAgent scenarios.
    • flowAgent adapts to Multi-Agent operation
    • Supervisor Agent constructor returns Multi-Agent
  • Add WithGraphCallbacks AgentRunOption, which provides eino graph/chain callback injection inside an agent (mainly for ChatModelAgent).
  • Provide utility helpers (NewAsyncOnSingleEventHandler, NewSyncOnSingleEventHandler, BypassIterator) for event processing.
  • Add tests to verify middleware execution validity (order, deduplication, termination behavior, interruption/resume flows with tool calls, and global agent middleware propagation).

zh:

  • ADK 支持 Agent 级别的回调
    • 向现有的 AgentMiddleware 中新增切面: BeforeAgentOnEvents
    • 新增 AgentMiddlewareChecker 接口用于检查 Agent 是否支持内部运行 AgentMiddleware。如果支持,AgentMiddleware 将在 Agent 内部运行(由 Agent 自行实现运行逻辑);否则将由 flowAgent 在 Agent 外部运行。
    • flowAgent / ChatModelAgent / workflowAgent Run/Resume 适配 middleware 切面运行,对 ChatModelAgent 部分重构来适配运行时的 middleware 注入与运行。
    • 新增 globalAgentMiddlewares,以全局角度向所有 agent 运行时最外侧注入相同的中间件
  • ADK 支持 Multi-Agent 概念
    • 新增 Multi-Agent 结构,概念层级与 ChatModelAgent / WorkflowAgents 一致,用于解决 TransferAgent 情况下各 Agent 运行处于平铺的层级难以进行观测的问题。
    • flowAgentMulti-Agent 运行进行适配
    • Supervisor Agent 构造方法返回 Multi-Agent
  • 增加 WithGraphCallbacks AgentRunOption,提供向 Agent 内部的 graph/chain 运行 eino callback 的能力(主要面向 ChatModelAgent)
  • 提供多个工具方法,用于处理 Iterator 中的 Events (NewAsyncOnSingleEventHandler, NewSyncOnSingleEventHandler, BypassIterator)
  • 补全 middleware 测试,保证功能正确性(顺序、去重、提前终止、中断恢复场景、工具调用、globalAgentMiddlewares 等)

Full Changelog: v0.7.17...v0.8.0-alpha.1

Don't miss a new eino release

NewReleases is sending notifications on new releases.