Skip to main content
Glama
roedyrustam

agent-memory-sync

by roedyrustam

Agent Bridge Suite ๐Ÿš€

TypeScript MCP Protocol Vitest License: MIT

Monorepo suite bridging Antigravity and Claude Code through persistent cross-IDE episodic memory (Native SQLite FTS5 + BM25 Ranking Engine) and multi-model adversarial peer review (Speculative Consensus).


๐Ÿ“ฆ Suite Packages

Package

Description

Protocol

Key Features

agent-memory-sync

High-scale local cross-IDE episodic memory bridge that prevents AI agent amnesia across sessions and editors.

MCP v1.x + Native SQLite / JSON

โ€ข Native SQLite Storage (WAL Mode, node:sqlite)โ€ข FTS5 Full-Text Search with C-Level BM25 Rankingโ€ข Seamless Auto-Migration from memories.jsonโ€ข Project Scope Isolation (global + private workspace)โ€ข Recall Telemetry & Hotspot Trackingโ€ข JSON & Markdown Export / Importโ€ข Aggregate health metrics and statistics

speculative-twin

Multi-model adversarial peer consensus engine for stress-testing code drafts, eliminating hallucinations, and hardening systems.

MCP v1.x + Multi-Provider Adapter

โ€ข Multi-Provider Support: Anthropic Claude, Google Gemini, OpenAI-compatible APIsโ€ข High-Precision Zero-Token Heuristics (100% offline)โ€ข P0 / P1 / P2 Severity Audit (secrets, silent catch, SQLi, loose types, race conditions)โ€ข Speculative Paradigm Drafting (Immutable, Streaming, Zero-Alloc)โ€ข Consensus synthesis engine


Related MCP server: Memory MCP

๐Ÿš€ Quick Start & Installation

Prerequisites

  • Node.js >= 20.0.0

  • pnpm >= 9.0.0

Clone & Build

git clone https://github.com/roedyrustam/agent-bridge-suite.git
cd agent-bridge-suite
pnpm install
pnpm build

๐Ÿ”Œ Setup with AI Agents

1. Antigravity IDE / CLI

Link the plugins directly into your Antigravity environment:

agy plugin link ./plugins/agent-memory-sync
agy plugin link ./plugins/speculative-twin

2. Claude Code CLI

Register both MCP servers in your Claude Code configuration:

claude mcp add agent-memory-sync node ./plugins/agent-memory-sync/dist/index.js
claude mcp add speculative-twin node ./plugins/speculative-twin/dist/index.js

3. Standalone Terminal CLI (agent-bridge)

Interact with memory or run code audits directly from your terminal without opening an MCP client:

# Query memories using BM25 ranking
pnpm agent-bridge memory recall "prisma connection pool starvation"

# Inspect memory stats and tag distribution
pnpm agent-bridge memory stats

# Run adversarial code critique (returns exit code 1 on P0 issues)
pnpm agent-bridge twin critique ./src/auth.ts --context="Strict authentication middleware"

# Generate speculative alternative implementations across 3 paradigms
pnpm agent-bridge twin speculate "Bounded async worker pool with backpressure"

# Check active twin provider and capability mode
pnpm agent-bridge twin status

โš™๏ธ Model Provider Configuration (Speculative Twin)

By default, speculative-twin operates 100% offline using high-precision static heuristics with zero token costs. To enable live frontier cross-model reviews, set any of the following environment variables:

# Option A: Anthropic Claude (default: claude-3-5-sonnet-20241022)
export ANTHROPIC_API_KEY="sk-ant-..."
export ANTHROPIC_MODEL="claude-3-7-sonnet-latest" # optional

# Option B: Google Gemini (default: gemini-2.5-flash)
export GEMINI_API_KEY="..."
export GEMINI_MODEL="gemini-2.5-flash" # optional

# Option C: OpenAI or Custom Local LLM (default: gpt-4o)
export OPENAI_API_KEY="sk-..."
export OPENAI_BASE_URL="http://localhost:11434/v1" # e.g. Ollama or vLLM
export OPENAI_MODEL="deepseek-r1" # optional

๐Ÿงฐ MCP Tools Reference

agent-memory-sync

  • memory_recall: Query historical insights, debugging traps, and user preferences using BM25 semantic scoring.

  • memory_record: Save a durable lesson, bug fix, or architecture rule (gotchas, architecture, user_preferences, performance).

  • memory_list: List all stored insights with category and project scope filters.

  • memory_stats: View telemetry metrics (total items, category breakdown, top tags, most recalled items).

  • memory_export: Export knowledge base to Markdown or JSON format.

  • memory_import: Import backup memories with skip or overwrite merge modes.

  • memory_delete: Delete obsolete memories by ID.

speculative-twin

  • twin_critique: Stress-test code against security flaws, hardcoded credentials, silent catch blocks, SQL injection, loose any casts, and race conditions.

  • twin_speculate: Generate candidate implementations across 3 algorithmic archetypes (Defensive Functional, High-Throughput Streaming, Minimal Zero-Alloc).

  • twin_synthesize: Merge two competing code drafts into a unified, hardened solution.

  • twin_status: Inspect active provider and capabilities.


๐Ÿงช Testing & Validation

The test suite is powered by Vitest and covers both plugins:

# Run all unit tests across monorepo packages
pnpm test

# Run build
pnpm build
โœ“ test/store.test.ts (7 tests)
โœ“ test/sqlite-store.test.ts (8 tests)
โœ“ test/engine.test.ts (10 tests)
Test Files  3 passed (3)
Tests       25 passed (25)

๐Ÿค Contributing

Contributions, issues, and feature requests are welcome! Please feel free to check the issues page.

  1. Fork the Project

  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)

  3. Commit your Changes (git commit -m 'feat: Add some AmazingFeature')

  4. Push to the Branch (git push origin feature/AmazingFeature)

  5. Open a Pull Request


๐Ÿ“„ License

Distributed under the MIT License. See LICENSE for more information.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Provides AI coding assistants with persistent project memory to retain architectural decisions, code patterns, and domain knowledge across sessions. It stores data locally in a SQLite database, allowing agents to remember, recall, and manage project-specific context using full-text search.
    0
    Apache 2.0
  • A
    license
    A
    quality
    B
    maintenance
    Provides persistent cross-session memory and full-text search for AI coding assistants, storing project context, decisions, and preferences while enabling searchable access to conversation history via local SQLite.
    8
    1
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    Provides long-term memory for LLMs via local SQLite storage with hybrid search (BM25, vectors, recency decay), enabling AI coding agents to persist and recall memories across sessions without cloud or API keys.
    53
    MIT