Skip to content

Conversation

@Wenrh2004
Copy link

What type of PR is this?

feat(adk): deepagents prebuilt agent with planning, storage, and long-term memory

Check the PR title.

  • This PR title match the format: (optional scope):
  • The description of this PR title is user-oriented and clear enough for others to understand.
  • Attach the PR updating the user documentation if the current PR requires user awareness at the usage level. User docs repo

(Optional) Translate the PR title into Chinese.

feat(adk): 实现 DeepAgents 预置代理,提供规划、存储与长期记忆能力

(Optional) More detailed description for this PR (en / zh).

en:
This PR introduces a new prebuilt ADK agent named "DeepAgents" that provides:

  • Planning & task decomposition via write_todos (session-scoped plan using planexecute.Plan)
  • Storage management tools: ls, read_file, write_file, edit_file (backed by abstract Storage interface for pluggable backends)
  • Sub-agent creation via task tool (compose a specialized child agent with custom instruction)
  • Long-term memory tools when MemoryStore is provided: remember, recall, update_memory, forget, list_memories (checkpoint-persisted, implementation expected in eino-ext)

Design highlights:

  • Agent constructor deepagents.New(ctx, *Config) wires model, storage, optional memory store and extra tools.
  • Clear separation between working memory (Session) and long-term memory (MemoryStore).
  • Extensible via ToolsConfig to add user-defined tools.
  • Secure & predictable tool parameter schemas using schema.ToolInfo; JSON parsing via sonic.

Usage:

  • Provide model.ToolCallingChatModel, Storage implementation (eino-ext), and optional MemoryStore.
  • Call deepagents.New to obtain an adk.Agent, usable standalone or in compose.StateGraph.

zh:
本 PR 新增预置 ADK 代理 “DeepAgents”,能力包括:

  • 规划与任务拆解:write_todos(基于 Session 的 planexecute.Plan)
  • 存储管理:lsread_filewrite_fileedit_file(抽象 Storage 接口,便于接入文件系统/内存/S3 等)
  • 子代理创建:task 工具(基于给定指令与模型创建子代理)
  • 长期记忆(可选):在提供 MemoryStore 时启用 rememberrecallupdate_memoryforgetlist_memories(基于 CheckPoint 持久化,具体实现建议在 eino-ext)

设计要点:

  • 构造函数 deepagents.New(ctx, *Config) 统一注入模型、存储、(可选)记忆库与自定义工具。
  • 明确区分工作记忆(Session)与长期记忆(MemoryStore)。
  • 通过 ToolsConfig 扩展用户自定义工具。
  • 使用 schema.ToolInfo 定义参数协议,sonic 做高性能 JSON 解析。

使用方式:

  • 传入 model.ToolCallingChatModelStorage 实现(eino-ext),以及可选的 MemoryStore
  • 调用 deepagents.New 获得 adk.Agent,可独立使用或作为 StateGraph 节点。

(Optional) Which issue(s) this PR fixes:

(optional) The PR that updates user documentation:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant