Local-first, auditable knowledge reasoning system with explicit reasoning paths, a sources-aware knowledge graph, and self-evolution behind a human approval gate.
νκ΅μ΄ README Β· π μ²μ μμνμλ λΆ (10μ΄λ λ°λΌν μ μμ΄μ)
Released 2026-05-17 after 190 PRs since v0.2.0 (1800+ tests). The v0.2 β v0.3 gate is clear: all six Foundation Hardening axes (architecture, eval, observability, security, controlled evolution, real-data validation) passed; second-user validation closed 2026-05-13.
- NOT production-ready β operational maturity (HTTPS / SSO / multi-tenancy / backup CLI) is a v1.0 deliverable; see SECURITY.md
- Designed with security-first principles end to end
- Open to collaboration β external contributors sign a one-click CLA on their first PR (see License)
JAMES is not building one vertical. It is being hardened as a "mother platform" from which domain packs (legal, food, retail, travel, etc.) can branch off only at v1.0. Until then:
- No domain-specific features land in
core/ - Every change is graded against the same six-dimension readiness framework (architecture / extension API / eval contract / operational maturity / security boundary / production proof)
- The plugin contract that future packs will be built against is being designed and stress-tested
See docs/PLATFORM_READINESS.md for
the 6 dimensions, 4 gates (v0.2 / v0.3 / v0.4 / v1.0), and 3
branching forms (Domain Pack / Distribution / Vertical Product).
JAMES combines ideas that are rarely found together:
- Sources-aware Graph-RAG β 12 typed relations carry semantic
meaning beyond embeddings, and every relation carries
sources: [{doc_id, weight, role, ts}]so deleting or modifying a document surgically updates only the affected derived knowledge (Knowledge Cascade AβE, v0.3.0) - Cognitive Layer β cross-encoder reranker (default ON), LLM
query rewriter, reflection loop (draft β critique β revise),
verification engine (security + fact check), and tool router.
One
trace_idreconstructs the full 8-stage reasoning sequence viascripts/replay_trace.py - PolicyEngine as a layer, not a sprinkle β single point of role / sensitivity decisions wired into retrieval, graph, output, and tools; removing it breaks 6+ modules (v0.2 Axis 4)
- Change Request primitive β every write (wiki edits, workspace jobs, self-evolution patches) routes through propose β review β admin approval β atomic apply β audit row. No silent writes.
- Self-evolution behind a human gate β feedback β candidate β
bench eval β human approval β deploy β auto-rollback on
regression. Every deployed patch has an
approver_usernameaudit row (v0.2 Axis 5). - 100% local β runs on a laptop with Ollama
Each feature is regression-tested against the STEP 7 13-query baseline + RAGAS metrics. PRs touching
core/{retrieval,graph,reasoning}cannot land without bench numbers.
- Python 3.11+
- Ollama installed and running
- Min 16GB RAM (32GB+ recommended)
- (Optional) NVIDIA GPU for faster inference
- (Optional) Tavily API key for web search (free 1k/month)
git clone https://github.com/Hashevolution/James-RAG-Evol
cd James-RAG-Evol
# Configure environment
cp .env.example .env
# Edit .env β set JAMES_API_KEY, JAMES_JWT_SECRET
# Install dependencies
pip install -r requirements.txt
# Start the server (admin wizard auto-recommends a model on first login)
python server_llmwiki.pyOpen http://localhost:8000/admin β the admin wizard measures your
hardware and offers a one-click install of an appropriate Ollama
model. Then open http://localhost:8000 for the chat UI.
[User Query]
β
[Security Filter] β injection patterns + PolicyEngine pre-check
β
[Query Router] β chat / coding / retrieval / web_search
β
[Query Rewriter] β LLM rewrite (opt-in, JAMES_ENABLE_QUERY_REWRITE)
β
[Hybrid Search] β Vector(60%) + BM25(20%) + keyword(10%) + name(10%)
β
[Cross-Encoder Rerank] β MiniLM-L-6-v2 (default ON; JAMES_DISABLE_RERANK=1 to disable)
β
[Graph Engine] β DFS + sources-aware + sensitivity gating
β
[Reasoning Loop] β retrieve β expand β reflect (opt-in) β verify (opt-in)
β
[Tool Router] β read tools direct; write tools β Change Request
β
[Output Filter] β PII masking + role-based filter
β
[Answer + Reasoning Path + trace_id]
Every stage emits a row tied to one trace_id.
scripts/replay_trace.py <trace_id> reconstructs the full sequence
from audit_log. See docs/ARCHITECTURE.md Β§5.7
for the Cognitive Layer design.
James-RAG-Evol/
βββ core/
β βββ reasoning/ retrieval/reflection/verification/tool router
β βββ retrieval/ hybrid search + cross-encoder reranker + query rewriter
β βββ memory/ long-term memory (db / conversation / summaries)
β βββ plugins/ plugin contract surface (Provider Protocol)
β βββ policy_engine.py single point of role/sensitivity decisions
β βββ change_request.py propose/review/approve write primitive
β βββ cascade.py file delete/modify β graph surgical update
β βββ graph_editor.py edge edit (replace/append/delete) + bidirectional sync
β βββ ...
βββ eval/ STEP 7 regression baseline + RAGAS suite
βββ llm/ LLM provider abstraction
βββ tools/ Capability-token gated tool modules
βββ frontend/ Web UI (HTML + JS)
βββ processors/ File preprocessing
βββ wiki/ Knowledge graph (markdown + sources)
βββ memory/ Long-term memory DB
βββ workspace/ Change requests, patches, proposals
βββ scripts/ bench.py / replay_trace.py / ops scripts
βββ reports/ Eval results + promo assets
βββ docs/ ARCHITECTURE / PLATFORM_READINESS / ROADMAP / handovers
βββ server_llmwiki.py Main server entry point
JAMES treats security as a design principle, not a feature:
- 3-stage access control: Vector β Graph β Output
- RBAC (4 roles) + ABAC (4 sensitivity levels)
- Instruction isolation: separates commands from data
- JWT auth + rate limiting + full audit log
- Sandboxed execution (for tool calls)
Realistic note: synthetic-data testing differs from adversarial production testing. See SECURITY.md.
| Feature | Status |
|---|---|
| Hybrid Search (Vector + BM25 + keyword + name) | Working |
| Cross-encoder reranker (MiniLM-L-6-v2) | Working β default ON (v0.3) |
| LLM query rewriter | Opt-in (v0.3) |
| Sources-aware Graph-RAG (Knowledge Cascade AβE) | Working (v0.3) |
| PolicyEngine (RBAC + ABAC + capability tokens) | Working (v0.2 Axis 4) |
| Reflection loop (draft β critique β revise) | Opt-in (v0.3) |
| Verification engine (security + fact check) | Opt-in (v0.3) |
| Tool router (read direct, write β Change Request) | Working (v0.3) |
| Change Request primitive (wiki + jobs + patches) | Working (v0.2.x + v0.3) |
| Self-evolution (human approval + auto-rollback) | Working (v0.2 Axis 5) |
Trace replay (one trace_id β full reasoning seq) |
Working (v0.3) |
| Multimodal (image/video/audio + OCR-poison quarantine) | Working (v0.2 Axis 4) |
| Web search (Tavily / DuckDuckGo fallback) | Working |
| Multi-LLM routing (Ollama + Claude CLI backends) | Working |
| STEP 7 regression baseline + RAGAS | Working (v0.2 Axis 2) |
| Real-data validation (second-user gate) | Passed 2026-05-13 |
- Backend: FastAPI + Uvicorn
- LLM: Ollama (Gemma, DeepSeek-Coder, LLaVA)
- Vector DB: ChromaDB
- Embedding: Sentence-Transformers (MiniLM)
- Search: BM25 + Vector hybrid
- Web search: Tavily (primary) + DuckDuckGo (fallback)
- Auth: JWT (python-jose)
- Storage: SQLite + markdown wiki
See ROADMAP.md and docs/PLATFORM_READINESS.md.
Summary:
- v0.1: Core engine + scaffolding (released)
- v0.2: Foundation Hardening β 6 axes (closed 2026-05-13)
- v0.3: Platform Skeleton β Cognitive Layer + Knowledge Cascade
- Change Request primitive (current; released 2026-05-17)
- v0.4: First Domain Pilot β one pack + one external customer, 6-month no-regression
- v1.0: Production-Grade Mother β HTTPS / SSO / multi-tenancy / SOC2 readiness; external developers can publish their own packs
Multi-agent specialists, optional Neo4j backend, OpenAI-compatible
API, streaming responses, and federation are speculative Beyond
v1.0 work β see ROADMAP.md Β§Beyond v1.0.
Welcome! See CONTRIBUTING.md.
Priority areas:
- Documentation, examples, translations
- Bug fixes, test coverage
- New tool integrations and LLM provider support
Licensed under the MIT License. Use freely. See LICENSE.
External contributors sign a one-click Contributor License Agreement on their first pull request (CLA Assistant). One signature covers all future contributions to the project. See CONTRIBUTING.md for the full Β§License & CLA section, and docs/legal/non-cla-contributions.md for contribution paths that don't require signing.
A full inventory of third-party dependency licenses is available in THIRD_PARTY_LICENSES.md.
Inspired by:
- Microsoft GraphRAG
- LightRAG
- Graphiti
- Palantir-style ontology approaches
- Architectural direction, Platform Readiness gates, and roadmap framing are discussed with LEO, continuing collaborator on this work, and that's how we intend to keep it.
Use at your own risk. This is research code. No guarantees regarding sensitive-data handling or production security without further hardening.
