dify/api/core/app
Yansong Zhang 96374d7f6a refactor(api): replace legacy agent runners with StrategyFactory in AgentChatAppRunner (Phase 4)
Replace the hardcoded FunctionCallAgentRunner / CotChatAgentRunner /
CotCompletionAgentRunner selection in AgentChatAppRunner with the new
AgentAppRunner class that uses StrategyFactory from Phase 1.

Before: AgentChatAppRunner manually selects FC/CoT runner class based on
model features and LLM mode, then instantiates it directly.

After: AgentChatAppRunner instantiates AgentAppRunner (from sandbox branch),
which internally uses StrategyFactory.create_strategy() to auto-select
the right strategy, and uses ToolInvokeHook for proper agent_invoke
with file handling and thought persistence.

This unifies the agent execution engine: both the new Agent V2 workflow
node and the legacy agent-chat app now use the same StrategyFactory
and AgentPattern implementations.

Also fix: command and file_upload nodes use string node_type instead of
BuiltinNodeTypes.COMMAND/FILE_UPLOAD (not in current graphon version).

46 tests pass. Flask starts successfully.

Made-with: Cursor
2026-04-09 09:42:23 +08:00
..
app_config refactor(api): migrate consumers to shared RAG domain entities from core/rag/entities/ (#34692) 2026-04-07 23:22:56 +00:00
apps refactor(api): replace legacy agent runners with StrategyFactory in AgentChatAppRunner (Phase 4) 2026-04-09 09:42:23 +08:00
entities feat(api): enable all sandbox/skill controller routes and resolve dependencies (P0) 2026-04-09 09:36:16 +08:00
features refactor(api): use standalone graphon package (#34209) 2026-03-27 21:05:32 +00:00
file_access refactor(api): continue decoupling dify_graph from API concerns (#33580) 2026-03-25 20:32:24 +08:00
layers feat(api): port Sandbox + VirtualEnvironment + Skill system from feat/support-agent-sandbox (Phase 5-6) 2026-04-08 17:39:02 +08:00
llm refactor: use EnumText for Provider.quota_type and consolidate ProviderQuotaType (#34299) 2026-03-31 00:29:57 +00:00
task_pipeline refactor: migrate session.query to select API in core misc modules (#34608) 2026-04-07 04:08:34 +00:00
workflow chore(api): align Python support with 3.12 (#34419) 2026-04-02 05:07:32 +00:00
__init__.py FEAT: NEW WORKFLOW ENGINE (#3160) 2024-04-08 18:51:46 +08:00