An autonomous, multi-agent deep research application to ingest complex user queries, programmatically orchestrate execution strategies, crawl web endpoints concurrently, and compile publication-grade intelligence reports.
The base code is from https://github.com/ed-donner/agents.
Equipped with advanced Inference Engineering layers, the system minimizes API latency, controls token cost overhead, and persists structured research outputs natively.
The system runs on a highly adaptive pipeline that splits into a fast-track route for simple requests and a fully articulated multi-agent search framework for deep investigations.
graph TD
A[User Query Entry] --> B{Intention Routing Matrix}
%% Fast Track Route
B -- Simple / Definitional Query --> C[Direct Routing Triggereded]
C --> D[Synthetic Context Generation]
D --> E[Writer Agent Assembly]
%% Deep Track Route
B -- Complex / Broad Research Topic --> F[Planner Agent Topology]
F --> G[WebSearchPlan Formulation]
G --> H[Async Web Search Batching]
H --> I[URL & Snippet Hashing Deduplicator]
I --> J[Structural Semantic Content Extractor]
J --> E
%% Synthesis & Outbound
E --> K[ReportData Core Object Validation]
K --> L[YAML Front-Matter Block Prepend]
L --> M[Disk Storage: Local Markdown File Creation]
M --> N[Gradio Web UI File Preview Widget]
K --> O[Email / Push Notification Dispatcher]
Before spinning up expensive search routines, the ResearchManager evaluates incoming prompts against an automated lexical mapping grid.
- Low-Latency Classifier: Catches direct factual lookups, definition queries, or single-phrase topics matching structural templates.
- Fast-Track Bypassing: Simple queries cut straight to final report generation via parametric knowledge weights—dropping execution intervals from ~30+ seconds down to under 3 seconds.
When treating deep search clusters, web nodes frequently return redundant metadata or high-volume noise profiles.
- MD5 Token Hashing: Evaluates incoming result data string hashes. Identical responses are deleted immediately to avoid double-processing.
- Semantic Fragment Extraction: programmatically purges script blocks, style definitions, and tracking elements. Heuristic length evaluation keeps sentences rich in information (5–45 words) while hard-capping contexts to prevent context bloat inside the Writer Agent.
Every compiled report drops automatically into persistent storage as a standardized Markdown file (.md).
- Filenames are URL-Sanitized: Formed directly using low-character expressions extracted from the user's initial prompt string.
- Overwrites Prevented: Appends a millisecond-accurate timestamp identifier string (
%Y%m%d_%H%M%S) to secure clear storage versioning history.
Every local asset starts with a production-ready, key-value configuration block wrapped inside valid --- dividers. This enables instant integration with static site parsers (such as Hugo, Obsidian, Jekyll, or Docusaurus) out of the box:
---
date: "2026-09-17 00:05:12"
query: "How do custom consensus mechanisms work in enterprise blockchains?"
trace_id: "tr_a5b82e14f9d3"
---The web layout integrates an immediate browser file tracker overlay:
gr.File()Preview Component: Dynamically shifts from hidden states to visible layouts the exact moment disk writing finishes.- Direct Download Delivery: Users can review, explore, or download raw markdown output assets directly from the browser view without checking command lines or filesystem panels.
- Install Dependencies:
pip install -r requirements.txt
- Launch Development Application Environment:
python app.py
- Locate Generated Artifact Bundles:
Review generated research entries within the local project system container space at:
./generated/