DEV Community

Pratik
Pratik

Posted on

Research Dossier: An Agent That Shows Its Disagreements Instead of Hiding Them

Sanity Challenge Path One Submission

This is a submission for the Sanity Challenge, Path One: Ship an Agent That Queries Real Content.

What I Built

Research Dossier is a multi-agent research analyst built with LangGraph.

Instead of asking one model to answer a research question from its own knowledge, the system routes the question through four stages:

Research → Analysis → Writing → Review

The research stage is grounded in a Sanity Knowledge Base served through Sanity Context MCP.

The interesting problem I wanted to solve is not simply finding information. It is handling situations where the sources themselves disagree.

When conflicting claims are found, Research Dossier does not silently merge them into one confident answer. It preserves the disagreement, shows the sources behind the claims, and can mark the final report as:

CONTESTED

The Problem

My Knowledge Base contains multiple pieces of evidence about LangGraph checkpoint deserialization.

One source is the LangGraph documentation/source itself. Another is the official security advisory for CVE-2026-28277, which documents unsafe msgpack deserialization in affected versions and describes strict-mode and allowlist-based hardening. A third source is a community implementation that provides an additional claim requiring separate verification.

The system keeps these claims and their provenance distinct.

That matters because a normal keyword search can find all of these pieces of information without preserving the relationships between them.

Research Dossier treats disagreement as structured information instead of noise.

Demo

Live app:
https://multi-agent-research-analyst.vercel.app/

Try asking:

Does LangGraph handle checkpoint deserialization safely by default?

Watch the case log as the system progresses through:

Research → Analysis → Writing → Review

The final report preserves the conflicting evidence and distinguishes stronger sources from lower-trust material instead of flattening everything into one conclusion.

Why Keyword Search Isn't Enough

A keyword search can return documentation, security advisories, and community discussions that mention checkpoint serialization.

The problem is that matching text does not tell the agent how those pieces of information relate to each other.

Research Dossier retrieves structured claims together with:

  • their sources,
  • source trust information,
  • and relationships between claims.

That lets the analysis stage reason about disagreement rather than simply presenting a list of matching passages.

The result can be explicitly marked CONTESTED when the evidence remains in conflict.

How I Used Sanity

I modeled the Knowledge Base around three core document types:

  • topic
  • source
  • claim

The key relationship is:

claim
  └── contradicts → claim
Enter fullscreen mode Exit fullscreen mode

This makes disagreement machine-readable.

Instead of asking an LLM to infer whether two unrelated passages appear to disagree, the content model can explicitly represent that relationship.

A claim also references its source, allowing the research pipeline to retain provenance while moving from retrieval to analysis to writing and review.

Sanity Context MCP

The research agent connects to a Sanity Context MCP endpoint backed by the Knowledge Base.

The retrieval layer is separate from the LangGraph orchestration:

LangGraph
    │
    ▼
Research Agent
    │
    ▼
Sanity Context MCP
    │
    ▼
Sanity Knowledge Base
Enter fullscreen mode Exit fullscreen mode

The agent uses the tools exposed by the Context endpoint to retrieve the knowledge it needs for the research question.

Because the Context connection is external to the agent's reasoning logic, the retrieval layer can be changed without rewriting the rest of the multi-agent workflow.

Architecture

                         User Question
                              │
                              ▼
                       ┌──────────────┐
                       │   Research   │
                       │    Agent     │
                       └──────┬───────┘
                              │
                              ▼
                    ┌────────────────────┐
                    │ Sanity Context MCP │
                    └─────────┬──────────┘
                              │
                              ▼
                    ┌────────────────────┐
                    │ Sanity Knowledge   │
                    │       Base         │
                    │                    │
                    │ claims + sources + │
                    │ contradictions     │
                    └─────────┬──────────┘
                              │
                              ▼
                       ┌──────────────┐
                       │   Analysis   │
                       └──────┬───────┘
                              ▼
                       ┌──────────────┐
                       │   Writing    │
                       └──────┬───────┘
                              ▼
                       ┌──────────────┐
                       │    Review    │
                       └──────┬───────┘
                              │
                     APPROVED / REVISE
                              │
                              ▼
                        Final Report
Enter fullscreen mode Exit fullscreen mode

What Each Agent Does

Research

The research agent is responsible for retrieval.

It queries the Sanity Knowledge Base through Context MCP and is explicitly instructed not to rely on general knowledge alone.

When contradictory evidence is retrieved, it keeps both sides and their sources.

Analysis

The analysis agent compares the retrieved claims.

It considers source provenance, trust level, and recency, and distinguishes well-supported evidence from weaker or single-source claims.

Writing

The writing agent converts the analysis into a source-linked report.

It is instructed not to introduce factual claims that were not present in the research findings.

Review

The review agent acts as a hallucination gate.

It checks the draft against the original research findings. Unsupported claims trigger a revision pass instead of being silently accepted.

The workflow allows bounded revision before producing the final report.

Why Sanity?

The project could have been built as a conventional search application.

That would miss the important part of the problem.

The Knowledge Base stores claims, sources, and relationships between claims. In particular, the contradicts relationship makes disagreement part of the data model.

That structure changes what the agent can do.

The system is not simply retrieving text that matches a query. It is retrieving structured knowledge that can be compared, traced back to sources, and carried through a multi-agent reasoning and review pipeline.

That is why the content structure matters to the application.

Example Sources

The checkpoint-deserialization investigation uses sources with different levels of authority, including:

The agent preserves those provenance differences rather than treating every retrieved claim as equally authoritative.

Sanity Project Details

Project ID: 4kagnnrl

Code

https://github.com/pratikdevelop/multi-agent-research-analyst

The repository contains the LangGraph agent, Sanity schemas, and the Next.js interface.

What I Wanted to Demonstrate

The interesting part of this project isn't simply that multiple agents can call a CMS.

It is that structured content can make disagreement explicit.

Instead of forcing conflicting evidence into one confident answer, the Knowledge Base preserves the claims and their relationships, the analysis stage compares them, and the review stage checks that the final report remains grounded in the retrieved evidence.

Research Dossier doesn't try to make disagreement disappear. It makes disagreement visible.

Top comments (0)