deerflow2/backend/packages/harness/deerflow/agents/middlewares
SHIYAO ZHANG bbd0866374
feat(uploads): guide agent using agentic search for uploaded documents (#1816)
* feat(uploads): guide agent to use grep/glob/read_file for uploaded documents

Add workflow guidance to the <uploaded_files> context block so the agent
knows to use grep and glob (added in #1784) alongside read_file when
working with uploaded documents, rather than falling back to web search.

This is the final piece of the three-PR PDF agentic search pipeline:
- PR1 (#1727): pymupdf4llm converter produces structured Markdown with headings
- PR2 (#1738): document outline injected into agent context with line numbers
- PR3 (this):  agent guided to use outline + grep + read_file workflow

* feat(uploads): add file-first priority and fallback guidance to uploaded_files context
2026-04-04 11:08:31 +08:00
..
__init__.py feat: add create_deerflow_agent SDK entry point (Phase 1) (#1203) 2026-03-29 15:31:18 +08:00
clarification_middleware.py fix: replace print() with logging across harness package (#1282) 2026-03-27 23:15:35 +08:00
dangling_tool_call_middleware.py refactor: split backend into harness (deerflow.*) and app (app.*) (#1131) 2026-03-14 22:55:52 +08:00
deferred_tool_filter_middleware.py feat(tools): add tool_search for deferred MCP tool loading (#1176) 2026-03-17 20:43:55 +08:00
llm_error_handling_middleware.py Fix/1681 llm call retry handling (#1683) 2026-04-02 10:12:17 +08:00
loop_detection_middleware.py fix(middleware): handle list-type AIMessage.content in LoopDetectionMiddleware (#1823) 2026-04-04 10:38:22 +08:00
memory_middleware.py feat(memory): structured reflection + correction detection in MemoryMiddleware (#1620) (#1668) 2026-04-01 16:45:29 +08:00
sandbox_audit_middleware.py feat(sandbox): add SandboxAuditMiddleware for bash command security auditing (#1532) 2026-03-30 07:48:31 +08:00
subagent_limit_middleware.py refactor: split backend into harness (deerflow.*) and app (app.*) (#1131) 2026-03-14 22:55:52 +08:00
thread_data_middleware.py fix: replace print() with logging across harness package (#1282) 2026-03-27 23:15:35 +08:00
title_middleware.py fix: add sync after_model to TitleMiddleware (#1190) 2026-03-19 15:46:31 +08:00
todo_middleware.py refactor: split backend into harness (deerflow.*) and app (app.*) (#1131) 2026-03-14 22:55:52 +08:00
token_usage_middleware.py feat: add configurable log level and token usage tracking (#1301) 2026-03-25 08:13:26 +08:00
tool_error_handling_middleware.py fix: enable DanglingToolCallMiddleware for subagents (#1766) 2026-04-02 18:56:18 +08:00
uploads_middleware.py feat(uploads): guide agent using agentic search for uploaded documents (#1816) 2026-04-04 11:08:31 +08:00
view_image_middleware.py fix: replace print() with logging across harness package (#1282) 2026-03-27 23:15:35 +08:00