Skip to content

Releases: ZenSystemAI/Zengram

2.5.1

31 Mar 18:28

Choose a tag to compare

Full Changelog: v2.4.0...2.5.1

v2.4.0 — brain_reflect, brain_update, temporal validity

29 Mar 02:15

Choose a tag to compare

New MCP Tools

  • brain_reflect — On-demand LLM synthesis. Given a topic, searches relevant memories via multi-path retrieval and uses the LLM to identify patterns, timeline evolution, contradictions, and knowledge gaps.
  • brain_update — Partial memory amendment without full supersede. Update content, importance, knowledge_category, or metadata on existing memories. Content changes re-embed, re-extract entities, and re-index.

New Features

  • Temporal validity — Facts and statuses now support valid_from and valid_to timestamps. Query "what was true at time X?" via the new at_time parameter on brain_search. Auto-sets valid_to when memories are superseded.
  • knowledge_category filter on brain_search

Bug Fixes

  • P1: Consolidation paginationrunConsolidation() and cleanupOldEvents() now paginate through ALL Qdrant points. Previously silently missed memories beyond the first 200.
  • P1: Briefing pagination — Session briefings now paginate through all matching events.
  • P2: FTS5 query sanitization — SQLite keyword search strips reserved words (AND, OR, NOT, NEAR) and special characters.
  • P2: Access count race — Search access_count increment batch-fetches current values before writing.

Docs

  • README comparison table updated with current market leaders (Mem0, Letta, Zep/Graphiti, Hindsight)

Full Changelog: v2.3.1...v2.4.0

v2.3.0 — Multi-Path Retrieval with RRF Fusion

26 Mar 22:57

Choose a tag to compare

Multi-Path Retrieval with Reciprocal Rank Fusion

Search now runs three retrieval paths in parallel and merges results using Reciprocal Rank Fusion (RRF) — dramatically improving recall for exact names, technical terms, and entity-connected memories.

New Retrieval Paths

Path How it works What it catches
Vector (existing) Embedding similarity via Qdrant Semantic meaning, paraphrases
BM25 Keyword (new) Postgres tsvector / SQLite FTS5 Exact names, technical terms, error codes
Entity Graph (new) BFS spreading activation through entity relationships Memories connected by entities, not just text

Results are merged with RRF: score(d) = Σ(1/(k+rank)) — items found by multiple paths get boosted to the top.

How it looks in practice

{
  "retrieval": {
    "multi_path": true,
    "paths": { "vector": 6, "keyword": 5, "graph": 3 }
  },
  "results": [
    { "id": "...", "retrieval_sources": ["vector", "keyword"] },
    { "id": "...", "retrieval_sources": ["keyword"] },
    { "id": "...", "retrieval_sources": ["graph"] }
  ]
}

Why this matters

Before v2.3, searching for a client name like "JetLoans" relied entirely on embedding similarity — which sometimes ranked unrelated semantically-similar content higher. Now BM25 catches the exact match, and entity graph surfaces every memory linked to the JetLoans entity through co-occurrence or typed relationships (uses, works_on, contact_of).

The irony: entity relationships were already stored in the database since v1.2, but were only used for the D3.js visualization. Now they're a first-class retrieval signal.

New files

  • api/src/services/rrf.js — RRF fusion algorithm (zero dependencies, ~60 lines)
  • api/src/services/keyword-search.js — BM25 keyword search service (Postgres + SQLite)
  • api/src/services/graph-search.js — BFS entity graph retrieval
  • api/scripts/backfill-keyword-index.js — Index existing memories for keyword search
  • api/tests/rrf.test.js — 13 unit tests

Configuration

Variable Default Description
MULTI_PATH_SEARCH true Feature flag — set false to revert to vector-only
RRF_K 60 RRF smoothing constant (50-100 range)
GRAPH_SEARCH_MAX_DEPTH 2 Max BFS hops through entity graph
GRAPH_SEARCH_DECAY 0.8 Activation decay per hop
GRAPH_SEARCH_CAUSAL_BOOST 2.0 Boost for typed relationships vs co_occurrence

Migration

After updating, run the backfill script to index existing memories for keyword search:

# Docker
docker exec shared-brain-api node scripts/backfill-keyword-index.js

# Direct
node api/scripts/backfill-keyword-index.js

The Postgres memory_search table and tsvector trigger are created automatically on startup. New memories are indexed on write. No downtime required.

Stats

  • 873 lines added across 15 files
  • 114 tests passing (13 new RRF tests)
  • Zero new npm dependencies
  • Backward compatible — existing API contracts unchanged

Inspired by vectorize-io/hindsight's parallel search architecture.


Full Changelog: v2.0.0...v2.3.0

v2.0.0 — Client Knowledge Base, Entity Graph, Gemini Embeddings

20 Mar 05:13

Choose a tag to compare

The biggest update yet — your agents now truly understand your clients.

Per-Client Knowledge Base

Every client gets a fingerprint (aliases, people, domains, keywords). Any agent can call brain_client("JL") and instantly get brand voice, strategy decisions, meeting notes, technical details — everything tagged to that client. Fuzzy name resolution means "JL", "Jet Loans", and "jetloans.ca" all resolve to the same client. Auto-tagging means memories get assigned to the right client even when agents forget to specify.

Gemini Embedding 2 — Free, Better, Task-Aware

Switched from OpenAI to Google's Gemini Embedding 2 at 3072 dimensions. Zero cost on the free tier. Task-type differentiation means the model knows whether you're storing or searching — producing better vectors for each use case. Matryoshka support lets you choose your quality/cost tradeoff (3072/1536/768 dims).

Entity Relationship Graph

Entities don't just exist anymore — they're connected. Co-occurrence tracking builds a knowledge graph automatically. The interactive D3.js visualization is a dark-themed, force-directed showpiece with node highlighting, search, zoom, and PNG export. Use it to impress clients or understand your own agent ecosystem.

Import/Export — Never Lose Data Again

Full backup and migration support. brain_export dumps all memories as JSON (no vectors — they're regenerated). brain_import restores with dedup. Switch embedding providers without fear.

Webhook Notifications

Real-time dispatch when memories change. Connect n8n, Slack, or any HTTP endpoint. Fire-and-forget — never blocks the store operation.

Knowledge Categories

Every memory now has a business domain tag: brand, strategy, meeting, content, technical, relationship, or general. Agents can filter by category, and the consolidation engine auto-reclassifies uncategorized memories.

Smarter Consolidation

The 6-hour LLM pass now reclassifies knowledge categories and infers entity relationship types (contact_of, same_owner, uses, works_on, competitor_of). The brain gets smarter while you sleep.


New MCP Tools (4)

Tool What it does
brain_client One-call client briefing with fuzzy name resolution
brain_export Export all memories as JSON for backup
brain_import Import memories with dedup and re-embedding
brain_graph Query entity relationships in the knowledge graph

Total: 12 MCP tools — the most complete memory toolkit for AI agents.

Stats

  • 34 files changed, 4,600+ lines added
  • 91 tests passing
  • Zero breaking changes — all existing memories, tools, and flows continue working

v1.4.0 — Compact Responses, Security Hardening, Async Consolidation

18 Mar 02:24

Choose a tag to compare

Highlights

70-80% Token Reduction on Briefings

brain_briefing and brain_search now default to compact format — content truncated to 200 chars, low-importance events filtered, results sorted by importance. Agents get the context they need without filling the context window.

Three tiers: summary (counts + headlines), compact (default, truncated), full (original behavior).

Security Hardening

  • Full XML entity escaping in consolidation prompts (&, <, >, ", ')
  • JSON code-fence stripping for LLM output
  • Structure validation on LLM responses

Async Consolidation

POST /consolidate now returns a job ID immediately (HTTP 202). Poll via GET /consolidate/job/:id. Use ?sync=true for blocking behavior.

Memory Deletion

New DELETE /memory/:id endpoint + brain_delete MCP tool. Soft-deletes with agent-scoped permissions and audit trail.

All Changes

  • Compact/summary format for briefing + search (default: compact)
  • O(1) supersedes — targeted Qdrant queries replace full-scan
  • Entity name normalization — prevents case-variant duplicates
  • Graceful shutdown — SIGTERM/SIGINT with 10s drain timeout
  • Briefing paginationlimit param (1-500)
  • Request correlation IDs — X-Request-ID header
  • Configurable MCP timeoutsBRAIN_MCP_TIMEOUT, BRAIN_MCP_CONSOLIDATION_TIMEOUT
  • Alias cache cold-start fix — 67 built-in tech aliases pre-seeded
  • SQLite error logging — silent catches replaced with proper WARN logging
  • 41 new tests (validation + entity extraction), 81 total

Install / Update

npm install @zensystemai/multi-agent-memory-mcp@1.4.0

No breaking changes. All new features are additive or backward-compatible.

v1.3.0

16 Mar 22:39

Choose a tag to compare

Full Changelog: v1.2...v1.3.0

v1.2

15 Mar 21:10

Choose a tag to compare

Full Changelog: v1.1...v1.2

v1.1

15 Mar 19:42

Choose a tag to compare

Full Changelog: v1.0.0...v1.1

v1.0.0

11 Mar 04:54

Choose a tag to compare