mirror of
https://github.com/langgenius/dify.git
synced 2026-05-13 08:57:28 +08:00
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 |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| advanced_prompt_template.py | ||
| agent.py | ||
| annotation.py | ||
| app_import.py | ||
| app.py | ||
| audio.py | ||
| completion.py | ||
| conversation_variables.py | ||
| conversation.py | ||
| error.py | ||
| generator.py | ||
| mcp_server.py | ||
| message.py | ||
| model_config.py | ||
| ops_trace.py | ||
| site.py | ||
| statistic.py | ||
| workflow_app_log.py | ||
| workflow_draft_variable.py | ||
| workflow_run.py | ||
| workflow_statistic.py | ||
| workflow_trigger.py | ||
| workflow.py | ||
| wraps.py | ||