NOVA
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
NOVA-Cognition-Framework
Author: Andrei Moldovean · conceived April 2025 · first public commit March 2026
Original concepts: shard memory architecture, HUGINN/MUNINN retrieval pipeline, NÓTT daemon, confidence decay, shard consolidation, Forgemaster orchestration.
A unified repository containing NOVA (persistent AI memory) and Forgemaster (multi-agent orchestration). NOVA is the memory layer. Forgemaster is the execution layer. They share one repo and one data store.
Currently in active use as the documentation and knowledge-management backbone for multiple projects — each project keeps its own shard set with cross-project relationships tracked through the knowledge graph.
What is NOVA?
NOVA is a persistent memory system for AI agents. It stores conversations and decisions as modular JSON "shards" — each with metadata, confidence scores, and decay rates. A knowledge graph tracks relationships between shards so agents can retrieve contextually relevant memory, not just recent history. A parallel wiki layer holds curated, evergreen pages ingested from external sources.
NOVA runs as an MCP server, meaning any MCP-compatible client (Claude Desktop, Claude Code, Cursor) can connect to it and query/write memory using structured tool calls.
Key capabilities:
Semantic shard retrieval via HUGINN (Haiku fast pass) + MUNINN (Sonnet deep rerank) + spreading activation (graph-based third pass)
Confidence-weighted recall with time-based decay
Cluster-aware hook recall: top-k walk that collapses same-cluster results and surfaces siblings
Anthropic prompt-cache prewarm: fires a max_tokens=0 cache-write call so subsequent requests read at ~0.1× cost
HMAC-SHA256 embedding integrity: signs vectors at ingestion, verifies before MUNINN reranking, logs adversarial events
NÓTT background daemon: decay, compaction, merge suggestions, graph sync
Knowledge graph of inter-shard relationships with transitive BFS
Three-tier discovery: index → summary → full shard (via
summary_index.json)Wiki layer for curated, non-decaying knowledge
Nidhogg ingestion pipeline with full provenance tracking
Self-evolution loop (
nova_evolve) for health-driven planning cyclesUsage logging per operation to
nova_usage.jsonl
Related MCP server: memento-mcp-server
What is Forgemaster?
Forgemaster is a multi-agent orchestration layer built on top of NOVA. It decomposes tasks into typed tickets and routes each to the optimal model in a defined hierarchy.
Agents run in parallel sandboxed lanes. NOVA is Forgemaster's memory backplane: every sprint reads project context from shards and writes decisions back.
Key capabilities:
Task decomposition from design docs into typed, routable tickets
Three-tier model-adaptive routing: empirical pass rate history → complexity-keyword override → static routing table; calibrated via
nova_calibrate_routingParallel sandboxed execution lanes
Sprint pipeline writes implementer output to disk when the design doc names a
Target file:Per-call JSONL event log via
FORGEMASTER_EVENT_LOGFull NOVA integration for persistent project context across sessions
Agent Hierarchy
Architect (you)
└── Lead (Sonnet) — orchestration, review, ambiguous tickets
└── Mid (Haiku, configurable) — bounded implementation, boilerplate, structured output
└── Low (Haiku) — research, documentation, fast tasksHow They Connect
You (design doc / feature request)
│
▼
Forgemaster Orchestrator (Sonnet)
├── nova_shard_interact() → load project context from NOVA
├── decompose into typed tickets
├── route by task type
│ ├── architecture / review / ambiguity → Sonnet
│ ├── implementation / boilerplate → implementer (Haiku by default)
│ └── research / documentation → Haiku
├── parallel lanes execute
├── QA pass + Lead review
└── nova_shard_update() → write decisions back to NOVAArchitecture Diagram
graph TD
A["MCP Client\n(Claude Desktop / Claude Code / Cursor)"] -->|"39 tool calls"| B["nova_server.py\nMCP Adapter"]
B --> C
B -->|"nova_shard_interact"| R
B --> D
subgraph C["NOVA Memory Layer"]
C1["store.py\nShard I/O"] --- C2["graph.py\nKnowledge Graph"]
C1 --- C3["wiki_tools.py\nWiki Layer"]
C1 --- C4["facts.py\nFacts Corpus"]
end
C1 -->|"nova_shard_index.db"| E[("SQLite Index")]
C4 -->|"facts_index.db"| E
subgraph R["Ravens Retrieval Pipeline"]
R1["HUGINN\nHaiku fast pass"] -->|"score ≥ threshold"| R3["Result"]
R1 -->|"score < threshold"| R2["MUNINN\nSonnet deep rerank"]
R2 --> R3
R2 --> R4["Spreading Activation\nGraph BFS third pass"]
R4 --> R3
end
subgraph N["NÓTT Daemon"]
N1["Decay"] --> N2["Compaction"]
N2 --> N3["Merge Scan"]
N3 --> N4["Adversarial Pass"]
end
N -->|"scheduled maintenance"| C1
ND["Nidhogg\nRepo Ingestion"] --> C1
subgraph FM["Forgemaster Model Routing"]
FM1["Sonnet\nArchitecture / Review"]
FM2["Implementer\n(Haiku by default)"]
FM3["Haiku\nResearch / Docs"]
end
D["Forgemaster\nSprint Orchestrator"] --> FMQuick Start
1. Install dependencies
cd mcp/
pip install -r requirements.txtNOVA requires MCP Python SDK v2 (mcp[cli]>=2,<3), which implements spec
revision 2026-07-28. The server imports mcp.server.mcpserver.MCPServer and
will not start against SDK v1 — the pin is bounded on both sides deliberately, and
a CI job installs mcp/requirements.txt on its own to prove a fresh install works.
Python 3.11 or 3.12. For development, install the pinned lockfile as well:
pip install -r requirements-dev.txt # pytest, ruff, mypy + exact runtime pins2. Configure environment
Copy .env.example to .env at the repo root and fill in your keys:
CLAUDE_API_KEY=sk-ant-...Each Forgemaster role (orchestrator, planner, implementer, reviewer) and the NÓTT adversarial pass resolves to a model and provider from env vars, so any of them can be pointed at another model or at a local server without code changes — see Environment variables.
If CLAUDE_API_KEY is absent, HUGINN and MUNINN silently fall back to local-only retrieval (token overlap + cosine over local embeddings).
3. Register in Claude Desktop
claude_desktop_config.json:
{
"mcpServers": {
"nova": {
"command": "python",
"args": ["path/to/mcp/nova_server.py"],
"env": {
"NOVA_SHARD_DIR": "path/to/shards",
"CLAUDE_API_KEY": "sk-ant-..."
}
}
}
}4. Run the server
python mcp/nova_server.pyDocker (clean room)
Build the image — embedding model (~80 MB) is downloaded and cached during build so first boot never blocks:
docker build -t nova:latest .Run interactively (seeds one health-check shard on first boot if nova_data volume is empty):
docker run --rm -i \
-e CLAUDE_API_KEY=sk-ant-... \
-v nova_data:/app/data \
nova:latestRegister in Claude Desktop / Claude Code (claude_desktop_config.json):
{
"mcpServers": {
"nova": {
"command": "docker",
"args": [
"run", "--rm", "-i",
"-e", "CLAUDE_API_KEY=sk-ant-...",
"-v", "nova_data:/app/data",
"nova:latest"
]
}
}
}Or use docker-compose.yml (copy your keys into .env first):
docker compose up novaNOVA_HITL_BROKER=policy is set in the image by default. Note this no longer governs MCP tool calls: the seven destructive tools ask for approval through your MCP client (see Approval), which works fine in a container. The broker only covers paths with no client to ask — forgemaster's per-file writes and bare CLI use — where policy denies them.
Approval
Seven tools cannot be undone, so NOVA asks before running them:
nova_shard_archive · nova_shard_forget · nova_shard_consolidate ·
nidhogg_ingest · nidhogg_scan · nova_evolve · nova_forgemaster_sprint
The prompt arrives through your MCP client, using the protocol's elicitation
mechanism, and is asked before the tool runs — so declining means nothing
happened. The set is derived from the capability registry
(tool_registry.DESTRUCTIVE_CAPABILITIES), which is the same source as the
destructiveHint published to clients, so a tool can never be advertised as safe
while the gate treats it as dangerous.
Your client must support elicitation. One that does not cannot approve these
seven, and they will be refused with code: "gate_denied". Everything else works
normally.
This is independent of NOVA_HITL_BROKER, which now only covers paths with no MCP
client to ask: forgemaster's per-file writes and bare CLI use.
Development & Testing
Run the default test suite
python -m pytest tests/The benchmark marker is excluded by default — only unit and integration tests run.
Run the retrieval pipeline benchmark
Stage-level latency, funnel ratios, and recall@k for nova_shard_interact across corpus sizes 50 / 200 / 500 / 1000. Uses synthetic shards with ground-truth cluster labels; stubs the Anthropic API so the bench stays fully offline.
NOVA_BENCH=1 NOVA_BENCH_LOG=bench_retrieval.jsonl \
python -m pytest tests/bench_retrieval.py -m benchmark -s
python utilities/bench_report.py bench_retrieval.jsonlThe bench measures each stage independently: SQLite facts pre-filter → HUGINN local + LLM → MUNINN local + LLM → spreading activation, plus the legacy _walk_topk_with_cluster_collapse walk as an off-path probe. See tests/bench_retrieval.py for the probe definitions.
Directory Structure
NOVA-Cognition-Framework/
mcp/
# Core server
nova_server.py ← ACTIVE MCP server — bootstrap + wiring (registers all 39 tools)
server_context.py ← process-scoped singletons (ravens, NÓTT, hooks, gate, audit, session); all handlers read through ServerContext instead of module globals
config.py ← all env vars and defaults (single source of truth)
schemas.py ← Pydantic input models
models.py ← shared dataclasses (UsageSummary)
requirements.txt
SKILL.md ← NOVA cognitive instructions (loaded every session)
ONBOARDING.md ← fresh-install flow (triggered when no shards exist)
# Shard I/O & persistence
store.py ← shard JSON read/write, index/summary layer, atomic mutate_shard (lock-safe read-modify-write)
nova_shard_db.py ← SQLite-backed shard index (nova_shard_index.db)
shard_format.py ← shard serialisation helpers (.json ↔ .shard)
shard_parser.py ← shard parsing (used by facts.py)
atomic_io.py ← atomic file write primitives
# Knowledge graph
graph.py ← inter-shard graph ops (entities, relations, transitive BFS)
# Epistemic provenance
provenance.py ← chain-of-custody records (source_type, validator, mechanism, confidence_delta, supersession)
# Maintenance & lifecycle
maintenance.py ← confidence decay, compaction, cosine similarity, merge
nott.py ← NÓTT daemon: decay, compact, merge, graph sync (lock-safe shard writes via store.mutate_shard)
# Retrieval & ranking
ravens.py ← HUGINN (Haiku fast retrieval) + MUNINN (Sonnet deep rerank)
recall.py ← hook recall + cache prewarm + cluster-aware top-k walk
nova_embeddings_local.py ← local all-MiniLM-L6-v2 embeddings + heuristic summaries
clustering.py ← shard community detection (Leiden algorithm)
arrow_cache.py ← Arrow-format embedding cache for vectorised cosine
spreading_activation.py ← graph-based score propagation as MUNINN third pass
embedding_integrity.py ← HMAC-SHA256 signing and verification for shard embeddings
# Permissions, gating & audit
permissions.py ← env-driven tool allow/deny (NOVA_DENIED_TOOLS/PREFIXES)
capability_gate.py ← HITL gate keyed to skill verification level
audit_log.py ← per-tool HITL audit trail (SQLite, WAL mode)
access_log.py ← shard access logging for decay-on-read pass
# Session & sprint
session_store.py ← session CRUD and flush-to-disk
forgemaster_runtime.py ← sprint orchestration, real LLM dispatch, biconditional audit
usage.py ← JSONL operation logging
timeutils.py ← shared time/date helpers
# Hook system
hooks.py ← hook registry (SESSION_START, POST_SPRINT, COUNT_THRESHOLD)
nova_hook_extract.py ← PostToolUse hook: entity extraction on Edit/Write
nova_hook_precompact.py ← pre-compaction preparation hook
nova_hook_recall.py ← UserPromptSubmit hook: injects NOVA context into prompts
nova_hook_stop.py ← session-stop cleanup hook
# Tool registry
tool_registry.py ← canonical ToolSpec registry; @nova_tool validates names at import
# Skill verification
skill_manifest.py ← @@verification / @@capabilities header parser
# Tool handler modules (split from nova_server.py god-object)
shard_tools.py ← 16 shard CRUD/lifecycle handlers (interact, create, update, validate, search, index, summary, list, get, get_full, merge, archive, forget, consolidate, query_state, obsidian_export)
graph_tools.py ← nova_graph_query + nova_graph_relate handlers
session_tools.py ← nova_session_flush / load / list handlers
forgemaster_tools.py ← nova_forgemaster_sprint + nova_cache_prewarm handlers
gate_helpers.py ← permission_error / gate_check / log_executed plumbing shared across handler modules
reject.py ← typed reject envelope — RejectCode enum + reject_payload()/reject_dict()
result_middleware.py ← server middleware: sets isError on tool results that report failure
approval.py ← elicitation resolver — asks the operator before a destructive tool runs
active_request.py ← contextvar holding the live MCP request, for code too deep to be handed a Context
# MCP tool modules
evolve.py ← nova_evolve self-improvement loop
nidhogg.py ← nidhogg_ingest/scan/status tools
facts.py ← nova_facts_search / nova_facts_rebuild
external_retrieval.py ← nova_external_retrieval: multi-agent deliberation pipeline with cost guard
wiki.py / wiki_ingest.py / wiki_tools.py ← wiki layer model, pipeline, MCP tools
obsidian_export.py ← Obsidian vault export logic
build_summary_index.py ← batch-build summary_index.json via Haiku
adversarial.py ← adversarial shard contradiction testing
ternary_net.py ← ternary epistemic memory encoder (experimental)
calibrate.py ← nova_calibrate_routing: HUGINN threshold + Forgemaster routing calibration
# Tests (run with pytest from mcp/ — memory-explorer only, not pytest)
test_nova.py ← memory-explorer CLI (not pytest — run directly)
providers.py ← LLM provider adapters (anthropic, openai_compatible) shared by forgemaster_runtime + adversarial
tests/ ← main pytest suite (test_* modules, conftest.py, bench_corpus.py, bench_retrieval.py)
golden/ ← tool_manifest.json — golden snapshot of the published MCP surface
utilities/ ← migration helpers, diagnostics, ad-hoc maintenance
# Export converters (import existing AI conversation history into NOVA)
chatgpt_to_nova.py ← ChatGPT conversation export → shards
claude_to_nova.py ← Claude (Anthropic) conversation export → shards
gemini_to_nova.py ← Gemini MyActivity (Google Takeout) → shards
grok_to_nova.py ← Grok (xAI) export → shards
lechat_to_nova.py ← Le Chat (Mistral) export → shards
perplexity_to_nova.py ← Perplexity exported threads → shards
docs_to_nova.py ← standalone documents (design docs, papers) → reference shards
backfill_graph_entities.py ← register legacy / imported shards as graph entities
backfill_provenance.py ← seed epistemic_provenance records on shards that predate provenance.py
docker/
entrypoint.sh ← seeds dummy shard on first boot, starts server
seed/
nova_docker_healthcheck.json ← minimal valid shard for clean-room testing
shards/ ← live shard data (never edit directly)
wiki/ ← curated markdown pages with YAML frontmatter + [[wikilinks]]
intake/ ← drop zone for nidhogg_scan
nova_sessions/ ← flushed MCP session state
output/ ← built artifacts, forgemaster event logs
facts/ ← curated .shard files for SQLite pre-filter
forgemaster/
AGENTS.md ← orchestration config and model routing
SKILL_LIBRARY.md ← index of all skills across 25 domains
STANDARDS.md ← authoring standard for all forgemaster content
skills/ ← core orchestration skills (12 files)
library/ ← domain skill library (324 files, 25 categories)
agents/ ← agent persona definitions (221 personas, 18 divisions)
rules/ ← coding standards and hook rules
slash-commands/ ← slash command definitions (commit, create-pr, brainstorm, etc.)
templates/ ← project templates (DEBUG.md, UAT.md, UI-SPEC.md, VALIDATION.md, etc.)
workflows/ ← reusable workflow definitions (add-phase, audit-milestone, etc.)
docs/ ← forgemaster reference docs
docs/ ← reference and roadmap documents
Donors/ ← reference implementations
Dockerfile ← builds the MCP server image
docker-compose.yml ← dev/test orchestration
.env ← API keys (never commit)
.env.example ← template (committed)NOVA MCP Tools (39)
Every tool is published with a human-readable title and MCP annotations derived
from its capability tag — readOnlyHint (22 tools), destructiveHint (the seven
above), idempotentHint, openWorldHint — so a client can decide what it may
auto-approve without a hardcoded list. All tools take a single params object.
Core shard + graph + session (23)
Tool | Description |
| Load shards into context — HUGINN fast pass, MUNINN deep rerank |
| Create shard with post-write embedding enrichment; accepts |
| Append turn — auto-compaction triggered at threshold |
| Record an epistemic validation event on a shard's provenance record ( |
| Confidence-weighted keyword + ravens search |
| Compact browse rows, metadata only |
| Browse rows plus a short synopsis per shard |
| Full raw dump (legacy; prefer index/summary) |
| Read full shard — no side effects |
| Cold-path full-body fetch — returns summary + conversation body |
| Query SQLite shard index by epistemic state vector (confidence, valence, arousal) |
| Merge shards into meta-shard, updates graph |
| Soft-archive — excluded from search, preserved on disk |
| Hard exclude with provenance log |
| Full NÓTT cycle: decay + compact + merge suggestions |
| Export shard set as Obsidian-compatible markdown vault |
| Query knowledge graph (direct or transitive BFS) |
| Add directed relation between shards |
| Persist active session to disk |
| Restore flushed session to memory |
| List all persisted session IDs |
| Full 4-turn sprint pipeline |
| Fire a max_tokens=0 cache-write call with top-N shard summaries so subsequent requests receive Anthropic cache reads |
Relation types: influences, depends_on, contradicts, extends, references, merged_from, supersedes, corroborated_by.
Wiki (6)
Tool | Description |
| Inspect or edit the wiki page schema |
| Ingest markdown/source into the wiki |
| Search across wiki pages |
| Read a single wiki page in full |
| List wiki pages (optionally by category) |
| Lint wiki content for schema compliance |
Wiki pages live in wiki/ as markdown with YAML frontmatter and [[wikilinks]]. They are evergreen — they do not decay — and are only created/updated via nova_wiki_ingest.
Nidhogg — repo/document ingestion (3)
Tool | Description |
| Ingest a single file by path |
| Scan |
| Show manifest of ingested file hashes |
Nidhogg is non-destructive: it appends a nidhogg block to matched shards (atomically, via store.mutate_shard, so a concurrent conversation turn is never clobbered) and never rewrites existing fields. ingest/scan are irreversible-write tools and route through the capability gate. Idempotent via SHA256 manifest.
Facts (2)
Tool | Description |
| Search the SQLite-backed |
| Rebuild the facts index from shard sources |
External retrieval (1)
Tool | Description |
| Multi-agent external-knowledge deliberation: Haiku retrieval + parallel validate/challenge/synthesize, Sonnet arbiter (ACCEPT/PARTIAL/REJECT). On ACCEPT/PARTIAL writes a claim shard + debate-log shard linked by a |
Evolution (1)
Tool | Description |
| Run one self-evolution cycle: analyze → verify → commit → govern → plan |
⚠ Side effect:
nova_evolverunsgit addandgit commitlocally when tests pass, staging only allowlisted paths (EVOLVE_COMMIT_ROOTS, defaultmcp/ forgemaster/ tests/ docs/). On test failure it rolls the changes back withgit stash push(recoverable viagit stash list), not a destructivecheckout. Nothing is pushed to a remote. It carries a destructive capability, so it asks for your approval on every call regardless of skill verification. Usedry_run=truefor just the director prompt — a dry run is ungated and mutates nothing. Ifmcp/changed, it writes.sdd/runtime/restart_requested.
Calibrate (1)
Tool | Description |
| Analyse HUGINN consistency per confidence bucket and Forgemaster sprint pass rates by model; suggests threshold adjustments. Read-only — no state changes. |
HUGINN orchestration (1)
Tool | Description |
| Keyword + confidence pre-filter over the shard index. Returns a small candidate list ready to paste into a HUGINN agent prompt — no LLM call, so it costs nothing. |
Code index (1)
Tool | Description |
| Semantic search over |
MCP Resources
Read-only resources exposed alongside the tools. Each publishes a name, title, description and MIME type:
URI | Title | MIME type | Contents |
| NOVA Skill Definition |
|
|
| Shard Index |
| One metadata row per shard, rebuilt on read |
| Shard Knowledge Graph |
| Every directed inter-shard relation |
| Operation Log and Token Usage |
| Last 100 log entries + session token totals |
Two resource templates give the corpus addressable URIs, so a shard or a page can be linked and embedded in a prompt rather than reached only through a tool:
URI template | Title | MIME type | Contents |
| Shard |
| One shard as stored on disk — the read-only equivalent of |
| Wiki Page |
| One curated wiki page — the read-only equivalent of |
Both parameters support argument completion (completion/complete): shard ids
come from the SQLite index's primary key, wiki slugs from the union of the
schema and the pages on disk.
A resource that serves the same data as a tool is closed by that tool's
denial — denying nova_shard_get also closes nova://shard/{id}. nova://skill
and nova://usage mirror no tool and stay open.
MCP Prompts
Twenty prompts, listed by prompts/list:
Prompt | Arguments | Purpose |
|
| Load what NOVA knows about a project and summarise the current state |
|
| One shard plus everything the graph connects it to |
|
| Apply the handoff test, then write one only if it passes |
|
| Route a document to the shard graph or the wiki |
|
| Load context, then run the four-turn sprint |
|
| Find contradicted, low-confidence and stale shards |
| — | One per file in |
The skill prompts cover the fourteen core skills only. The 218 skills in
forgemaster/library/ are reachable through SKILL_LIBRARY.md; serving them as
prompts would be an unusable menu.
Module Architecture
nova_server.py is a thin MCP adapter. All business logic lives in dedicated modules:
Module | Responsibility |
| Single source for all env vars and defaults |
| Pydantic input models for core + wiki tools |
| Shared dataclasses (UsageSummary) |
| Process-scoped singleton container ( |
| Canonical |
| 16 shard CRUD/lifecycle MCP tool handlers — |
|
|
|
|
|
|
|
|
| The two error envelopes. |
| Server middleware that sets |
| Asks the operator before a destructive tool runs, through MCP elicitation. Exposes the |
| ContextVar holding the request being served, so the capability gate can reach the client session without threading a |
| Shard filesystem I/O, index, summary-index layer, path-traversal guards; |
| Knowledge graph load/save/query/relate/transitive BFS |
| Epistemic provenance records at |
| Confidence decay, auto-compaction, cosine similarity, merge candidates |
| Env-driven tool allow/deny |
| Event-driven hook registry (SESSION_START, POST_SPRINT, COUNT_THRESHOLD) |
| JSONL operation logging |
| Session CRUD and flush-to-disk |
| Sprint orchestration — three-tier adaptive model routing, dispatch, outcome + routing event logging |
| HUGINN threshold calibration + Forgemaster routing stats — analyses |
| HUGINN (Haiku fast retrieval) + MUNINN (Sonnet deep rerank) |
| Damped BFS over the knowledge graph — MUNINN third retrieval pass with cluster-boundary penalties |
| Hook recall + cache prewarm + cluster-aware top-k walk (collapses same-cluster results, collects siblings over 2×top_k window) |
| HMAC-SHA256 signing at ingestion, signature verification before MUNINN cosine reranking, adversarial event log |
| NÓTT daemon — scheduled decay, compact, merge, graph sync (dedicated |
| Local embeddings + heuristic compaction summaries (non-blocking |
| Capability membership check plus the approval policy: a destructive capability requires human approval whatever the skill claims. The seven destructive tools ask through MCP elicitation (see |
| SQLite HITL audit log — four-state lifecycle + biconditional corpus check |
| Parses |
|
|
| Self-evolution loop, adaptive governor, auto-commit |
| Document ingestion with provenance |
| Wiki layer model, pipeline, and MCP tools |
| Batch-build |
Stability: Production vs Experimental
Production-critical (stable, supported)
mcp/nova_server.pyand exported MCP toolsCore runtime modules:
mcp/store.py,mcp/graph.py,mcp/maintenance.py,mcp/forgemaster_runtime.py,mcp/permissions.py,mcp/session_store.py,mcp/hooks.py,mcp/tool_registry.pyRetrieval and indexing pipeline:
mcp/ravens.py,mcp/recall.py,mcp/spreading_activation.py,mcp/embedding_integrity.py,mcp/nova_embeddings_local.py,mcp/build_summary_index.pyWiki and ingestion modules:
mcp/wiki.py,mcp/wiki_ingest.py,mcp/wiki_tools.py,mcp/nidhogg.py
Experimental / internal tooling (may change without compatibility guarantees)
utilities/scripts (migration helpers, diagnostics, ad-hoc maintenance tools)utilities/test_nova.pymemory explorer CLIPlanning/reference docs under
docs/and donor/reference materials underDonors/forgemaster/library/andforgemaster/agents/skill/persona content
Key Environment Variables
For the complete environment-variable reference with impact explanations, see docs/CONFIG.md.
Variable | Default | Notes |
|
| Root directory for all data files (shards, sessions, summary index, usage log). Override to pin to a specific directory; all relative paths in |
|
| Path to shard JSON files (resolved under |
| — | Powers HUGINN + MUNINN + wiki + summary generation |
|
| Fast retrieval pass |
|
| Deep rerank pass |
|
| Score ≥ this skips MUNINN |
|
| Per-call LLM timeout (seconds) before local fallback |
| inherits | Override the orchestrator role's model — set to an Opus alias on high-stakes sprints |
| inherits | Override the planner role's model |
| inherits | Override the reviewer role's model |
| inherits | Override the implementer role's model |
|
|
|
| — | Endpoint root. Required for |
|
| Name of the env var that holds the key (not the key itself). Leave unset for local servers |
|
| Agent for the NÓTT adversarial contradiction pass; same semantics as the role variables |
|
| Request timeout for |
|
| Turns before auto-compaction |
|
| Recent turns retained after compaction |
|
| Confidence decay per 7-day period |
|
| Days per decay period |
|
| Window (days) for the decay-on-read pass; shards accessed more recently than this are exempt |
|
| Cosine similarity floor for merge suggestions |
|
| Below this → |
|
| Within N days → |
|
| Not accessed N days → |
|
| Shard count triggering NÓTT merge scan |
|
| Hours a shard remains quarantined after failing the adversarial pass |
|
| Retrieval score multiplier applied to quarantined shards |
|
| Minimum days between adversarial passes on the same shard |
|
| Fallback broker only — MCP tool calls ask through elicitation and ignore this. Covers forgemaster per-file writes and bare CLI. |
|
| Seconds before an unanswered terminal prompt auto-denies. Elicitation prompts are not bounded by this — the client owns that timeout |
| — | Comma-separated tool names to block |
| — | Comma-separated prefixes to block |
| — | Freeform project context string injected into sprint prompts |
|
| Path to summary index |
|
| Path to summary markdown |
|
| Wiki pages directory |
|
| Wiki schema file |
|
| Wiki embedding index |
|
| Wiki ingest routing model |
|
| Wiki synthesis model |
|
| Nidhogg drop zone |
|
| Ingested-hash manifest |
|
| Shard-match threshold for annotation |
| — | Override path for sprint JSONL event log |
|
| Empirical routing stats cache TTL (seconds); lower this to pick up new sprint outcomes faster in long-running servers |
|
| In-memory recall cache TTL in seconds |
|
| Minimum graph edges required to run spreading activation |
|
| USD cost ceiling for |
|
| Minimum confidence score before external retrieval is considered worth firing |
| — | Hex or UTF-8 secret for HMAC-SHA256 embedding signing; if unset, signing is skipped |
|
| Path for adversarial embedding event log |
Error Handling
Every payload carries a status, and a failed call sets isError on the wire, so
a client can tell a refusal from a success without parsing the body:
| Meaning |
| The tool refused for a known reason. Carries a machine-readable |
| Something unexpected broke. |
anything else | Success — |
An operator declining an approval prompt arrives as rejected /
gate_denied with retryable: true.
Every tool also publishes a real outputSchema derived from a Pydantic model in
mcp/outputs.py, and returns structuredContent matching it. A handler that can
refuse is annotated Success | RejectPayload, so the published schema describes
both shapes; the SDK nests structuredContent under a result key for those
unions. The text block is still emitted alongside, so nothing that parses the
body breaks.
Operational failure modes:
Scenario | Behavior |
| HUGINN and MUNINN silently fall back to local-only retrieval (token overlap + cosine over local all-MiniLM-L6-v2 embeddings). No error is raised; retrieval quality is reduced. |
HMAC signature mismatch | The embedding is rejected before MUNINN reranking. The event is written to |
MCP client disconnection | The server continues running. The stop hook ( |
API rate limit / timeout |
|
Shard fails adversarial pass | The shard is quarantined for |
Prior Art & Attribution
Original architecture documented before any public commit. These documents establish authorship of the core concepts:
Document | Date |
NOVA Framework (concept doc) | April 2025 |
Executive Summary | April 2025 |
NOVA Shard Memory Architecture | April 2025 |
Unified Consciousness Model | April 2025 |
First public commit | March 2026 |
Original named concepts in this repository: shard (memory unit), HUGINN/MUNINN (retrieval pipeline), NÓTT (maintenance daemon), confidence decay, shard consolidation, Forgemaster (orchestration layer).
Notes
Never manually edit files in
shards/orwiki/— always use the MCP toolsAuto-generated files, never commit:
shard_index.json,shard_graph.json,summary_index.json,summary_index.md,wiki_index.json,nidhogg_manifest.json,nova_usage.jsonl,evolve_cycles.jsonl,evolve.json,embedding_integrity.jsonl.envcontains API keys — never commit ittest_nova.pyis a memory-explorer CLI, not a pytest suite — run it withpython utilities/test_nova.pySee
CLAUDE.mdfor operational instructions and sprint workflow; seedocs/ROADMAP.mdfor shipped-vs-planned splitSee
KNOWN_ISSUES.mdfor open and resolved bugs with workarounds
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Persistent memory, knowledge graph, task management and more for AI agents via MCP.
Hosted memory for AI agents over MCP. One memory shared by all your agents.
Hosted agent memory: store, search, and recall facts across sessions from any MCP client.
Persistent, inspectable memory for AI agents with lineage, correction, and a hosted MCP endpoint.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceProvides persistent, searchable memory for MCP-compatible agents, enabling recall by meaning, automatic decay, trust scoring, and cross-agent handoffs.5MIT
- AlicenseNot gradedqualityBmaintenanceProvides AI agents with persistent, human-like memory infrastructure via MCP, enabling them to store, search, summarize, and forget episodic, semantic, procedural, and working memories across sessions.954 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to store, search, and resolve shared memories with full provenance, conflict detection, and an audit trail across MCP-compatible clients.MIT
- AlicenseNot gradedqualityNot gradedmaintenanceEnables LLM clients to manage hierarchical working, dialogue, and episodic memories with decay-aware consolidation, hybrid lexical/vector retrieval, knowledge-graph expansion, and semantic caching over MCP.MIT