# Deep Research

Learn to build autonomous AI research agents that perform multi-hop web research, entity extraction, and knowledge synthesis.

## Choose Your Framework

Build the same deep research agent with your preferred orchestration framework:

### [Mastra (TypeScript)](/examples/deep-research/mastra.md)

**Best for**: TypeScript developers, modern web apps

⏱️ **Time**: 30-40 minutes\
🎯 **Level**: Advanced

**What you'll build**:

* Entity-driven research using knowledge graphs
* Pre-ingestion filtering with native reranking
* Autonomous convergence detection
* Multi-source synthesis with citations

### [Agno (Python)](/examples/deep-research/agno.md)

**Best for**: Python developers, high-performance systems

⏱️ **Time**: 30-40 minutes\
🎯 **Level**: Advanced

**Why Agno**:

* 5000x faster than LangGraph
* 50x less memory usage
* Simpler code (just Python functions!)
* Same algorithm, cleaner implementation

***

## What All Tutorials Cover

Every tutorial teaches the same 5-phase research algorithm, implemented in different frameworks:

### Phase 1: Seed Acquisition

Start from a URL or search query to establish initial knowledge base

### Phase 2: Entity-Driven Discovery

Extract entities from your knowledge graph (Person, Organization, Category)

### Phase 3: Intelligent Expansion

Search web for each entity, **filter before ingesting** (key innovation!)

### Phase 4: Convergence Detection

Automatically detect when research has converged (novelty scoring)

### Phase 5: Multi-Source Synthesis

Generate comprehensive reports from 100+ sources using summary-based RAG

***

## Key Innovations

**1. Pre-Ingestion Filtering**

* Analyze 50 sources, ingest only top 8
* Uses Graphlit's native reranker
* Significantly faster with better quality

**2. Diminishing Returns Detection**

* Agent knows when to stop researching
* Based on novelty scoring (% new sources in top 10)
* No manual intervention needed

**3. Summary-Based RAG**

* Scales beyond traditional RAG (10-20 docs → 100+)
* Operates on optimized summaries
* Fast and accurate

***

## What Graphlit Provides

All frameworks use the same Graphlit SDK:

✅ Automatic entity extraction (during ingestion)\
✅ Knowledge graph (Schema.org/JSON-LD)\
✅ Native reranker (enables pre-filtering)\
✅ Exa search (built-in, no API key needed)\
✅ Summary-based RAG (scalable synthesis)\
✅ Multi-source citations

**Time saved**: 12-14 weeks of infrastructure development

***

## Coming Soon

More framework tutorials:

* **LangGraph (Python)** - Graph-based state machines
* **Vercel Workflow (TypeScript)** - Deterministic, durable orchestration

***

## Choose Your Tutorial

**TypeScript developer?** → [Start with Mastra](/examples/deep-research/mastra.md)

**Python developer?** → [Start with Agno](/examples/deep-research/agno.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.graphlit.dev/examples/deep-research.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
