Skip to main content
Glama

[!TIP] Впервые здесь? Быстрый старт позволит вам пройти путь от npm install до первой постоянной сессии агента примерно за 60 секунд.


Что такое Waypath?

Waypath — это локально-ориентированный движок знаний для агентов кодинга и индивидуальных разработчиков. Он хранит ваши проектные решения, связи между сущностями и артефакты сессий в одном файле SQLite, а затем предоставляет графовый, ориентированный на истину контекст любому хосту агентов — Claude Code, Codex или MCP-клиенту — через легкий CLI.

В отличие от облачных сервисов памяти, Waypath:

  • работает полностью на вашем компьютере,

  • использует каноническую схему истины вместо векторного блоба,

  • считает каждое воспоминание первоклассным объектом с явными этапами продвижения и проверки,

  • поставляется в виде npm-пакета размером 77 КБ без необходимости в фоновых сервисах.

Related MCP server: wadachi

Почему 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)

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.

Available Tools

11 tools
waypath_graph_queryA

Read-only traversal of the Waypath knowledge graph from a specific entity id. Returns neighbors, edges, and related facts using one of four traversal patterns. Use this when you already have a resolved entity id (from waypath_recall results or from prior context); for free-text lookup use waypath_recall instead. Does not write to the database.

Inputs: entityId (required), pattern.

waypath_healthA

Read-only end-to-end health check: SQLite connectivity and migration version, FTS5 index sync status, source adapter probe results, and truth-kernel row counts. Safe to call any time and from any context. Use as a single diagnostic entrypoint before opening a support issue; for adapter-specific detail call waypath_source_status. Takes no parameters.

Inputs: no named parameters.

waypath_pageA

Synthesize a human-readable knowledge page about a subject by aggregating and summarizing matching truth-kernel and archive entries. Returns a structured page object plus a markdown summary. The synthesis is deterministic for a given store state and does not call out to any LLM or network service. Read-only with respect to promoted memory; may cache synthesis artifacts in the local store. Use for briefings or handoffs when a recall result would be too fragmented; for targeted lookup use waypath_recall instead.

Inputs: subject (required).

waypath_promoteA

WRITE: submit a candidate for promotion into the Waypath truth-kernel. Creates a new candidate row in the local SQLite review queue — it does NOT promote immediately. A human (or agent with explicit authority) must call waypath_review to accept or reject the candidate before it becomes queryable by waypath_recall. Use when you want to persist a decision, preference, or fact; use waypath_review_queue to list pending candidates and waypath_review to act on them.

Inputs: subject (required).

waypath_recallA

Read-only hybrid search over the local Waypath SQLite memory store. Runs FTS5 lexical search fused with graph-aware Reciprocal Rank Fusion (RRF) across truth-kernel and archive tables and returns ranked entries with source, score, and snippet. Use before answering any question that may depend on prior decisions, preferences, or project facts; call this instead of waypath_graph_query when you have a free-text query rather than a known entity id. Does not write to the database and does not hit the network.

Inputs: query (required).

waypath_refresh_pageA

WRITE: rebuild an existing knowledge page against the current store state and update its cached summary/markdown. Use on pages flagged "stale" by waypath_review_queue, or after a large batch of promotions that should be reflected in a briefing page. Idempotent — calling twice with no intervening writes produces the same output. Does not call any external service.

Inputs: pageId (required).

waypath_resolve_contradictionA

WRITE: resolve a detected contradiction between two or more preferences sharing the same key by keeping exactly one preference and marking the others as superseded. Intended for user-scoped or project-scoped preference collisions surfaced by waypath_review_queue. Use waypath_review_queue first to see active contradictions and their preference ids. This call persists to the local store and is the destructive side of contradiction handling — the non-kept preferences are no longer returned by waypath_recall.

Inputs: key (required), keepPreferenceId (required), scopeRef, notes.

waypath_reviewA

WRITE: decide the fate of a pending promotion candidate. Setting status to "accepted" promotes the candidate into the truth-kernel so it becomes visible to waypath_recall; "rejected" discards it; "superseded" marks it as replaced by a newer candidate; the other states are non-terminal holding states. This call is the governance gate between waypath_promote and durable memory — do not accept without evidence. Call waypath_review_queue first to list candidates and their ids.

Inputs: candidateId (required), status (required), notes.

waypath_review_queueA

Read-only snapshot of everything awaiting human attention: pending promotion candidates, stale knowledge pages past their refresh threshold, and detected preference contradictions. Use at the start of a review or maintenance session to see outstanding work; then call waypath_review, waypath_refresh_page, or waypath_resolve_contradiction as appropriate. Takes no parameters.

Inputs: no named parameters.

waypath_session_startA

Read-only context pack builder for the beginning of a coding or planning session. Assembles a prioritized brief from recent decisions, active preferences, seed entities, and related graph context. Does not write to the database. Call once per session before substantive work; for mid-session lookups use waypath_recall or waypath_graph_query instead. All parameters are optional — pass what is known; omitted fields fall back to project defaults.

Inputs: project, objective, activeTask, seedEntities.

waypath_source_statusA

Read-only probe of the local source adapters Waypath can ingest from (filesystem snapshots, git repos, JCP live reader, etc.). Returns each adapter's availability, last-scan timestamp, and any configuration errors. Use to diagnose "why is my recall empty" or before running a large ingest. Does not write and does not hit the network. Takes no parameters.

Inputs: no named parameters.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A4.5/5.0

    Scored across 11 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose. For example, waypath_recall is for free-text search while waypath_graph_query is for entity-based traversal; waypath_promote, waypath_review, and waypath_review_queue form a distinct workflow. Descriptions clearly differentiate overlapping tools.

    Naming Consistency4/5

    All tools start with 'waypath_' and use snake_case. Most follow a verb_noun pattern (e.g., refresh_page, resolve_contradiction), but a few like session_start and source_status are noun_verb or noun_noun. Overall consistent enough for predictable navigation.

    Tool Count5/5

    With 11 tools, the set is well-scoped for a knowledge management system. It covers query, search, page generation, promotion workflow, health checks, and session context without being bloated or too sparse.

    Completeness4/5

    Major workflows are covered: submit candidates (waypath_promote), review (waypath_review, waypath_review_queue), retrieve (waypath_recall, waypath_graph_query), and page synthesis (waypath_page, waypath_refresh_page). Minor gaps include no explicit delete tool, but rejection and superseding serve similar purposes.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      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
      C
      maintenance
      Persistent memory for AI agents built on the LLM Wiki pattern: a plain-Markdown brain (also a valid Obsidian vault) with SQLite metadata, local semantic search via fastembed (no API keys), one-call session context with project auto-detection, and a decision log with rationale. Works with Claude Code, Claude Desktop, Cursor, and any MCP client.
      31
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Gives every AI agent on a machine a shared, local-first long-term memory: 16 tools to save, search, edit and organize structured notes in one SQLite file, with attribution per client. Runs over stdio or localhost HTTP, so Claude Code, omp and any other MCP client recall the same facts, decisions and entities.
      16
      2
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables Claude Code, Codex and other MCP agents to share one bounded, persistent memory across sessions, so a session starts from what earlier sessions learned instead of re-reading the repository. Storage and retrieval run locally on SQLite full-text search with per-client tokens and scopes, and optional local model enrichment, without any paid model in the path.
      1
      MIT