dify/api/core/agent
Yansong Zhang 5cdae671d5 feat(api): integrate Sandbox Provider into Agent V2 execution pipeline
Close 3 integration gaps between the ported Sandbox system and Agent V2:

1. Fix _invoke_tool_in_sandbox to use SandboxBashSession context manager
   API correctly (keyword args, bash_tool, ToolReference), with graceful
   fallback to direct invocation when DifyCli binary is unavailable.

2. Inject sandbox into run_context via _resolve_sandbox_context() in
   WorkflowBasedAppRunner — automatically creates a sandbox when a
   tenant has an active sandbox provider configured.

3. Register SandboxLayer in both advanced_chat and workflow app runners
   for proper sandbox lifecycle cleanup on graph end.

Also: make SkillInitializer non-fatal when no skill bundle exists,
add node_id to ExecutionContext for sandbox session scoping.

Made-with: Cursor
2026-04-10 10:14:42 +08:00
..
output_parser refactor(api): use standalone graphon package (#34209) 2026-03-27 21:05:32 +00:00
patterns fix(api): remove unsupported 'user' param from FC/ReAct invoke_llm calls 2026-04-09 12:18:07 +08:00
prompt Enhance Code Consistency Across Repository with .editorconfig (#19023) 2025-04-29 18:04:33 +08:00
strategy chore: add ast-grep rule to convert Optional[T] to T | None (#25560) 2025-09-15 13:06:33 +08:00
__init__.py FEAT: NEW WORKFLOW ENGINE (#3160) 2024-04-08 18:51:46 +08:00
agent_app_runner.py feat(api): enable all sandbox/skill controller routes and resolve dependencies (P0) 2026-04-09 09:36:16 +08:00
base_agent_runner.py refactor: core/tools, agent, callback_handler, encrypter, llm_generator, plugin, inner_api (#34205) 2026-03-28 10:14:43 +00:00
cot_agent_runner.py refactor(api): use standalone graphon package (#34209) 2026-03-27 21:05:32 +00:00
cot_chat_agent_runner.py refactor(api): clean up AssistantPromptMessage typing in CotChatAgentRunner (#34681) 2026-04-07 22:53:14 +00:00
cot_completion_agent_runner.py refactor(api): use standalone graphon package (#34209) 2026-03-27 21:05:32 +00:00
entities.py feat(api): integrate Sandbox Provider into Agent V2 execution pipeline 2026-04-10 10:14:42 +08:00
errors.py refactor(workflow): move agent node back to core workflow (#33431) 2026-03-14 22:33:13 +08:00
fc_agent_runner.py refactor(api): use standalone graphon package (#34209) 2026-03-27 21:05:32 +00:00
plugin_entities.py chore: add ast-grep rule to convert Optional[T] to T | None (#25560) 2025-09-15 13:06:33 +08:00