Research workspace with grounded chat and a native knowledge graph over your papers and notes — Zotero-integrated, local-first, and reachable from a browser or desktop app.
Prisma is a research library assistant that discovers academic papers and books, assesses their relevance using an LLM (local or cloud-capable), organizes them into Zotero, and provides a flat-Markdown vault workspace with grounded chat and a native knowledge graph over your notes and sources.
Architecture: prisma serve runs a small supervisor that isolates the API, Web UI, ChromaDB, and native knowledge-graph module into independent, crash-recoverable processes — a flat-Markdown vault (notes, sources, chats, streams) is the shared workspace, with a CLI, REST/WebSocket API, and installable PWA/desktop UI all operating on it.
Required:
- Ollama (or another configured LLM provider — OpenRouter, llama.cpp) for research analysis, chat, and knowledge-graph extraction
Optional:
- Zotero Web API access (for library integration — discovering, deduplicating, and saving research; Prisma runs without it, just without the bookmark layer)
- Internet access to source APIs (arXiv, Semantic Scholar, etc.) and the Zotero Web API
- 🌐 Multi-Source Discovery: Searches papers (arXiv, Semantic Scholar, PubMed, IEEE Xplore*) and books (OpenLibrary, Google Books) per stream query, each source independently quota-controlled (*IEEE Xplore requires your own API key)
- 🔗 Zotero Bookmarking: Saves discovered papers into your existing Zotero library via its Web API — Zotero stays the library, Prisma adds to it
- 🌊 Research Streams: Persistent topic monitoring — scheduled searches automatically discover, deduplicate, and file new papers into a dedicated Zotero collection per stream
- ⭐ Quality-Rated Sources: Each search source is rated 1-5 stars by API reliability/structure, prioritizing curated academic APIs over scraping-dependent ones
- 🛡️ Academic Validation: Filters out non-academic content (blogs, ads, spam) via keyword/structure heuristics plus a weighted confidence score
- 📖 Abstract-Level Relevance: LLM assessment runs on title + abstract, not full PDF text — importing a paper into your vault separately converts its PDF to readable Markdown
- 🤖 AI-Powered Curation: Local or cloud-capable LLMs (Ollama, OpenRouter, llama.cpp) assess relevance, score confidence, and summarize what's found
- 🏷️ Smart Tagging (Streams only): Papers saved via a Research Stream are auto-tagged with confidence score, source, topic, and stream ID
- 🗂️ Vault Workspace: A local, flat-Markdown second brain for notes, sources, and chats —
prisma serveopens it as a web app, installable PWA, or native desktop shell - 💬 Chat: Grounded Q&A over your vault — semantic search (ChromaDB) plus a native knowledge-graph toolbox the model can call mid-turn (
expand_node,god_nodes,surprising_connections,suggest_questions,read_source, Zotero search) to follow threads across your notes and sources instead of answering from one search hit alone. Every claim in a reply is tagged with what backs it — a specific source, an inference, or neither — using a Toulmin argumentation model (qualifier, warrant, rebuttal), so an answer states not just what it's citing but how confidently and why. Each chat is itself a session graph — a main line of turns with tool calls, reasoning, claims, and regeneration attempts as branches off each one — so aRECALLtool can pull back anything that's rolled off the active context window instead of losing it, alongside a pinning/Excerpt model for managing context budget across local or cloud-capable LLM backends. Tool results are treated as untrusted input, never as instructions, to resist prompt injection from vault/search content - 🕸️ Native Knowledge Graph: Entity/relationship extraction (structured LLM output, no third-party dependency) stored in an embedded graph DB, re-ranking search results and answering "what connects to what" — with a live progress UI (sync status, extraction stats, failure inspection)
- 🔍 Semantic Search: ChromaDB embeddings + the knowledge graph re-rank results beyond keyword matching
- 🧹 Deduplication: Multi-level matching (DOI, exact title, year+author, NLTK stem overlap, LLM identity check) catches duplicates other tools miss, on demand or during stream refresh
- 🔄 Vault Sync: Server-orchestrated sync keeps the desktop app and server vault in agreement, working offline and reconciling on reconnect
- ⚡ Live Updates: Vault changes and stream-refresh progress push to the UI over WebSocket in real time
Prisma's research library management workflow:
- Discover Research - Query external APIs and Zotero libraries using stream's search criteria
- External Sources: arXiv, Semantic Scholar, PubMed, etc.
- Zotero Libraries: Existing research collections and newly imported items
- Assess Relevance - Use LLM to quickly evaluate research relevance to the topic
- Curate Content - Filter and organize relevant research immediately
- For Relevant Research:
- Check Zotero Storage - Search the Zotero Web API for duplicates
- Save to Zotero - Store new research and add to stream collection (if Zotero is reachable)
- Mark Unsaved - Flag research that couldn't be saved (if Zotero is unreachable or not configured)
- Analyze Content - Comprehensive LLM analysis for research assessment
- Enhance Library - Improve organization and provide research insights (noting any unsaved research)
Note: Zotero serves dual roles as both a source integration (for discovering existing relevant research) and primary organization tool (for organizing and managing research collections).
The CLI is deliberately minimal — it only covers what can't be an HTTP call (start the server, check readiness, bootstrap auth). Research streams, literature review, and Zotero library management are API-only.
📖 Complete CLI Reference: See CLI Documentation for detailed command options, examples, and the full command→API-route mapping.
# Start the server
prisma serve
# Check system status
prisma status --verbose# Create a research stream
curl -X POST http://127.0.0.1:8765/streams \
-H 'Content-Type: application/json' \
-d '{"title": "Stream Name", "query": "search query", "refresh_frequency": "weekly"}'
# Generate a literature review
curl -X POST http://127.0.0.1:8765/review \
-H 'Content-Type: application/json' \
-d '{"topic": "neural networks"}'
# Zotero status
curl http://127.0.0.1:8765/zotero/statusNot yet published to PyPI — install from source (editable install, so changes to source files are immediately active, no reinstall needed):
git clone https://github.com/CServinL/prisma.git
cd prisma
python3 -m venv ~/prisma
source ~/prisma/bin/activate
pip install -e ".[dev]"
prisma serveOpens the vault workspace at http://127.0.0.1:8766/app — installable as a PWA, or wrapped in the Tauri desktop shell. See Installation for the full setup.
📖 Wiki — complete documentation
- Features — what Prisma does and how
- Installation — user and developer setup
- CLI Reference — all commands and options
- Configuration — YAML reference
- Research Streams — persistent topic monitoring
- Sources — quality ratings and academic validation
- Zotero Integration — Web API client, connectivity/reachability, offline write queue
- Architecture — components and data flow
- Roadmap — planned features
- Agent Skill — REST API reference and vault link/citation syntax, for AI agents working with a running Prisma instance
- 🐍 Python 3.12+ — pip/setuptools, no Poetry
- 🤖 Ollama / llama.cpp for local LLM backend (analysis, chat, knowledge-graph extraction, and ChromaDB embeddings) — interchangeable providers, configurable per-service; OpenRouter for cloud-capable chat
- 🔗 Zotero for reference management — the bookmark layer; the vault is the second brain
- ⌨️ Click for the command-line interface
- 🗂️ Flat Markdown vault — no database; notes, sources, chats, and streams are plain
.md/.yamlfiles - 🔍 ChromaDB for semantic search, running as its own supervised server process
- 🕸️ Kùzu — embedded graph DB backing the native knowledge graph (entity/relationship extraction via structured LLM output, no third-party dependency)
- 🌐 FastAPI + SvelteKit — REST + WebSocket API, installable as a PWA on any platform, or wrapped in a native Tauri desktop shell
- 🛡️ Supervised processes —
prisma serveruns a small supervisor that isolates the API, Web UI, ChromaDB, and knowledge-graph module into independent, crash-recoverable processes
See Architecture Overview for complete technical details.
We welcome contributions from the community! Please see our Contributing Guidelines for details on:
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.