Skip to main content
Glama

[!TIP] 新手?快速入门指南可让你在约 60 秒内从 npm install 到完成首次持久化代理会话。


什么是 Waypath?

Waypath 是一个面向编码代理和独立开发者的本地优先知识引擎。它将你的项目决策、实体关系和会话工件存储在一个 SQLite 文件中,然后通过一个轻量级 CLI 为任何代理宿主(Claude Code、Codex 或 MCP 客户端)提供图感知、真理优先的上下文

与云内存服务不同,Waypath:

  • 完全在你的机器上运行,

  • 拥有规范的真理模式而非向量块,

  • 将每一条记忆视为一等公民,并具备显式的提升 + 审查门控

  • 提供一个 77 kB 的 npm 包,无需任何运行时服务

Related MCP server: ClaudeX

为什么选择 Waypath?

问题

Waypath 的解决方案

代理在会话间遗忘

持久化 SQLite 真理内核

RAG 返回不相关的块

FTS5 + RRF 混合排名与图扩展

内存服务产生静默幻觉

显式的 page → promote → review 治理

云锁定、数据泄露

一切都是你拥有的本地 .db 文件

每个宿主一个工具 (Claude, Codex, Cursor)

单一外观、轻量宿主垫片、原生 MCP 服务器

安装

[!IMPORTANT] 需要 Node.js ≥ 22。Node 22.5+ 启用了原生的 node:sqlite 驱动;较早的 22.x 版本会自动回退到 better-sqlite3

npm install -g waypath

验证:

waypath --help
waypath source-status --json

快速入门

1. 引导会话 (Codex 示例):

waypath codex --json \
  --project my-project \
  --objective "ship v2 of the retrieval pipeline" \
  --task  "refactor hybrid ranker" \
  --store-path ~/.waypath/my-project.db

2. 召回相关上下文:

waypath recall --query "hybrid ranker decisions" --json

3. 捕获提炼出的见解并通过审查进行提升:

waypath page    --subject "hybrid ranker v2 design"
waypath promote --subject "hybrid ranker v2 design"
waypath review-queue --json

4. 作为 MCP 服务器运行 (适用于 Claude Code、Cursor、任何 MCP 客户端):

waypath mcp-server --store-path ~/.waypath/my-project.db

查看实际操作

$ waypath codex --json --project auth-service \
    --objective "migrate to passkeys" --task "design flow"
{
  "host": "codex",
  "session_id": "auth-service:passkey-flow",
  "context_pack": {
    "truth_highlights": {
      "decisions": [
        "Use WebAuthn level 2 with user verification required",
        "Argon2id for password fallback hashing"
      ],
      "entities": ["UserSession", "AuthGateway", "RefreshToken"],
      "contradictions": []
    },
    "recent_pages": [
      "Session storage design — promoted 2026-04-12"
    ]
  }
}

命令界面

区域

命令

会话引导

codex, claude-code, mcp-server

召回

recall, explain, graph-query, history

页面 (提炼的知识)

page, promote, refresh-page, inspect-page

审查治理

review, review-queue, inspect-candidate, resolve-contradiction

导入 / 扫描

import-seed, import-local, scan

健康状况

source-status, health, db-stats, rebuild-fts

维护

backup, benchmark, export

完整帮助:waypath --help

架构

Waypath 由轻量级外观后的四个独立内核构建而成:

flowchart TD
    subgraph HOST[" Host Shims "]
        direction LR
        CX["codex"]
        CC["claude-code"]
        MC["mcp-server"]
    end

    Facade["<b>Facade</b><br/><code>createFacade()</code>"]

    TK["<b>Truth Kernel</b><br/>decisions · entities · preferences<br/>temporal validity · supersede"]
    AK["<b>Archive Kernel</b><br/>evidence · content-hash dedup<br/>FTS5 index"]
    ON["<b>Ontology</b><br/>graph traversal<br/>pattern expansion"]
    PR["<b>Promotion Engine</b><br/>candidate review<br/>contradiction detection"]

    HOST --> Facade
    Facade --> TK
    Facade --> AK
    Facade --> ON
    Facade --> PR

    classDef kernel fill:#21262d,color:#c9d1d9,stroke:#30363d,stroke-width:1px
    classDef facade fill:#1f6feb,color:#ffffff,stroke:#58a6ff,stroke-width:2px
    classDef host fill:#161b22,color:#c9d1d9,stroke:#30363d,stroke-width:1px
    class TK,AK,ON,PR kernel
    class Facade facade
    class CX,CC,MC host
  • 真理内核 — 规范决策、实体、偏好、时间有效性(模式 v3,支持取代 + 历史记录)。

  • 归档内核 — 带有内容哈希去重和 FTS5 全文索引的原始证据存储。

  • 本体层 — 用于实体/决策上下文扩展的图遍历(模式:project_context, person_context, system_reasoning, contradiction_lookup)。

  • 提升引擎 — 候选审查、矛盾检测、取代流程。

单个 createFacade() 公开了 14 个动词。宿主垫片将其适配到每个代理的引导协议中。

配置

Waypath 默认零配置。要调整检索权重、适配器开关或审查阈值,请在工作目录中放入一个 config.toml(或将 WAYPATH_CONFIG_PATH 指向它):

[source_adapters]
jarvis-memory-db = true
jarvis-brain-db  = false

[retrieval.source_system_weights]
truth-kernel = 1.2

[retrieval.source_kind_weights]
decision = 0.9
memory   = 0.5

[review_queue]
limit = 12

通过环境变量覆盖任何内容:

export WAYPATH_RECALL_WEIGHT_SOURCE_SYSTEM_TRUTH_KERNEL=1.8
export WAYPATH_REVIEW_QUEUE_LIMIT=8

优先级: 环境变量覆盖 > config.toml > 内置默认值

MCP 服务器

Waypath 将原生 MCP (Model Context Protocol) 服务器作为第二个二进制文件发布:

waypath-mcp-server

或者通过主 CLI:

waypath mcp-server --store-path ~/.waypath/project.db

通过 MCP 公开的工具:recall, page, promote, review, graph-query, source-status

要求

  • Node.js ≥ 22.0 (必需)

  • 推荐 Node.js ≥ 22.5 — 启用原生 node:sqlite

  • better-sqlite3 是一个可选的回退方案,在 22.0–22.4 或无法使用原生 sqlite 的情况下自动使用

状态

  • 版本: 0.1.0 — 首次公开发布

  • 测试: 131 个通过(单元 + 集成 + 基准测试)

  • 稳定界面: CLI (26 个命令), MCP 服务器, 外观 API

  • 延期: 托管部署、多用户同步、自适应排名反馈

与替代方案对比

Waypath

云内存 (mem0, zep)

仅向量 RAG

本地优先

取决于实现

规范真理模式

图感知召回

部分

显式审查门控

内置 MCP 服务器

单文件安装

需要服务

不一

贡献

Waypath 欢迎宿主垫片源适配器和错误修复。好的首个议题已相应标记

阅读 CONTRIBUTING.md 以了解开发设置、代码风格和 PR 流程。

在提交 PR 之前:

npm run build
npm test

许可证

MIT © TheStack.ai — 参见 LICENSE

Install Server
A
license - permissive license
A
quality
C
maintenance

Maintenance

Maintainers
Response time
0dRelease cycle
2Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    A
    quality
    A
    maintenance
    Persistent local memory for Claude Code that indexes every session's JSONL file verbatim into SQLite + ChromaDB. Exposes 17 MCP tools for semantic recall, deterministic file replay, and fuzzy "do you remember when..." queries across your entire session history — no API calls, nothing leaves the machine.
    17
    12
    MIT
  • A
    license
    A
    quality
    B
    maintenance
    Persistent memory + FTS5 full-text search for Claude Code conversation history. Indexes ~/.claude/projects/ JSONL into SQLite, exposes 10 MCP tools (store/recall/search memories, browse sessions, get summaries) plus prompts. Includes a web UI for visual exploration
    10
    89
    92
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Local-first knowledge base that ingests activity from Slack, GitHub, agent sessions, and CLI, stores provenance in SQLite, and exposes the brain via MCP, CLI, Slack, and dashboard for recall and skill proposals.
    MIT
  • A
    license
    B
    quality
    A
    maintenance
    Local-first, auditable memory for Codex, Claude Code, and MCP clients. It stores scoped user/project memory in SQLite or Postgres, serves read-only recall and inspection tools by default, and supports opt-in governed writeback with review and forget controls.
    8
    324
    16
    MIT

View all related MCP servers

Related MCP Connectors

  • Private-by-default, local-first memory/context/task orchestrator for MCP apps and agents.

  • Hosted MCP memory: save sessions/decisions once, search from Claude, Cursor, ChatGPT. EU-hosted FTS.

  • The project brain for AI coding agents — memory, decisions, sprints, knowledge base via MCP.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/TheStack-ai/waypath'

If you have feedback or need assistance with the MCP directory API, please join our Discord server