Token-Efficient Ingestion Middleware & Concept-Diff Engine for Deep Research AI Agents.
Project description
DeepResearch-Lite ⚡
Token-Efficient Ingestion Middleware & Concept-Diff Engine for Deep Research AI Agents
DeepResearch-Lite is an intelligent, high-performance gatekeeper layer designed for AI Research Agents (such as langchain-ai/open_deep_research, smolagents, AutoGPT, CrewAI, or custom LangGraph workflows).
It solves the Extreme Token Bloat & Repetitive Fluff flaw in existing deep research systems by shifting the paradigm from "Read raw 5,000-word scraped web pages" to "Compile knowledge incrementally as it arrives."
🚀 Key Features
- Dual-Layer Extraction Architecture:
- Layer 1 (LLM Mode): Sub-second structured JSON triplet extraction
(Subject ──► Predicate ──► Object)via Gemini 2.5 Flash or OpenAI Mini when an API key is available. - Layer 2 (Professional Local NLP Mode): 0-ms offline local NLP parser (regex metric extraction, grammar triplet matching, entity resolution) when running without API keys.
- Layer 1 (LLM Mode): Sub-second structured JSON triplet extraction
- Session Knowledge Graph: Maintains an in-memory graph state of all entities, metrics, and claims learned during a research session.
- Concept-Diff Engine: Classifies scraped facts into 3 categories:
DISCARD: Repetitive background fluff deleted immediately ($0 LLM tokens spent).DIFF_ADD: Novel assertions added to graph & passed in Diff Payload.DIFF_CONFLICT: Contradictory statements (e.g. $110 vs $140/kWh) explicitly flagged.
- 80%+ Token & Cost Reduction: Delivers a ~150-word Diff Payload to the main reasoning model instead of 5,000 words of background history.
⚡ Quickstart
1. Installation
pip install -e .
2. Basic Usage (Python API)
import asyncio
from open_deep_research.concept_diff import ConceptDiffEngine
async def main():
# Automatically uses GEMINI_API_KEY if present, otherwise uses Professional Local NLP
engine = ConceptDiffEngine()
raw_scraped_text = """
Electric vehicles have become popular over the last decade...
Lithium-ion batteries were invented by John Goodenough...
In 2026, researchers demonstrated a solid-state cell achieving 500 Wh/kg energy density.
Target production cell cost is $110/kWh.
"""
# Process raw scrape into a condensed Diff Payload
diff_payload = await engine.process_observation(
raw_text=raw_scraped_text,
source_url="https://tech-news.com/ev-batteries",
source_title="EV Battery 2026 Report"
)
print(diff_payload)
if __name__ == "__main__":
asyncio.run(main())
📊 Benchmark & Scorecard
Running DeepResearch-Lite on real web searches (2026 solid state battery Wh/kg breakthroughs):
===========================================================================
🏆 DEEPRESEARCH-LITE HACKATHON SCORECARD
===========================================================================
METRIC | BASELINE AGENT | DEEPRESEARCH-LITE
---------------------------------------------------------------------------
Live Web Words Fetched | 9,159 words | 1,083 words
Input Tokens Passed to LLM | 11,906 tokens | 1,407 tokens
Estimated Cost per Search Run | $0.0298 | $0.0035
Token Reduction | 0% (Full Bloat) | 88.2% SAVED ⚡
Fact-to-Fluff Signal Ratio | ~15% High Signal | ~95% High Signal ⚡
===========================================================================
🛠️ Framework Integration
LangGraph / open_deep_research Integration
DeepResearch-Lite integrates seamlessly into open_deep_research/deep_researcher.py at the researcher_tools() node:
from open_deep_research.concept_diff import ConceptDiffEngine
diff_engine = ConceptDiffEngine()
# In researcher_tools():
processed_observations = []
for obs, tool_call in zip(observations, tool_calls):
if len(obs) > 100:
diff_payload = await diff_engine.process_observation(obs, source_title=tool_call['name'])
processed_observations.append(diff_payload)
🧪 Testing & Demonstration Scripts
-
Run Unit Tests:
python -m pytest tests/test_concept_diff.py
-
Run Side-by-Side Hackathon Benchmark:
python demo_comparison.py -
Run Live Internet Search Comparison:
python run_live_test.py "your custom research prompt"
📄 License
MIT License. Free for open-source and commercial use.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file open_research_lite-0.1.1.tar.gz.
File metadata
- Download URL: open_research_lite-0.1.1.tar.gz
- Upload date:
- Size: 85.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
80ed58ada004c086a26d982e25afe481f6c0a124b9da163dbd9b072a7437dbf5
|
|
| MD5 |
298c4cc4ab047e5d47a7b1e81041893c
|
|
| BLAKE2b-256 |
94d7c7dba1b9f149fd45c6f3785a6ee06894cdc96d5c5a4f7b7504f7c7de907a
|
Provenance
The following attestation bundles were made for open_research_lite-0.1.1.tar.gz:
Publisher:
pypi-publish.yml on vishal-raaj-dnd/open-research-lite
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
open_research_lite-0.1.1.tar.gz -
Subject digest:
80ed58ada004c086a26d982e25afe481f6c0a124b9da163dbd9b072a7437dbf5 - Sigstore transparency entry: 2255210247
- Sigstore integration time:
-
Permalink:
vishal-raaj-dnd/open-research-lite@c2c92779823f23b9f8014b43110b3089c78d38f4 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/vishal-raaj-dnd
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@c2c92779823f23b9f8014b43110b3089c78d38f4 -
Trigger Event:
push
-
Statement type:
File details
Details for the file open_research_lite-0.1.1-py3-none-any.whl.
File metadata
- Download URL: open_research_lite-0.1.1-py3-none-any.whl
- Upload date:
- Size: 99.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
28b33beb879b1fde399e5ce2e2b823eada21924d08165520008432f83d73971c
|
|
| MD5 |
acd5feaa4729913cc8a39c825ee1bc49
|
|
| BLAKE2b-256 |
49200c4e341a3e2c2e1c8abb992f488998b717e427024a8143b9439690ebe904
|
Provenance
The following attestation bundles were made for open_research_lite-0.1.1-py3-none-any.whl:
Publisher:
pypi-publish.yml on vishal-raaj-dnd/open-research-lite
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
open_research_lite-0.1.1-py3-none-any.whl -
Subject digest:
28b33beb879b1fde399e5ce2e2b823eada21924d08165520008432f83d73971c - Sigstore transparency entry: 2255210255
- Sigstore integration time:
-
Permalink:
vishal-raaj-dnd/open-research-lite@c2c92779823f23b9f8014b43110b3089c78d38f4 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/vishal-raaj-dnd
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@c2c92779823f23b9f8014b43110b3089c78d38f4 -
Trigger Event:
push
-
Statement type: