OpenTrust is the proposed official memory layer standard for OpenClaw.
It is a local-first, operator-grade memory and traceability system designed to make OpenClaw data:
- reliably captured
- durably stored
- safely retrieved
- richly linked
- explainable
- measurable
- operationally useful
OpenTrust is not just a search feature. It is the memory substrate that should let OpenClaw answer questions like:
- what happened?
- what evidence supports that answer?
- what tool, workflow, or event caused the outcome?
- what should be remembered long-term?
- what changed over time?
- what is stale, missing, uncertain, or risky?
- what insights can be derived from the full event stream?
OpenTrust should be treated as:
- the OpenClaw memory layer reference implementation
- the architecture blueprint for storage + retrieval + traceability
- the standard model for durable evidence, insights, lineage, and metrics
- the foundation for future OpenClaw memory APIs, operator UX, and agent-facing retrieval
It should not be framed as a detached product thesis competing with OpenClaw. Its primary purpose is to strengthen OpenClaw itself.
The OpenClaw memory layer should provide:
- append-safe ingestion of events and evidence
- durable local system of record
- schema evolution and migration support
- reproducible IDs and stable references
- auditable persistence
- lexical retrieval for exact matches
- semantic retrieval for fuzzy recall
- structured SQL and relational joins for investigations
- lineage-aware lookup across sessions, workflows, artifacts, and capabilities
- ranking that prefers evidence over unsupported summaries
- event lineage
- tool-call / tool-result pairing
- workflow step attribution≠
- artifact provenance
- ingestion freshness and cursor state
- clear distinction between observed evidence and inferred conclusions
- memory-aware search
- derived summaries
- anomaly surfacing
- change detection
- operator health views
- metrics and insight generation over time
- interoperable with OpenClaw session traces
- interoperable with cron/workflow runs
- compatible with future agent memory APIs
- suitable for direct use by OpenClaw UI surfaces and agent tools
- extensible toward official memory contracts and retrieval services
- planned for first-class packaging as an OpenClaw plugin
OpenTrust already includes:
- polished dashboard-first UI shell
- local SQLite runtime
- explicit bootstrap / ingest / query architecture
- OpenClaw session ingestion
- cron/workflow ingestion
- ingestion state tracking
- FTS-backed investigation search
- artifact extraction and registry population
- trace detail pages
- workflow detail pages
- artifact explorer
- saved investigations
- semantic chunk indexing
- sqlite-vec activation
- secret-blocking pre-commit protection
The correct long-term direction is:
- keep OpenTrust’s memory model, evidence framing, lineage, and operator UX
- align all roadmap language around OpenClaw memory infrastructure
- treat any future backend shifts as implementation choices, not product redefinitions
That means:
- SQLite-first local durability remains valuable
- other runtimes or providers may be added later
- but the governing idea is the OpenClaw memory layer standard
OpenTrust is currently in a pre-prerequisite holding pattern.
The upstream priority order for memory-layer work is:
- persistence
- reliable run completion
Desktop application packaging (Tauri) can proceed in parallel — see docs/DESKTOP-APPLICATION-PLAN.md.
Until persistence and run completion are dependable, memory-layer expansion should focus on:
- docs alignment
- scope guardrails
- low-risk cleanup
- preserving a truthful baseline
Memory-layer expansion should not pretend to outrank runtime reliability work.
- OpenClaw-first
- local-first durability
- evidence-backed answers
- progressive disclosure
- traceability over vibes
- operator-grade reliability
- memory as infrastructure, not garnish
The fastest way to set up OpenTrust is the interactive setup script. It walks through every step, explains what each one does, detects prior work, and lets you skip anything:
./scripts/setup.sh- Node.js 18+
- pnpm — install with
npm install -g pnpmor see pnpm.io - git — required for Husky pre-commit hooks
If you prefer to run each step yourself:
pnpm install # install deps + set up Husky hooks
cp .env.example .env # create local env (optional overrides)
pnpm run db:init # create/migrate SQLite database
pnpm run ingest:openclaw # import OpenClaw session transcripts
pnpm run ingest:cron # import cron/workflow run history
pnpm run index:semantic # build semantic chunk + vector index
pnpm dev # start the dev server on localhost:3000Optional overrides are documented in .env.example.
| Variable | Purpose |
|---|---|
OPENTRUST_AUTH_MODE |
Auth mode for the app surface: token, password, or none. |
OPENTRUST_AUTH_TOKEN |
Shared credential used when OPENTRUST_AUTH_MODE=token. |
OPENTRUST_AUTH_PASSWORD |
Shared credential used when OPENTRUST_AUTH_MODE=password. |
OPENTRUST_ALLOW_LOCALHOST_BYPASS |
Allow bypass on localhost / 127.0.0.1 / ::1. Set false for strict auth everywhere. |
OPENTRUST_APP_URL |
Canonical app URL used for metadata / Open Graph resolution. |
OPENTRUST_SQLITE_VEC_PATH |
Override path to the sqlite-vec extension. Leave unset unless auto-detection fails. |
Recommended defaults:
- Local-only development:
OPENTRUST_AUTH_MODE=tokenwithOPENTRUST_ALLOW_LOCALHOST_BYPASS=true - Strict protected mode:
OPENTRUST_AUTH_MODE=passwordwithOPENTRUST_ALLOW_LOCALHOST_BYPASS=false - Unprotected mode:
OPENTRUST_AUTH_MODE=noneonly for isolated localhost experimentation
OpenTrust authenticates at the app/server boundary before protected evidence is rendered. The browser does not authenticate directly to SQLite.
Auth endpoints also enforce same-origin checks for POST requests, and the auth cookie is issued as an httpOnly, SameSite=Strict, time-bounded session.
| Command | Description |
|---|---|
pnpm dev |
Start the Next.js dev server |
pnpm run db:init |
Create/migrate the SQLite database |
pnpm run ingest:openclaw |
Import recent OpenClaw sessions |
pnpm run ingest:cron |
Import cron workflow run history |
pnpm run index:semantic |
Rebuild semantic chunks + vector index |
pnpm run typecheck |
Run tsc --noEmit |
pnpm run secrets:check |
Scan the repo for leaked secrets |
This repo includes a pre-commit secret scan:
- Husky pre-commit hook
- Secretlint ruleset
OpenTrust is intended for localhost-only use. The /api/memory/* routes are unauthenticated by design and should not be exposed to untrusted networks.
Run manually with:
pnpm run secrets:checkdocs/ARCHITECTURE.mddocs/FIELD-MANUAL.mddocs/INGESTION.mddocs/PHASES.mddocs/EXECUTION-PIPELINE.mddocs/SCOPE-GUARDRAILS.mddocs/CONVEX-PRODUCT-SPEC.mddocs/CONVEX-REPLACEMENT-BLUEPRINT.mddocs/MEMORY-LAYER-STANDARD.mddocs/MEMORY-API-CONTRACT.mddocs/CURATED-MEMORY-DESIGN.mddocs/OPENCLAW-MEMORY-SOURCES-AND-BACKUPS.mddocs/CRM-SCAFFOLDING-NOTES.mddocs/PHASE-9-IMPLEMENTATION-PLAN.mddocs/DESKTOP-APPLICATION-PLAN.mddocs/OPENCLAW-PLUGIN-PACKAGING.mddocs/PLUGIN-READY-REFACTOR-PLAN.mddocs/OPENCLAW-PLUGIN-DRAFT-ARTIFACTS.mddocs/POST-PREREQUISITE-PR-BACKLOG.mddocs/UI-UX-REVAMP-PLAN.mdplugin-drafts/opentrust/docs/PLUGIN-DRAFT-RUNTIME-MAP.mddocs/PLUGIN-PROMOTION-CHECKLIST.mddocs/PLUGIN-CHANGE-TRACKER.mddocs/DOCS-ALIGNMENT-NOTES.mddb/0001_init.sqlSECURITY.md