Skip to main content
Glama

Strata

可移植的代理记忆。仅追加记录、可验证的来源、MCP 工具和自托管。

Strata 为团队提供一份持久的记忆,任何代理都可以读取和更新,而不会混淆项目、泄露机密或重写历史。它专为跨人员、会话、机器和运行时的工作而构建。

它为何存在

当工作跨机器、人员、工具或旧会话移动时,本地代理记忆就会失效。Strata 保存那些应当比单次代理运行更持久的实况:

  • 实验结果和决策;

  • 数据集说明、源校验和和提取状态;

  • 行之有效的流程和应避免的错误;

  • 供后续加入的代理使用的项目交接信息。

Strata 不存储机密、原始记录、思维链、API 密钥或提供方设置。

Related MCP server: mnemochain

包含内容

组件

用途

strata Python 包

CLI、仅追加存储、REST 网关、MCP 桥接、策略检查、导出和恢复。

skills/strata

可共享的代理技能,用于读取、写入和安全的服务控制,无需硬编码主机值。

policy 和 schema

代理在写入前必须遵循的规则和 JSON 契约。

scripts 和 deploy

用于运行服务的本地、Docker 和 systemd 辅助工具。

快速开始

git clone https://github.com/rx6ru/strata.git
cd strata
python -m venv .venv
. .venv/bin/activate
python -m pip install -e .
strata --help

启动本地网关:

strata serve --root /tmp/strata-demo --host 127.0.0.1 --port 8787

从另一个 shell 中检查:

curl -fsS http://127.0.0.1:8787/healthz
curl -fsS -H 'X-Strata-Client: 1' http://127.0.0.1:8787/v1/status

如果在安装包之前从源代码检出运行:

PYTHONPATH=. python -m strata --help
PYTHONPATH=. python -m strata root-hash --root /tmp/strata-demo

阅读 docs/getting-started.md 中的完整设置指南。

代理如何使用它

  1. 将 skills/strata/ 复制到代理运行时技能目录中。

  2. 只向代理提供非机密运行时值,例如网关 URL、命名空间、当前任务、SSH 别名和可选的生命周期包装器路径。

  3. 代理获取策略、准备限定范围的上下文、读取规范记录,并且只写入经过验证的持久知识。

  4. 更正会追加取代记录。重组会追加重定位、拆分、合并或失效事件。普通代理绝不会就地编辑历史。

该技能不会硬编码主机名、IP 地址、EC2 实例 ID、用户名、API 密钥、项目命名空间、策略哈希、根或记录 ID。参见 docs/agent-skill.md。

写入如何保持干净

Strata 在提交前检查每次写入:

  • 提交前确认当前策略哈希;

  • 模式验证记录;

  • 幂等键防止重复重试;

  • 仅追加 SQLite 触发器阻止就地历史编辑;

  • 内容哈希和根清单使导出可校验;

  • 机密和原始记录扫描器拒绝不安全的负载;

  • 派生回忆被标记为导航,而非事实。

自托管

对于 Docker 栈:

./scripts/configure.sh
./scripts/control.sh start

对于系统服务,请使用安装指南和 deploy/ 中的受限生命周期包装器。远程代理应仅调用该包装器来执行 status、start、stop 或 restart。

默认部署没有应用级用户。请将其保留在回环、私有网络、SSH、VPN、防火墙或您自己的代理/认证层上。在团队托管之前,请阅读 docs/security-model.md 和 SECURITY.md。

REST 和 MCP

REST 网关在 /v1 下公开 health、policy、status、search、recall、record、append、supersede、relocate、split、merge 和 invalidate 端点。

MCP 桥接公开匹配的工具,例如 memory_policy、memory_prepare_context、memory_search、memory_get、memory_capture_verified 和 memory_status。

评估

PYTHONPATH=. python -m strata eval --input tests/fixtures/strata_eval/cases.json

该夹具检查命名空间隔离、来源、提升和拒绝行为、派生回忆标签以及禁止值泄露。

许可证

MIT。参见 LICENSE。第三方说明见 THIRD_PARTY_NOTICES.md。

Maintenance

ActivityStale
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    A
    maintenance
    Provides agents with durable, provenance-aware memory through tools for remembering, recalling, answering, and maintaining information, while structurally resisting injection and confabulation.
    343 PyPI
    10
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables AI agents to store and recall an append-only, hash-chained memory with citation-backed semantic search, fact verification, contradiction detection, and replay/audit capabilities through local MCP tools.
    1
    AGPL 3.0
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables AI agents to maintain persistent memory across sessions with verifiable source receipts, supporting explicit remember, recall, inspect, correct, and forget operations.
    15 npm
    35
    Apache 2.0
  • A
    license
    B
    quality
    A
    maintenance
    EMET is an MCP memory server: persistent shared memory for AI agents, bot teams and chats. Six memory layers, verified writes (every write is read back before it is reported saved), and a separate word-for-word transcript tier. Runs locally over stdio or remotely over HTTP with OAuth, on MongoDB. One owner; optional Guest (read-only) and Member (read and write) access, both off by default.
    10
    38
    112 npm
    1
    MIT