Skip to main content
Glama

🧠 Synapse Layer

RAG 检索,Synapse 记忆。

面向 AI 代理的持久记忆基础设施 — 静态 AES-256-GCM 加密、语义搜索、MCP 原生。

Synapse Layer 是面向 AI 代理和助理的开源持久记忆基础设施。记忆使用 AES-256-GCM 静态加密,通过 pgvector HNSW 建立索引以实现语义召回,并通过 MCP JSON-RPC 暴露,用于与 Claude、GPT、Gemini 以及任何兼容 MCP 的客户端进行原生集成。采用 Apache 2.0 许可证。

PyPI Python Downloads MCP Compatible Official MCP Registry CI License: Apache-2.0 Smithery

网站 · 文档 · PyPI · Forge


⚡ 30 秒快速入门

pip install synapse-layer
from synapse_layer import Synapse

s = Synapse(token="sk_connect_YOUR_TOKEN")

s.store("user likes coffee")
print(s.recall("what does user like?"))

在 forge.synapselayer.org 获取你的令牌 → 仪表盘 → 连接


Related MCP server: Sylex Memory

什么是 Synapse Layer?

面向 AI 代理的持久记忆层 — 串联无状态 LLM 与真正上下文连续性的缺失一环。

你的 AI 代理会在会话之间遗忘一切。Synapse Layer 解决了这个问题。

功能

描述

🔐 静态加密

AES-256-GCM,每次操作随机 IV,HMAC-SHA-256 完整性校验

🧩 一键连接

Claude Desktop、Cursor、LangChain、CrewAI、n8n

🌐 跨代理记忆

在 ChatGPT 中保存,在 Claude 中召回

⚡ MCP 原生

任何兼容 MCP 的代理

🔒 Header 优先认证

令牌绝不出现在 URL 或日志中

🎯 信任系数

确定性召回 — 记忆按置信度排序,而非仅按新近程度


为什么选择 Synapse Layer?

你的 AI 代理会在会话之间遗忘一切。Synapse Layer 用一行代码解决这个问题。

没有 Synapse Layer

使用 Synapse Layer

代理每个会话都会忘记上下文

跨所有会话的持久记忆

记忆锁定在单个模型中

跨代理:在 ChatGPT 中保存,在 Claude 中召回

无审计轨迹

每条记忆都有信任系数评分

集成复杂

pip install synapse-layer + 3 行代码

明文存储在服务器上

静态 AES-256-GCM 加密


使用场景

  • 长期助手记忆 — 跨会话持久化用户偏好、事实和先前决策。

  • 跨代理连续性 — 在一个代理中保存上下文,在另一个代理中召回。

  • 面向 MCP 客户端的安全记忆 — 将 Claude Desktop、Cursor 和其他兼容 MCP 的工具连接到受治理的记忆层。

  • 团队运营记忆 — 为生产级代理维护结构化上下文、信任评分和可搜索的召回。


安装

pip install synapse-layer

快速开始

Python 脚本

from synapse_layer import Synapse

client = Synapse(token="sk_connect_YOUR_TOKEN")

# Store
client.store("User prefers dark mode and concise answers")

# Recall
results = client.recall("user preferences")
for r in results:
    print(r["content"], r["trust_quotient"])

使用上下文管理器

from synapse_layer import Synapse

with Synapse(token="sk_connect_YOUR_TOKEN") as client:
    client.store("User prefers dark mode and concise answers")
    results = client.recall("user preferences")
    for r in results:
        print(r["content"])

在 forge.synapselayer.org 获取你的令牌 → 仪表盘 → 连接


13 个 MCP 工具一览

Synapse Layer 目前提供 13 个用于持久记忆工作流的 MCP 工具:

  • recall

  • save_to_synapse

  • process_text

  • search

  • health_check

  • initialize_context

  • save_memory

  • store_memory

  • recall_memory

  • list_memories

  • memory_feedback

  • neural_handover

  • slo_report

这些工具涵盖记忆捕获、语义召回、结构化存储、反馈循环、代理交接和运营可观测性。


部署模式

Python 脚本模式

当你希望从应用程序中直接通过 Python 访问 Forge 记忆时,请使用 SDK。

适用于:

  • 原型和脚本

  • Python 原生工作流

  • 快速集成到现有应用

云 / Forge API

当你需要具备托管访问令牌的持久化、跨会话和跨代理记忆时,请使用 Forge。

适用于:

  • 生产环境助手

  • 多代理系统

  • 基于 MCP 的集成

  • 跨工具和会话的共享记忆


MCP 集成(Claude Desktop / Cursor)

添加到 claude_desktop_config.json:

{
  "mcpServers": {
    "synapse-layer": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://forge.synapselayer.org/api/mcp",
        "--header",
        "x-connect-token: sk_connect_YOUR_TOKEN"
      ]
    }
  }
}

配置文件位置:

  • macOS:~/Library/Application Support/Claude/claude_desktop_config.json

  • Windows:%APPDATA%\Claude\claude_desktop_config.json

  • Linux:~/.config/Claude/claude_desktop_config.json


API — Header 优先认证

# Health check
curl -H "x-connect-token: sk_connect_YOUR_TOKEN" \
  https://forge.synapselayer.org/api/connect/health

# Save memory
curl -X POST \
  -H "x-connect-token: sk_connect_YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"content": "User is a Python developer"}' \
  https://forge.synapselayer.org/api/v1/capture

安全性

特性

实现

加密

静态 AES-256-GCM,每次操作随机 IV

完整性

对内容使用 HMAC-SHA-256

认证

Header 优先(x-connect-token)— 令牌绝不出现在 URL 或日志中

隐私

内容净化 + 租户隔离的加密存储

隔离

1 个用户 = 1 个租户 = 1 个私密记忆空间

有关漏洞报告,请参阅 SECURITY.md。


相关项目

项目

描述

synapse-sdk-python

Python SDK — LangChain、CrewAI 和 A2A 协议适配器

synapse-layer-skill

适用于 Claude Desktop、Cursor、Windsurf 的 MCP 技能配置

synapse-layer-langgraph

带有加密状态持久化的 LangGraph 检查点保存器


治理

  • 所有公开声明均遵循 公共声明矩阵。

  • 展现效益的架构细节是公开的;实现这些效益的机制是私有的。

  • 声明即现实。如果某项功能未实现,它就不会出现在 README 中。


许可证

Apache-2.0 © Synapse Layer

Available Tools

13 tools
health_checkA
Read-only
Inspect

Check service availability, engine version, and storage health. Public method.

Inputs: no named parameters. Returns: status, version, dbLatencyMs

initialize_contextA
Read-only
Inspect

Initialize a persistent memory context for a conversation or agent session. Returns REDACTED metadata by default (detail="summary"). Use detail="full" with a reason (10–200 chars) to retrieve plaintext content under MEMORY_EXPORT_GOVERNANCE_V1.

Inputs: detail, reason. Returns: scope, agent_id, memories

list_memoriesA
Read-only
Inspect

List memory metadata with pagination and governance limits.

Inputs: limit, scope, agent_id. Returns: count, total, memories

memory_feedbackAInspect

Submit feedback to adjust trust scoring for stored memories.

Inputs: signal (required), memoryId, memory_id, sessionId, +1 more. Returns: trust, applied, memoryId

neural_handoverAInspect

Transfer contextual state between agents with continuity controls.

Inputs: token (required), reason (required), consuming_agent. Returns: status, handoverId

process_textAInspect

Extract candidate memories from free-form text with governance filters and sanitization.

Inputs: text (required), source, project, agent_id. Returns: extracted, storedCount

recallA
Read-only
Inspect

Retrieve relevant persisted memory using semantic, temporal, priority, or hybrid routing. Governance: requires reason (10–200 chars). Rate limit: 20/min.

Inputs: query (required), reason (required), mode, limit, +2 more. Returns: count, scope, memories

recall_memoryA
Read-only
Inspect

Recall persisted memory by query. Alias of recall.

Inputs: query (required), reason (required), mode, limit, +2 more. Returns: count, scope, memories

save_memoryC
Idempotent
Inspect

Save a memory entry to the persistent store. Alias of save_to_synapse.

Inputs: content (required), tags, agent_id, force_intent, +1 more. Returns: id, scope, stored

save_to_synapseA
Idempotent
Inspect

Persist memory with encryption at rest, sanitization, and deduplication controls.

Inputs: content (required), tags, type, project, +4 more. Returns: id, scope, stored

slo_reportB
Read-only
Inspect

Return uptime and SLO metrics for the MCP service.

Inputs: admin_token (required), window_hours. Returns: p50, p95, uptime, window, +1 more

store_memoryB
Idempotent
Inspect

Store structured memory with metadata and trust scoring.

Inputs: content (required), tags, agent_id, force_intent, +1 more. Returns: id, scope, stored

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 13 tools

    Disambiguation3/5

    There is overlap between `save_memory` and `save_to_synapse` (aliases), and `recall_memory` and `recall` (aliases), which creates ambiguity. `save_to_synapse` and `store_memory` also have very similar purposes, potentially causing misselection.

    Naming Consistency3/5

    Most tools use a verb_noun pattern (e.g., list_memories, save_memory, recall_memory), but `neural_handover` breaks this pattern by using an adjective_noun. `slo_report` is a contraction that doesn't follow the strict verb_noun structure, introducing inconsistency.

    Tool Count4/5

    With 13 tools, the count is within the well-scoped range (3-15). The presence of aliases inflates the number slightly, but otherwise, each non-alias tool serves a distinct purpose, making the count appropriate.

    Completeness4/5

    The tool surface covers core CRUD operations (save, recall, list, search) and lifecycle operations (initialize, feedback, handover). Minor gaps exist, such as missing explicit update or delete tools for memories, but the domain coverage is generally strong.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents to store and semantically retrieve durable memories across sessions via MCP or REST, with tools for remembering, recalling, asking, updating, and forgetting memories.
      17 npm
      MIT
    • F
      license
      A
      quality
      B
      maintenance
      Shared fleet memory for AI agents — what one agent learns, the whole fleet knows. Nightly self-correction: stale facts rewritten in place, duplicates merged. Recall pushed into every prompt in supported coding agents. Self-hosted.
      11
      3
      -