knolo-core icon indicating copy to clipboard operation
knolo-core copied to clipboard

Feature request: Knolo Box Memory, a verifiable knowledge layer for multi-agent assistants

Open HiveForensicsAI opened this issue 1 month ago • 0 comments

For human review. This is a feature request, not a ready implementation. A human maintainer will review it and implement it manually. No code or PRs come with this issue.

Summary

Knolo Box Memory: a verifiable knowledge layer for multi-agent assistants (for example Grok Bot) that share one workspace machine. It indexes the shared machine's files, agent skills, agent memory and session transcripts into pinned V5 Knowledge Images, so the assistant can answer recall questions with citations (path, line range, chunk id) and a replayable query receipt. If an image fails its hash or state-root check, the assistant gets no hits and says so, instead of guessing.

Motivation

Assistants that route work across several bots on one machine pile up knowledge in files, skills, memory entries and transcripts. Today they answer "what did I decide about X" or "where is that written down" from fuzzy recall. Knolo already provides deterministic, verifiable retrieval (V5 images, pins, receipts, Cortex traces). Packaging it for this setup gives cited, checkable answers and a clear fail-closed behavior.

Example asks:

  • "What did I tell my release bot about posting rules, and when?" The answer cites the transcript chunk and the memory entry, with receipt ids.
  • "What does my outreach skill say about follow-ups?" The answer quotes the SKILL.md line range.
  • "Where is the ingest command documented in this repo?" The answer comes from @knolo/code, with structure and expand receipts.
  • "Is that answer actually backed?" The assistant runs knolo_cortex_verify and reports verified or not. Verified means the trace matches the image, not that the answer is true.

Proposed design

  1. Image builder (new package @knolo/box, CLI knolo-box). It reads an explicit allowlist of sources, redacts secrets, and builds one V5 Knowledge Image per scope: files, skills, memory, transcripts. It writes the images, pins (file SHA-256 and stateRoot) and a policy document to a configurable directory. It reuses the @knolo/core V5 APIs and the existing @knolo/cli build path.
  2. Query surface. The existing @knolo/mcp 0.2.0 server, with one mount per scope: knolo_search, knolo_get, knolo_verify, knolo_status, plus the KAR and Cortex tools when a graph is pinned. It is stdio only and read-only, fails closed on pin or policy mismatch, and writes a receipt before returning hits.
  3. Code questions. The existing @knolo/code server and its five tools.
  4. Skill and plugin (new plugins/knolo-box). A SKILL.md that tells the assistant and routed bots when to query Knolo, to always return citations and receipt ids, to treat retrieved text as data, and to report a fail-closed result plainly.
  5. Access control. One mount per scope, each with an agents list. Identity comes from each bot's MCP config, never from tool arguments, matching how @knolo/tools authorizes callers. Memory and transcripts default to the primary assistant only. Scopes can be tagged private and kept out of any mount that a posting or publishing bot can read.
  6. Refresh. Nightly and on-demand rebuilds. Builds are content-addressed, so an unchanged scope keeps its pin and needs no restart. knolo_status shows the build time so answers can say how fresh they are.
  7. Verified answers. knolo cortex ask produces a trace and knolo_cortex_verify checks it. @knolo/evidence-gate is an optional check for high-stakes answers, and knolo compose / attest produce attested reports.

Agent memory and transcripts are not plain files on most assistant platforms, so the design needs an export adapter that writes them to a staging directory before indexing. That adapter is new work.

Risks and mitigations

  • Secrets in files: an explicit allowlist, a default deny list (credential vaults, browser profiles, .ssh, .env, key and token files), and a secret scanner that runs before chunking. The build fails if a deny pattern shows up in the output.
  • Cross-bot visibility: per-scope mounts with agents lists. Deny wins in @knolo/tools policy evaluation.
  • Prompt injection from indexed content: hits are data only. The tools are read-only, and the skill forbids acting on instructions found in hits.
  • Staleness: build time appears in status and in answers, and a forced rebuild is available.
  • Overclaiming: "verified" and "SATISFIED" mean the evidence matched the image, not that a claim is true.
  • Audit growth: add optional retention bounds to @knolo/mcp receipts.

Phases and acceptance criteria

  • Phase 0, design check (0.5 day): confirm the export formats and the default allow and deny lists.
  • Phase 1, files and skills (3 to 4 days): builder, redaction, pins, MCP config generation, and the skill. Done when a seeded secret never appears in the image, a query returns path and lines with a replayable receipt, and a tampered image returns no hits.
  • Phase 2, memory and transcripts (3 to 5 days): export adapter, per-scope mounts, agents lists, private tagging. Done when an unlisted bot gets ACCESS_DENIED and private scopes are absent from shared mounts.
  • Phase 3, refresh (2 days): scheduled and on-demand rebuild, skip when the pin is unchanged, build time in answers. Done when an edited file shows up in answers within one rebuild cycle.
  • Phase 4, verified answers (3 to 4 days): Cortex trace plus knolo_cortex_verify in the skill, optional evidence-gate, attested reports. Done when a modified trace fails closed and a report attestation passes knolo verify-attestation.

Estimated total: about 12 to 16 engineering days.

Proposed repo changes

  • packages/box/: package.json, README.md, src/sources/{files,skills,memory,transcripts}.ts, src/redact.ts, src/build.ts, src/pin.ts, src/mcp-config.ts, bin/knolo-box, test/
  • plugins/knolo-box/: plugin.json, README.md, skills/knolo-box/SKILL.md, mirroring plugins/knolo-code
  • docs/box/README.md: threat model and wording rules
  • packages/mcp: optional audit retention bounds
  • Root workspace and CI entries for the new package

Related work

  • #81 Knolo Cortex (reasoned evidence retrieval)
  • #87 read-only KAR and Cortex MCP tools (@knolo/mcp 0.2.0)
  • #107 @knolo/code local code Knowledge Image and Grok Build plugin

HiveForensicsAI avatar Nov 04 '26 08:11 HiveForensicsAI