How waseens/deep-search-pro works
Deep Search Pro is a multi-agent research assistant with a browser chat console and a run-trace diagnostics page. Users can upload reference files, submit a query, and receive a Markdown report or generated files; the main agent coordinates network search, database, and knowledge-base agents. FastAPI starts runs and serves live and recoverable trace events, which the frontend renders. The README documents optional database and RAGFlow capabilities; sampled code confirms several agent/tool and trace-store relationships, while some frontend wiring is supported only by the README.
Main entry points: main_agent.py Main agent · server.py FastAPI server · run-client.js Run lifecycle · monitor.py Trace monitor
Components 31
Web console
- Chat console
web/chat.js - Trace console
web/app.js - Run lifecycle
web/run-client.js - Session recovery
web/session.js - Trace visualizer
web/visualizer.js
API and tracing
- FastAPI server
api/server.py - Trace query API
api/trace_router.py - Trace monitor
api/monitor.py - Run trace store
api/trace_store.py - Trace models
api/trace_models.py
Agent orchestration
- Main agent
agent/main_agent.py - LLM setup
agent/llm.py - Prompt loading
agent/prompts.py - Network agent
agent/subagents/network_search_agent.py - Database agent
agent/subagents/database_query_agent.py - Knowledge agent
agent/subagents/knowledge_base_agent.py
Research and output tools
- Web search
tools/tavily_tool.py - SQL tools
tools/db_tools.py - RAGFlow retrieval
tools/ragflow_tools.py - Upload reader
tools/upload_file_read_tool.py - Markdown report
tools/markdown_tools.py - PDF conversion
tools/pdf_tools.py
Runtime support
- Run context
api/context.py - RAGFlow settings
rawflow/rag_config.py - Path safety
utils/path_utils.py - Word conversion
utils/word_converter.py
Other components
- User
- LLM service
- Tavily service
- MySQL
- RAGFlow service
Connections 39
- User → Chat console: submits query
README.md - User → Trace console: submits query
README.md - Chat console → Run lifecycle: starts run
README.md - Trace console → Run lifecycle: starts run
README.md - Run lifecycle → FastAPI server: uploads and starts
README.md - FastAPI server → Main agent: runs agent
api/server.py - Main agent → Network agent: dispatches
agent/main_agent.py - Main agent → Database agent: dispatches
agent/main_agent.py - Main agent → Knowledge agent: dispatches
agent/main_agent.py - Network agent → Web search: uses
agent/subagents/network_search_agent.py - Database agent → SQL tools: uses
agent/subagents/database_query_agent.py - Knowledge agent → RAGFlow retrieval: uses
agent/subagents/knowledge_base_agent.py - Main agent → Markdown report: generates report
agent/main_agent.py - Main agent → PDF conversion: converts report
agent/main_agent.py - Main agent → Upload reader: reads uploads
README.md - Main agent → LLM setup: initializes
agent/main_agent.py - Main agent → Prompt loading: loads prompts
agent/main_agent.py - Main agent → Trace monitor: emits events
agent/main_agent.py - FastAPI server → Run trace store: reserves run
api/server.py - FastAPI server → Trace query API: mounts routes
api/server.py - Trace query API → Run trace store: queries runs
api/trace_router.py - Trace monitor → Run trace store: persists events
api/monitor.py - Trace monitor → FastAPI server: broadcasts WebSocket
README.md - Trace monitor → Run context: reads run context
api/monitor.py - Run trace store → Trace models: stores events
api/trace_store.py - Trace query API → Trace models: returns responses
api/trace_router.py - FastAPI server → Trace monitor: connects WebSocket
api/server.py - Run lifecycle → Session recovery: recovers session
README.md - Trace console → Trace visualizer: renders trace
README.md - Run lifecycle → FastAPI server: recovers events
README.md - LLM setup → LLM service: calls
- Web search → Tavily service: searches
- SQL tools → MySQL: queries
- RAGFlow retrieval → RAGFlow service: retrieves
tools/ragflow_tools.py - RAGFlow retrieval → RAGFlow settings: loads settings
tools/ragflow_tools.py - Upload reader → Path safety: resolves paths
tools/upload_file_read_tool.py - Markdown report → Path safety: resolves paths
tools/markdown_tools.py - PDF conversion → Path safety: resolves paths
tools/pdf_tools.py - PDF conversion → Word conversion: converts documents
tools/pdf_tools.py