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.2.tar.gz (24.6 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.2-py3-none-any.whl (28.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: skeptic_agent-0.5.2.tar.gz
  • Upload date:
  • Size: 24.6 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.2.tar.gz
Algorithm Hash digest
SHA256 d33220052c344546650a4faf93740ed3d2d69607bdd71b50cfc4f117873646ab
MD5 2618af16ccebfb74dca91291a7f7d33d
BLAKE2b-256 31d99b08db5f7784ee6a6b0c1f5f9fda418bc38ca88326d2793895ff30335805

See more details on using hashes here.

File details

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

File metadata

  • Download URL: skeptic_agent-0.5.2-py3-none-any.whl
  • Upload date:
  • Size: 28.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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 73731a3cfeb4be52e22028c45454abd80b2f27047eea7a0aae6673d58b09368e
MD5 08dcd775d0aba148e271ab365c18009b
BLAKE2b-256 bff0cfe6164f2ff6f8ece0f0232aabb7c7376a9d51c7a4663ca19da5e6898105

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