Yansong Zhang
96641a93f6
feat(api): add Agent V2 node and new Agent app type (Phase 1-3)
Introduce a new unified Agent V2 workflow node that combines LLM capabilities
with agent tool-calling loops, along with a new AppMode.AGENT for standalone
agent apps backed by single-node workflows.
Phase 1 — Agent Patterns:
- Add core/agent/patterns/ module (AgentPattern, FunctionCallStrategy,
ReActStrategy, StrategyFactory) ported from feat/support-agent-sandbox
- Add ExecutionContext, AgentLog, AgentResult entities
- Add Tool.to_prompt_message_tool() for LLM-consumable tool conversion
Phase 2 — Agent V2 Workflow Node:
- Add core/workflow/nodes/agent_v2/ (AgentV2Node, AgentV2NodeData,
AgentV2ToolManager, AgentV2EventAdapter)
- Register agent-v2 node type in DifyNodeFactory
- No-tools path: single LLM call (LLM Node equivalent)
- Tools path: FC/ReAct loop via StrategyFactory
Phase 3 — Agent App Type:
- Add AppMode.AGENT to model enum
- Add WorkflowGraphFactory for auto-generating start->agent_v2->answer graphs
- AppService.create_app() creates workflow draft for AGENT mode
- AppGenerateService.generate() routes AGENT to AdvancedChatAppGenerator
- Console API and DSL import/export support AGENT mode
- Default app template for AGENT mode
Old agent/agent-chat/LLM node paths are fully preserved.
38 unit tests all passing.
Made-with: Cursor
2026-04-08 12:31:23 +08:00
..
2026-04-08 12:31:23 +08:00
2026-04-07 22:51:11 +00:00
2026-03-31 22:52:35 +00:00
2026-04-07 04:19:30 +00:00
2026-04-02 05:07:32 +00:00
2026-04-07 04:20:02 +00:00
2026-04-07 13:18:19 +00:00
2026-03-11 18:29:53 +08:00
2026-04-07 05:56:02 +00:00
2026-03-31 14:28:05 +00:00
2025-08-13 17:06:07 +08:00
2025-12-24 09:41:42 +08:00
2026-02-03 12:26:47 +08:00
2026-01-06 22:55:58 +08:00
2026-03-26 12:34:44 +00:00
2026-01-30 22:39:02 +09:00
2026-04-07 01:03:18 +00:00
2026-01-23 21:07:52 +09:00
2026-03-27 21:05:32 +00:00
2026-03-21 11:29:29 +09:00
2025-09-28 13:37:06 +08:00
2026-01-26 15:04:25 +08:00
2026-04-02 05:07:32 +00:00