CHAPTER 02
One Task, End to End
English summary
This chapter follows one report task in runtime order: submission, managed run creation, worker execution, agent assembly, model and tool turns, middleware, memory, subagents, sandboxed file work, artifact presentation, settlement, checkpoints, durable events, and live streaming.
01Submit and run
02Worker and agent
03Model, tools, asides
04Files, events, recovery
Read the implementation
This edition deliberately stops at a concise overview. The links below open the exact DeerFlow source files used by the complete Chinese chapter.
frontend/core/threads/hooks.ts · thread.submitthread_runs.py · stream_rungateway/services.py · Run admission and worker taskgateway/services.py · enter run_agentlead_agent/agent.py · _get_runtime_configruntime/runs/worker.py · build agent graphlead_agent/agent.py · create_agentruntime/runs/worker.py · graph streammiddlewares · tool wrapper orderdynamic_context_middleware.py · recalldocs/OPENVIKING.md · backend configurationmemory_middleware.py · after_agenttools/builtins/task_tool.py · tasksandbox/middleware.py · acquirepresent_file_tool.py · artifact updateruntime/runs/worker.py · settle Run statusruntime/events/store/base.py · RunEventStorestream_bridge/async_provider.py · backend