Skip to main content
Glama

Waymark

CI License: MIT

Shared memory and handoff hub for AI agents. A waymark is a trail sign left for whoever walks the path next — Waymark does the same for agent sessions: Claude Code finishes work, and the next session of Codex, Claude Desktop, or any other MCP client starts already knowing what was done, what was decided, and what to do next.

No retelling. No re-reading the repo. One token-budgeted call.

Why

Every new agent session starts cold: it re-reads files, re-asks questions, and burns tokens rediscovering context that another agent had five minutes ago. Waymark replaces that with a local MCP server over a single SQLite database shared by all your agents:

  • workspace_resume — one call returns a compact packet (project metadata, open tasks, ranked memory, recent sessions, active handoff) within a token budget you set (default 1,200 tokens).

  • Automatic handoffs — session_log(outcome: "partial", next_steps: [...]) writes a handoff memory that tops the next agent's resume. Logging completed retires it. No discipline required.

  • Task queue with atomic claims — task_claim guarantees only one agent takes a task, with capability and dependency checks.

  • Memory lifecycle — supersede instead of accumulate; feedback ratings demote stale records in ranking.

  • Provider-neutral — agents register with provider/model/client identity; nothing in the core is tied to one vendor.

Related MCP server: JustClone Coordination MCP Server

Measured savings

Continuation scenario (fresh session must orient in a project and name the next step), estimated cohort, reproducible via node scripts/benchmark-orientation.cjs:

median tokens

Cold orientation (reading README, docs, sources, git log)

13,540

Waymark resume (packet + core tool schemas + follow-up reads)

3,392

Net saving

74.9%

The orientation context itself shrinks from ~13.1k tokens of raw files to a 1.1k-token ranked packet (−91.5%) — and unlike cold reading, the packet contains what files can't: what the previous agent actually did and decided. The exact-token A/B protocol with live clients is in docs/BENCHMARK_RUN.md.

Quick start

Requires Node.js 22+.

npm install -g waymark-hub
waymark-hub init          # registers the hub in Claude Code / Codex, offers the hook
waymark-hub doctor        # verifies the whole installation

init asks before touching anything; init --yes enables everything applicable. The database lives in ~/.waymark/hub.db (survives package upgrades); override with WAYMARK_HOME or DB_PATH.

From source instead:

git clone https://github.com/SerjMihashin/waymark && cd waymark
npm install && npm test   # build + 20 integration tests

Connect Claude Code (stdio)

waymark-hub init --claude, or manually:

claude mcp add --scope user waymark node "<install>/dist/server.js"

Optional but recommended — waymark-hub init --hook installs a SessionStart hook that injects the resume packet into every new session (zero tool calls spent on orientation).

Connect Codex

waymark-hub init --codex, or manually:

# ~/.codex/config.toml
[mcp_servers.waymark]
command = "node"
args = ["<install>/dist/server.js"]

Connect Claude Desktop / web (HTTP)

waymark-hub serve --http   # listens on 127.0.0.1:3747

Add a custom connector: http://localhost:3747/mcp. Also available via docker compose up -d / podman compose up -d.

The protocol

Session start — one call, not three:

workspace_resume(project_id, task?, agent_id?, max_tokens=1200)

Session end:

session_log(started_at, summary, outcome, next_steps?)   # partial/blocked → auto-handoff
memory_write(...)                                        # only durable decisions/facts

Cross-agent handoff happens automatically: agent A logs a partial session with next_steps; agent B's workspace_resume surfaces that handoff first, with the session trail and files touched. When someone logs completed, the handoff retires itself.

Tool profiles

Greedy MCP clients inject every tool schema into context each turn. Waymark defaults to a core profile of 10 tools (~1.8k tokens instead of ~4.7k for all 28). Set HUB_TOOLS=full where you need the admin surface (projects, agents, experiments, telemetry).

Tools (28)

Group

Tools

Context

workspace_resume, context_get

Memory

memory_write/read/list/search/set_status/feedback

Tasks

task_create/list/update/claim/release/add_dependency

Projects

project_list/get/upsert/set_status

Agents

agent_register/get/list/set_status

Sessions & telemetry

session_log, usage_report, experiment_create/list/update/summary

Deep dives: docs/CONTEXT.md, docs/MEMORY_LIFECYCLE.md, docs/TASK_COORDINATION.md, docs/BENCHMARKING.md.

Dashboard

npm run dashboard → read-only web panel on http://localhost:4747: projects, tasks, memory (FTS search), sessions, agents, benchmark results. Opens the DB in read-only mode — it physically cannot mutate hub state.

Architecture

src/server.ts            entry point: stdio / HTTP (--http), tool profiles
src/db/client.ts         SQLite singleton (WAL) + idempotent migrations 001..005
src/tools/               projects · memory · tasks · sessions · agents · context · telemetry
src/context/builder.ts   deterministic ranking + token budget (no LLM calls)
src/cli/benchmark.ts     A/B experiment CLI
dashboard/               read-only Express panel

Storage: SQLite + FTS5. The core never calls an LLM or any external service.

Principles

  • Context on demand — summaries + ids by default; bodies only when asked.

  • Budget first — every aggregated response fits a token budget.

  • Evidence over retelling — link files/commits/tasks instead of copying text.

  • Replace, don't accumulate — supersede outdated memory, no duplicates.

  • Provider-agnostic — any MCP client is a first-class citizen.

License

MIT

Available Tools

10 tools
context_getC
Read-only

Build task-specific project context using deterministic ranking within a token budget.

Inputs: task (required), project_id (required), agent_id, client_id, +3 more.

memory_readA
Read-only

Read a single memory node by id or by project+name.

Inputs: id, name, project_id.

memory_writeC

Create or replace a named memory node (project-scoped, or global if no project_id).

Inputs: body (required), name (required), description (required), tags, +14 more.

session_logA

Record a session summary at the end of significant agent work. On outcome "partial"/"blocked" (or when next_steps are given) the hub automatically writes a handoff memory so the next agent resumes without retelling; outcome "completed" retires that auto-handoff.

Inputs: summary (required), started_at (required), model, client, +9 more.

task_claimB

Atomically claim a pending task after validating assignment, capabilities, and dependencies.

Inputs: id (required), agent_id (required).

task_createC

Create a handoff task for another agent or client.

Inputs: title (required), description (required), priority, created_by, +7 more.

task_listC
Read-only

List tasks by status, project, assignee, or blocker.

Inputs: limit, status, blocked, created_by, +5 more.

task_updateB

Update task status, progress, blocker, or notes.

Inputs: id (required), status, blocker, progress, +2 more.

workspace_resumeC
Read-only

Restore compact project state for a new agent session in one token-budgeted call.

Inputs: project_id (required), task, agent_id, client_id, +1 more.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 10 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: context building, memory operations, session logging, task management, and workspace resumption. No overlapping functionality.

    Naming Consistency5/5

    All tools follow a consistent verb_noun snake_case pattern (e.g., `memory_read`, `task_create`), making naming predictable and intuitive.

    Tool Count5/5

    10 tools is well-scoped for the server's domain of agent orchestration and memory management, covering core operations without bloat.

    Completeness4/5

    Covers CRUD for memory (read, search, write) and tasks (create, list, update, claim) plus session logging and context. Minor gap: no explicit task deletion or memory deletion, but these are not critical for the intended workflows.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      B
      maintenance
      Provides a shared context layer for AI agent teams to improve token efficiency through context deduplication and incremental state sharing. It enables multiple agents to coordinate tasks, share real-time discoveries, and manage dependencies while significantly reducing redundant data transmission.
      15
      0
      8
      MIT
    • F
      license
      Not graded
      quality
      Not graded
      maintenance
      A production-grade coordination hub that enables AI agents and human teams to work as a single organism by sharing tasks, context, decisions, and persistent memory across projects. It features two-tier agentic memory with per-agent hot caches, inter-agent messaging, and multi-agent authorship tracking for seamless collaboration.
      2
      -
    • A
      license
      A
      quality
      B
      maintenance
      A vendor-agnostic cognitive persistence layer for AI agents. Eliminate the "repetition tax" by transporting your context, preferences, and history across sessions. Features an auto-adaptation engine that syncs global instructions to ensure operational cohesion and optimize token usage across any LLM or multi-agent workflow.
      38
      139 PyPI
      6
      Apache 2.0