Skip to main content

A context intelligence layer for LLM workflows

Project description

Waystone

Persistent cross-session memory for LLM agents. A knowledge graph that stores decisions, constraints, and context across coding sessions — so your agent starts informed, not blank.

Install

pip install waystone

Requires Python 3.11+. An LLM API key is needed for extraction (Gemini Flash recommended — fast and cheap).

Quick start

Option 1: MCP server (recommended)

Add to your editor's MCP config:

{
  "mcpServers": {
    "waystone": {
      "command": "waystone",
      "args": ["mcp-serve"],
      "env": { "WAYSTONE_PROJECT": "my-project" }
    }
  }
}

Restart your editor. waystone_query, waystone_extract, and waystone_stats appear as tools. Your agent pulls context when it needs it.

Option 2: Claude Code hooks (zero manual calls)

Add to ~/.claude/settings.json:

{
  "hooks": {
    "UserPromptSubmit": [{ "hooks": [{ "type": "command", "command": "waystone hook query my-project" }] }],
    "Stop": [{ "hooks": [{ "type": "command", "command": "waystone hook extract my-project" }] }]
  }
}

Context is injected automatically before every prompt. Facts are extracted automatically when Claude finishes.

Supported clients

Claude Code · Cursor · Windsurf · Continue.dev · Cline · Zed · OpenClaw · Hermes

Full per-client setup: unbidden.ai/docs/mcp-server/

Hermes Agent (native memory provider)

Beyond MCP, Waystone ships a first-class Hermes Agent memory provider (hermes_plugin/). It plugs the knowledge graph into Hermes as a Tier-3 memory backend:

  • prefetch() injects relevant graph context before each LLM call (in-process — the embedding model loads once and stays warm, so per-turn retrieval stays sub-second).
  • waystone_query / waystone_recall tools let the agent search the graph on demand.
  • on_session_end extraction grows the graph in the background. Fully local — no data leaves the machine.

Install:

cp -r hermes_plugin/ /path/to/hermes-agent/plugins/memory/waystone/
pip install waystone
hermes memory setup        # pick "waystone", set the project

Key CLI commands

waystone init <project>              # create a project
waystone extract <project> <file>    # extract facts from a transcript
waystone query <project> "<query>"   # retrieve relevant context
waystone onboard <project>           # import existing session history
waystone show <project>              # view project stats
waystone story <project>             # replay the project's session-summary timeline
waystone catchup-summarize <project> # back-fill the story from saved transcripts
waystone doctor                      # health check (config, LLM, MCP, sqlite-vec)

How it works

At session endwaystone extract reads the conversation transcript and pulls structured facts: decisions, constraints, implementations, lessons learned, open questions. These are stored as nodes in a local SQLite knowledge graph (~/.waystone/). Superseded facts are retired automatically — if a decision changes, the graph reflects the current state.

At session startwaystone_query (or a hook) runs BFS traversal from the most relevant entry points and surfaces the top 10–25 facts. Only what's relevant to the current context, not everything ever stored.

Session summaries (the project's story) — alongside atomic facts, Waystone keeps a rolling, high-altitude narrative of each work session (goal · arc · current state · next) that point-facts miss. A passive background worker updates it every few turns; each summary supersedes the prior one, but the full timeline is kept. Every new prompt is led with a "Where we are" block so a fresh session opens already oriented, and waystone story <project> replays the whole history chapter by chapter. Use waystone catchup-summarize <project> once to back-fill the story from a project's existing transcripts. The rolling call is bounded (~3k tokens in / ≤512 out regardless of session length), so it stays cheap.

Benchmarks

Tested on 23 questions across 3 domains (API design, auth systems, data pipelines):

Recall
Baseline 82%
With retrieval improvements 89%

Token usage vs. naive MEMORY.md on a mature project: typically 60–80% fewer context tokens per session (exact savings depend on project age and query specificity).

Full results: BENCHMARK_RESULTS.md

Hosted API

The default store is local SQLite — no cloud dependency, no infra to manage. For cross-machine sync and team access, a hosted API is available:

  • Pro ($20/mo) — unlimited projects, hosted API, 1 user
  • Team ($80/mo) — unlimited projects, hosted API, up to 10 users

unbidden.ai/pricing/

Docs

License

MIT — see LICENSE

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

waystone-0.4.34.tar.gz (318.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

waystone-0.4.34-py3-none-any.whl (276.6 kB view details)

Uploaded Python 3

File details

Details for the file waystone-0.4.34.tar.gz.

File metadata

  • Download URL: waystone-0.4.34.tar.gz
  • Upload date:
  • Size: 318.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for waystone-0.4.34.tar.gz
Algorithm Hash digest
SHA256 8f342becb424bef3f9cf4ffcc024b1c1a30d3960badac4b00e4fdcc99c673558
MD5 b35d143ce58d8bc5efdd937f32638528
BLAKE2b-256 e6a9d50926143d52514ec8784a341b886b007d12bffb0e1673f1ac2bfd57d974

See more details on using hashes here.

Provenance

The following attestation bundles were made for waystone-0.4.34.tar.gz:

Publisher: publish.yml on Unbidden-AI/waystone

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file waystone-0.4.34-py3-none-any.whl.

File metadata

  • Download URL: waystone-0.4.34-py3-none-any.whl
  • Upload date:
  • Size: 276.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for waystone-0.4.34-py3-none-any.whl
Algorithm Hash digest
SHA256 f31c30e6b0aaa1853c58e12f0a16bf87ea3cba8185f537c20de17a4f6b2781e2
MD5 8e57ef24aabaa0154726f3de0c6b898a
BLAKE2b-256 76f4d360c12ab699ea6a8db7e144e1b8c17937f1a989456e6a54ca3599397b80

See more details on using hashes here.

Provenance

The following attestation bundles were made for waystone-0.4.34-py3-none-any.whl:

Publisher: publish.yml on Unbidden-AI/waystone

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page