Skip to main content

A local, free, self-fact-checking multi-agent research assistant (Ollama + MCP + RAG).

Project description

๐Ÿง Skeptic โ€” a self-fact-checking research agent

Most AI researchers confidently make things up. Skeptic doesn't โ€” because a dedicated agent's only job is to disprove the others. Every claim ships with a citation and a confidence tag, or it gets flagged and sent back for better sources.

100% local and free. Runs entirely on your machine โ€” no API keys, no per-token cost, works offline once the models are pulled.

Built with LangGraph ยท Ollama (local Llama 3.2 / Qwen 2.5) ยท MCP (DuckDuckGo search) ยท local RAG ยท Typer + Rich CLI.


How it works

   START
     โ”‚
     โ–ผ
 โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
 โ”‚ Planner โ”‚  splits the question into focused sub-questions
 โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
     โ”‚
     โ–ผ
 โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   (parallel)   MCP web search + your local docs โ”€โ–บ RAG re-ranking
 โ”‚ Researchers  โ”‚  each sub-question โ†’ claims + real source URLs
 โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
     โ”‚
     โ–ผ
 โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   scores every claim: verified / weak / unverifiable
 โ”‚ Skeptic โ”‚โ”€โ”€โ”
 โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚  too many weak claims + retries left?
     โ”‚        โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บ back to Researchers
     โ–ผ (good enough)
 โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
 โ”‚ Human gate โ”‚  you approve / reject / revise before it finalizes
 โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
     โ”‚
     โ–ผ
 โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
 โ”‚ Synthesizer โ”‚  writes the report, tags each claim โœ… / โš ๏ธ / โŒ
 โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
     โ”‚
     โ–ผ
    END

The loop back to the researchers is the whole idea: weak evidence doesn't get published, it gets re-investigated. Search is an MCP tool, and each set of hits is RAG-ranked locally so the model reads the passages that matter.

Model routing (all local via Ollama)

Role Default model Why
Researchers (high volume) llama3.2:3b small + fast for bulk work
Planner / Skeptic / Synthesizer qwen2.5:7b need real judgment
RAG embeddings nomic-embed-text rank web passages by relevance

Every model is overridable via env var (see .env.example) โ€” bump to a bigger model for better answers, or drop to a smaller one for less RAM.

Quickstart

First install Ollama and start it:

ollama serve        # leave running in another terminal

Then install Skeptic as a global command (needs Python 3.10+):

pipx install .      # or: pip install .

Bootstrap the local models (one-time download), then ask away โ€” from any folder:

skeptic setup                                        # pulls the models
skeptic ask "How does caffeine affect sleep quality?"

No keys, ever. The run prints a live agent-by-agent trace, pauses at a human gate for your approval, and saves the final report to ./reports/<timestamp>.md.

Handy commands:

skeptic doctor      # check Ollama + models are ready
skeptic models      # show which models each role uses
skeptic docs        # list the local documents indexed for retrieval

Prefer not to install? From this folder you can also run python cli.py ask "your question" inside the venv.

Fact-check against your own documents

Skeptic can ground answers in your own files โ€” notes, papers, reports โ€” right alongside the web. Drop .pdf, .txt, or .md files into ~/.skeptic/docs (or any folder) and they're chunked, embedded locally, and retrieved per sub-question just like web hits. Still 100% local; nothing leaves your machine.

mkdir -p ~/.skeptic/docs
cp ~/Downloads/*.pdf ~/.skeptic/docs/

skeptic docs                       # see what's indexed
skeptic docs --reindex             # embed them now (otherwise done on next ask)
skeptic ask "what does my research say about X?"

# or point one run at a specific folder:
skeptic ask --docs ./my-papers "summarize the key findings"

Citations to local files appear as file://โ€ฆ URLs. Embeddings are cached, so re-runs are fast and only re-embed when the files change. Override the default folder anytime with SKEPTIC_DOCS_DIR.

Project layout

skeptic/
โ”œโ”€โ”€ state.py            # the shared graph state
โ”œโ”€โ”€ models.py           # typed contracts every agent speaks in
โ”œโ”€โ”€ config.py           # model routing + Ollama LLM factory
โ”œโ”€โ”€ prompts.py          # all prompts in one place
โ”œโ”€โ”€ tools.py            # web search as an MCP client (async)
โ”œโ”€โ”€ mcp_server.py       # the DuckDuckGo MCP search server
โ”œโ”€โ”€ rag.py              # local embed + cosine re-ranking of web results
โ”œโ”€โ”€ docs.py             # local-document RAG (PDF/txt/md) + on-disk cache
โ”œโ”€โ”€ memory.py           # SQLite checkpointer (durable/resumable runs)
โ”œโ”€โ”€ graph.py            # wires the agents + the retry loop + human gate
โ”œโ”€โ”€ cli.py              # the Typer + Rich `skeptic` command
โ””โ”€โ”€ agents/
    โ”œโ”€โ”€ planner.py
    โ”œโ”€โ”€ researcher.py
    โ”œโ”€โ”€ skeptic.py      # the unique hook
    โ”œโ”€โ”€ human_gate.py   # pause for human approval
    โ””โ”€โ”€ synthesizer.py
cli.py                  # backward-compat shim (python cli.py โ€ฆ)
pyproject.toml          # packaging โ†’ the global `skeptic` command

Roadmap

  • Phase 1 โ€” Planner โ†’ Researchers โ†’ Synthesizer
  • Phase 2 โ€” Skeptic + the falsify/retry loop
  • Phase 3 โ€” human approval gate + cross-run memory
  • Phase 4 โ€” MCP-native search (DuckDuckGo), local RAG, Ollama, global CLI
  • Phase 5 โ€” RAG over your own PDF/txt/md docs ยท publish-ready packaging

See HANDOFF.md for exact status, and PUBLISHING.md for how to ship it to PyPI.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

skeptic_agent-0.5.0.tar.gz (23.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

skeptic_agent-0.5.0-py3-none-any.whl (27.2 kB view details)

Uploaded Python 3

File details

Details for the file skeptic_agent-0.5.0.tar.gz.

File metadata

  • Download URL: skeptic_agent-0.5.0.tar.gz
  • Upload date:
  • Size: 23.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for skeptic_agent-0.5.0.tar.gz
Algorithm Hash digest
SHA256 a196318622da59efbb1e36fe56e12f23dded67b24315ad0841bda7428f53f77d
MD5 9acfddb881f71516f2af486c60a1dd54
BLAKE2b-256 e92714b1ee5274616fd746b7c7a3c1b4fc7b107089477386b660ca432fce0b5a

See more details on using hashes here.

File details

Details for the file skeptic_agent-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: skeptic_agent-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 27.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for skeptic_agent-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2d3ab31baea5bef61802648c42ebf0c8d11d801e528f2aae18af68b56285d751
MD5 06fd1faf296d3c40c9d2006d50e68f9d
BLAKE2b-256 9a4997c59040cc93946400218f9065c95f9ea6b9fd10ff1e359a69f81b2c8fc7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page