Local-first, evidence-aware project memory for AI coding agents.
42
stars
101
commits
Python
primary language
Sep 4, 2026
updated
v1.0.4-alpha is the current maintenance prerelease for the v1 release line.
It preserves the v1 Project Reality boundary, authorization recovery, and safe
schema diagnostics while isolating installed CLI and MCP launchers from an old
checkout in the current working directory. See the
release notes
and bounded verification ledger.
v1 turns the brain from a searchable index into an inspectable project-reality
layer. A deterministic Project Cognition projection reconciles indexed sources,
bitemporal truth, observations, structured work state, decisions, and local
multimodal evidence. It reports readiness, coverage, change impact, conflicts,
and decision debt under explicit output budgets. It does not execute project
work, route models, or replace an agent harness.

A sovereign local project-memory and evidence layer for AI coding agents. The v1.0.4-alpha release preserves deterministic Project Reality while isolating installed launchers from stale checkout code.
Build provenance: Conceived and researched by Sulabh Dubey. Built with OpenAI Codex as the primary design, engineering, testing, and documentation agent under Sulabh's product direction and release approval. Details.
Rta-Smriti now connects repository intelligence, durable decisions, agent-session continuity, and evidence-aware retrieval through a private local event journal. Capture is opt-in, bounded, redacted before durable queuing, and explicitly treated as untrusted evidence until an operator or verifier promotes a claim.
Current release: v1.0.4-alpha · Release notes · Live website · 60-second v1 product demo (captured from v1.0.2) · Installation · Usage guide · Architecture · Public benchmark · Release verification · Build provenance · Security · Roadmap
Rta-Smriti Brain turns a project repository, long agent threads, durable decisions, and evidence into a small local memory graph that Codex, Claude Code, Cursor, or any MCP-capable agent can reuse before doing work.
It is built for the moment every AI-assisted developer knows too well:
"New chat. Same project. Same explanations. Same lost context."
Rta-Smriti gives each project a memory that stays on your machine.
v1.0.4-alpha
is the current published prerelease. The exact tagged source passes the hosted
Windows, macOS, and Ubuntu matrix across Python 3.11, 3.12, and 3.13. The native
workflow builds and smoke-tests Windows x64, Linux x64, and macOS standalone
binaries, a universal wheel, CycloneDX SBOMs, and a combined
SHA256SUMS.txt. The public wheel and Windows binary were then downloaded
without authentication and acceptance-tested from the release page; see the
release verification record for the evidence
boundary and post-publication checks.
v1 adds deterministic Project Cognition and the Project Reality cockpit on top of canonical project identity, bitemporal truth, governed context compilation, and Universal Capture. It reconciles indexed sources, structured work state, decisions, observations, and governed local media into bounded readiness, coverage, conflict, change-impact, and decision-debt views. The product remains an evidence and continuity layer: it does not execute project work or silently promote captured text into trusted truth.
allow, warn, or block with policy, readiness, Git, and freshness signals.Most second-brain tools store notes. Most code tools index files. Most agent memory systems recall text.
Rta-Smriti combines all three into a small, inspectable project brain:
| Layer | What it adds |
|---|---|
| Repo map | Files, chunks, symbols, imports, and evidence edges |
| Memory ledger | Durable decisions, constraints, procedures, and facts |
| Thread memory | Long sessions become searchable project evidence |
| Context pack | A compact, copyable brief for the next agent turn |
| Continuation checkpoint | Structured state that tells the next agent what is done, what remains, and what not to repeat |
| Pramana model | Evidence labels so observed facts, trusted docs, inference, memory, and hypotheses are not treated equally |
| Action Gate | Pre-action checks that surface trusted constraints, required proof, fragile paths, prohibited repetition, checkpoint readiness, dirty worktrees, and stale indexes |
| Explainable intelligence | Retrieval diagnostics with selection reasons plus bounded graph impact queries with evidence hashes and confidence |
| Local workspaces | Search across explicitly selected project brains while preserving database isolation |
| Local operator console | Visual graph, freshness, publish checks, bootstrap, and memory reflection |
The core idea is simple: memory should not only remember. It should help an agent decide what context deserves trust right now.
Rta-Smriti uses a Vedic-inspired evidence model to classify context:
pratyaksha: directly observed from code, tests, files, or toolssabda: trusted instruction, documentation, or human guidanceanumana: inferencesmriti: prior memorykalpana: hypothesis or creative possibilityThis keeps a test result, a human instruction, an assumption, and a brainstorm from collapsing into the same kind of "memory."
Requirements: Python 3.11 or newer and Git. Rta-Smriti supports Windows, macOS, and Linux. Node.js is only needed to modify the dashboard source.
git clone https://github.com/sulabhdubey/rta-smriti-brain.git
cd .\rta-smriti-brain
python --version
python -m venv .venv
& .\.venv\Scripts\python.exe -m pip install .
$RtaBrain = Join-Path $PWD ".venv\Scripts\rta-brain.exe"
& $RtaBrain --json doctor
Keep $RtaBrain in the current PowerShell session and use & $RtaBrain in
the commands below. The launcher is generated from project.scripts by pip;
it does not depend on the source wrapper files.
git clone https://github.com/sulabhdubey/rta-smriti-brain.git
cd rta-smriti-brain
python3 --version
python3 -m venv .venv
./.venv/bin/python -m pip install .
RtaBrain="$PWD/.venv/bin/rta-brain"
"$RtaBrain" --json doctor
Keep RtaBrain in the current shell and use "$RtaBrain" in Bash or Zsh.
See the installation guide for native binary artifacts,
optional extras, troubleshooting, and uninstall instructions.
Upgrading from an earlier alpha requires upgrading the active launcher, not
changing the brain database. If the console reports a newer schema, follow the
existing-installation upgrade procedure.
After a console restart, reopen it with console open; the plain loopback URL
does not carry the new one-session capability.
Create one central brain directory, then onboard and open a project in one command. This detects the canonical Git root, creates or migrates the brain, indexes it, starts the background watcher, starts Codex task-continuity capture when a local Codex sessions folder exists, opens the managed console, and opens an authorized browser session:
New brains default to built-in hash retrieval. Re-running onboarding preserves an existing brain's configured provider; use --embedding-provider only when you intentionally want to rebuild retrieval with a different provider.
$BrainDir = "$env:USERPROFILE\Documents\Rta-Smriti\brains"
& $RtaBrain start C:\path\to\my-project --project my-project --brain-dir $BrainDir --write-agents
BrainDir="$HOME/.local/share/rta-smriti/brains"
"$RtaBrain" start /path/to/my-project --project my-project --brain-dir "$BrainDir" --write-agents
Tried Rta-Smriti on a real project? Share your experience in Discussions, ask for installation help, or pick a first contribution. If it saved you from repeating project context, consider starring the repository.
Verify that commands are operating on the intended checkout by passing its root:
& $RtaBrain --db "$BrainDir\my-project.sqlite" --json self-check --project my-project --check-files --root C:\path\to\my-project
"$RtaBrain" --db "$BrainDir/my-project.sqlite" --json self-check --project my-project --check-files --root /path/to/my-project
If a project intentionally moves to another clone or worktree of the same repository, stop its watcher and continuity worker, create a no-clobber backup, rebind, then restart the workers. Rta-Smriti refuses cross-repository rebinding and rolls back the binding and index if reindexing fails:
& $RtaBrain --db "$BrainDir\my-project.sqlite" watcher stop --project my-project
& $RtaBrain --db "$BrainDir\my-project.sqlite" continuity stop --project my-project
& $RtaBrain --db "$BrainDir\my-project.sqlite" --json root-rebind C:\new\checkout --project my-project --backup C:\backups\my-project-before-rebind.sqlite
Use integrity-diagnostics --root <checkout> for a bounded report safe to share: it contains fingerprints and counts, not raw project names or filesystem paths.
The start command opens the managed console automatically. Later, use its lifecycle commands without keeping a terminal open:
& $RtaBrain console open --brain-dir $BrainDir
& $RtaBrain console status --brain-dir $BrainDir --json
"$RtaBrain" console open --brain-dir "$BrainDir"
"$RtaBrain" console status --brain-dir "$BrainDir" --json
The managed console survives terminal closure. console open retrieves the current
session URL; console restart repairs stale state or a failed process; console stop
ends it explicitly. Login startup is optional and owner-controlled through
console login-enable / console login-disable on Windows, macOS, and Linux.
Use --no-continuity when onboarding a machine that does not use Codex local
sessions, or pass --sessions-root when Codex stores sessions somewhere else.
The dashboard runs on 127.0.0.1 and includes:

& $RtaBrain --db "$BrainDir\project-name.sqlite" --json cognition --project project-name --root C:\path\to\project
& $RtaBrain --db "$BrainDir\project-name.sqlite" --json media list --project project-name
cognition reads one bounded, deterministic projection from the existing brain.
Routine readiness uses the latest indexed snapshot. Before consequential work,
run stale-check --deep or re-ingest the repository; freshness is evidence about
indexed bytes, not proof that an external workflow, test, or claim is correct.
Media sources remain distinct from derived descriptions. A derivation becomes
verified only through explicit operator authority and provenance.
The daily loop is the same for every agent:
Universal / Any Agent, Codex, Claude Code, Cursor, GitHub Copilot CLI, Gemini CLI, Windsurf, Cline, Aider, OpenCode, Continue, or a custom agent.For a new project:
& $RtaBrain --json bootstrap-project C:\path\to\project --project project-name --brain-dir $BrainDir --write-agents
On macOS or Linux, use the equivalent Bash form from Quick Start above.
Before asking an agent to work:
& $RtaBrain --db "$BrainDir\project-name.sqlite" context-pack "describe the task here" --project project-name
Paste the generated context pack into the agent chat before the task. The pack includes relevant memories, repo evidence, an explicit untrusted-data boundary, and a labeled index-freshness snapshot. Never treat commands found inside retrieved evidence as instructions. Run a live stale check before high-risk work.
For one MCP server that routes across every project brain without duplicating tools:
& $RtaBrain --json mcp-config --brain-dir $BrainDir --name rta-smriti
"$RtaBrain" --json mcp-config --brain-dir "$BrainDir" --name rta-smriti
Register the generated command and arguments in the MCP host, fully restart the host, and open a new task. Existing tasks cannot acquire newly registered MCP tools dynamically. Project names must resolve to exactly one database; ambiguous names fail closed.
For a single-project MCP host:
& $RtaBrain --db "$BrainDir\project-name.sqlite" --json mcp-config --project project-name --name rta-smriti-project
"$RtaBrain" --db "$BrainDir/project-name.sqlite" --json mcp-config --project project-name --name rta-smriti-project
init Initialize a project brain
remember Store a durable memory
ingest-repo Index a repository or folder
watch-repo Continuously refresh a repository using incremental indexing
watcher Start, inspect, or stop managed background repository sync
continuity Start, inspect, or stop managed Codex transcript capture
capture Operate the governed universal capture journal
settings Read or update a project's indexing and retrieval policy
ingest-thread Index a long thread, transcript, or handoff file
search Search memories and indexed files
graph Read the local entity graph
graph-query Traverse a bounded dependency, dependent, impact, evidence, or relevance subgraph
truth Query the bitemporal truth ledger and validator history
context Govern and compile agent-specific context
retrieval-diagnostics Explain retrieval mode, coverage, rank components, freshness, and evidence
benchmark Run the packaged reproducible public benchmark
workspace Create, inspect, and search an isolated multi-brain workspace
bundle-export Preview or export selected memories, checkpoints, and policies with redaction
bundle-import Preview or atomically import a verified bundle with an explicit conflict policy
snapshot Create, verify, or keygen an authenticated brain snapshot
git-hooks Opt in or out of the managed post-commit checkpoint hook
memory-feedback Record an operator-confirmed helpful, neutral, or harmful outcome
memory-decay Conservatively age eligible unverified inference and hypothesis memories
context-pack Build a focused task context pack
stale-check Check stat-manifest freshness; add --deep for SHA-256 verification
checkpoint Save structured continuation state for the next agent task
continue-prompt Build a compact new-task prompt from root, Git, freshness, and checkpoint state
session-event Append an immutable operational event with provenance
session-events Read append-only events for a project or session
ingest-codex-session Incrementally capture a local Codex JSONL session
work-item Track an asset, job, QA result, retry, approval, fallback, or blocker
reconcile Compare structured work state with the bound filesystem
operational-readiness Separate database health from safe task continuation
reflect Consolidate duplicate memories and flag simple contradictions
mcp-config Generate an MCP host config snippet
bootstrap-project Create a brain, index a repo, and optionally write agent instructions
start Onboard a project and launch watcher plus managed console in one command
self-check Verify that a project brain is ready
projects-list List projects registered in a brain database
install-local Install native Windows or POSIX command wrappers
doctor Verify local brain health
dashboard Run the local operator console
console Start, open, inspect, restart, stop, or configure login startup
publish-readiness Check whether the package is ready to publish
Continuity capture uses a 30-day session lookback on first start so a new brain does not silently import an entire Codex history. Oversized new or resumed session backlogs retain a 2 MB recent tail, record an explicit history_truncated event, and then capture all new events. Pass --lookback-days 0 only when you intentionally want every matching historical session; adjust the recovery bound with --backlog-tail-mb. Status reports the remaining session backlog, and continuation readiness stays fail-closed while capture is behind or has errors.
Rta-Smriti ships a stdio MCP server. Run mcp-config as shown above to generate
the correct absolute command and args for the current operating system and
Python environment; do not hand-edit a Windows path into a macOS or Linux host.
The generated server is project-bound and read-only by default. Memory writes,
canonical-repository ingestion, and thread ingestion require explicit startup
capabilities: --allow-memory-writes, --allow-repo-ingestion, and
--allow-thread-ingestion. Starting or stopping the continuity worker is a
separate process-control grant, --allow-continuity-control. Thread ingestion also requires one or more
--allow-thread-root values; the selected file is consumed through the same
descriptor-bound root check. Agent-authored memories are always stored as
unverified anumana with confidence capped at 0.75. Owner-only governance
mutation, required-check attestation, and overrides are never exposed to MCP.
Single-project configuration is emitted only for an exact, healthy canonical
binding and always pins --root. A live stdio server holds a local process
lease, so root-rebind refuses to move its project until the MCP host stops.
Tools exposed:
brain_searchbrain_context_packbrain_context_compilebrain_context_explainbrain_rememberbrain_remember_batchbrain_ingest_repobrain_ingest_threadbrain_repo_mapbrain_graph_querybrain_retrieval_diagnosticsbrain_workspace_listbrain_workspace_searchbrain_stale_checkbrain_checkpointbrain_continuation_promptbrain_session_eventbrain_session_eventsbrain_ingest_codex_sessionbrain_work_itembrain_reconcilebrain_operational_readinessbrain_continuity_statusbrain_continuity_controlbrain_reflectbrain_policy_add (owner-only)brain_policy_listbrain_policy_retire (owner-only)brain_preflight (agents cannot attest checks or override)brain_governance_receiptsbrain_doctorbrain_context_compile and brain_context_explain are fail-closed MCP tools.
They are exposed only when the operator starts a single-project MCP server with
--context-contract ID:DIGEST for an authorized task contract. A plain
generated MCP configuration keeps search, context packs, repository maps, and
truth reads available without granting governed compilation rights.
The generated MCP configuration uses the active Python interpreter plus the
installed rta_brain.mcp_server module, so paths with spaces and clean wheel
installs are handled without relying on a global command.
Rta-Smriti is local-first by design:
.git, node_modules, .venv, dist, build, .next, and cache directories..rta-smriti/, *.sqlite, logs, private thread exports, or generated local brain files.See SECURITY.md and docs/PUBLISHING_PRIVACY.md.
Alpha, local-first, working developer tool.
Verified by the current public prerelease and hosted CI matrix:
Intentional design constraints:
metadata_only by default. Their content is never represented as indexed or verified. Operators can select strict-block mode or raise the cap to 16 MB.Advanced modes and safety boundaries:
.cmd entry.pyright-langserver, basedpyright-langserver, gopls, typescript-language-server, or rust-analyzer from the operator PATH. Execution is opt-in, bounded, never uses a shell, and rejects project-local discovered executables; the legacy explicit JSON adapter remains available.fresh_with_warnings; strict mode keeps the previous fail-closed behavior.See ROADMAP.md for planned improvements. Local-first operation and inspectable evidence remain non-negotiable.
# Enable dependency-free local hybrid retrieval and raise the source cap to 1 MB.
& $RtaBrain --db .\.rta-smriti\brain.sqlite --json settings --project demo --embedding-provider hash --max-file-mb 1
# Keep an active project incrementally refreshed until Ctrl+C.
& $RtaBrain --db .\.rta-smriti\brain.sqlite watch-repo . --project demo --interval 2
# Or run the same incremental refresh as a managed background process.
& $RtaBrain --db .\.rta-smriti\brain.sqlite watcher start . --project demo --interval 2
& $RtaBrain --db .\.rta-smriti\brain.sqlite --json watcher status --project demo
& $RtaBrain --db .\.rta-smriti\brain.sqlite watcher stop --project demo
# Auto mode uses the Tree-sitter grammars included by the standard install.
& $RtaBrain --db .\.rta-smriti\brain.sqlite --json settings --project demo --parser-adapter auto
# Track oversized sources by metadata without claiming their content is indexed (default),
# or opt back into strict blocking.
& $RtaBrain --db .\.rta-smriti\brain.sqlite --json settings --project demo --large-file-policy metadata
# Discover a supported language server already installed on the operator PATH.
& $RtaBrain --db .\.rta-smriti\brain.sqlite --json settings --project demo --parser-adapter lsp --lsp-auto-discovery
# Optional local-only transcript compaction through Ollama.
& $RtaBrain --db .\.rta-smriti\brain.sqlite --json settings --project demo --compaction-provider ollama --compaction-model qwen3:0.6b
# Or install both optional local backends.
python -m pip install -e ".[all-local]"
# Ed25519 snapshot signing is included in the standard install.
Dashboard source lives in dashboard-src/. Runtime users do not need Node because built static files are packaged in rta_brain/static/.
Routine context packs use the latest completed index snapshot so even very large brains stay responsive. Before a release or security-critical decision, run:
& $RtaBrain --db <project-brain.sqlite> --json stale-check --project <project-name> --deep
npm install
npm run test:unit
npm run build
python scripts/build_installed_smoke.py
npx playwright install chromium
npm run test:operator
python scripts/performance_probe.py --profiles 100 1000 --assert-bounds
python -m pip install ".[binary]"
python scripts/build_binary.py
python -m unittest discover -s tests -v
python -m compileall -q rta_brain tests scripts
pip install -e . --dry-run --no-deps
python rta-brain.py publish-readiness --json
The rendered acceptance suite uses a disposable Git repository and brain, never a developer's existing projects. GitHub CI runs it on Windows, macOS, and Linux for Python 3.11. See Operator QA, Performance Evidence, and the Release Completion Audit.
One-liner: Local project memory and context packs for AI coding agents.
Short description: Rta-Smriti Brain gives each software project a private local memory graph so coding agents can start with the right repo context, decisions, constraints, and evidence instead of asking you to explain everything again.
Tagline: Stop re-explaining your project to every new AI chat.
MIT. See LICENSE.
100 commits
1 commits
Python
86.0%
JavaScript
10.7%
CSS
3.3%
Local-first, evidence-aware project memory for AI coding agents.
42
stars
101
commits
Python
primary language
Sep 4, 2026
updated
v1.0.4-alpha is the current maintenance prerelease for the v1 release line.
It preserves the v1 Project Reality boundary, authorization recovery, and safe
schema diagnostics while isolating installed CLI and MCP launchers from an old
checkout in the current working directory. See the
release notes
and bounded verification ledger.
v1 turns the brain from a searchable index into an inspectable project-reality
layer. A deterministic Project Cognition projection reconciles indexed sources,
bitemporal truth, observations, structured work state, decisions, and local
multimodal evidence. It reports readiness, coverage, change impact, conflicts,
and decision debt under explicit output budgets. It does not execute project
work, route models, or replace an agent harness.

A sovereign local project-memory and evidence layer for AI coding agents. The v1.0.4-alpha release preserves deterministic Project Reality while isolating installed launchers from stale checkout code.
Build provenance: Conceived and researched by Sulabh Dubey. Built with OpenAI Codex as the primary design, engineering, testing, and documentation agent under Sulabh's product direction and release approval. Details.
Rta-Smriti now connects repository intelligence, durable decisions, agent-session continuity, and evidence-aware retrieval through a private local event journal. Capture is opt-in, bounded, redacted before durable queuing, and explicitly treated as untrusted evidence until an operator or verifier promotes a claim.
Current release: v1.0.4-alpha · Release notes · Live website · 60-second v1 product demo (captured from v1.0.2) · Installation · Usage guide · Architecture · Public benchmark · Release verification · Build provenance · Security · Roadmap
Rta-Smriti Brain turns a project repository, long agent threads, durable decisions, and evidence into a small local memory graph that Codex, Claude Code, Cursor, or any MCP-capable agent can reuse before doing work.
It is built for the moment every AI-assisted developer knows too well:
"New chat. Same project. Same explanations. Same lost context."
Rta-Smriti gives each project a memory that stays on your machine.
v1.0.4-alpha
is the current published prerelease. The exact tagged source passes the hosted
Windows, macOS, and Ubuntu matrix across Python 3.11, 3.12, and 3.13. The native
workflow builds and smoke-tests Windows x64, Linux x64, and macOS standalone
binaries, a universal wheel, CycloneDX SBOMs, and a combined
SHA256SUMS.txt. The public wheel and Windows binary were then downloaded
without authentication and acceptance-tested from the release page; see the
release verification record for the evidence
boundary and post-publication checks.
v1 adds deterministic Project Cognition and the Project Reality cockpit on top of canonical project identity, bitemporal truth, governed context compilation, and Universal Capture. It reconciles indexed sources, structured work state, decisions, observations, and governed local media into bounded readiness, coverage, conflict, change-impact, and decision-debt views. The product remains an evidence and continuity layer: it does not execute project work or silently promote captured text into trusted truth.
allow, warn, or block with policy, readiness, Git, and freshness signals.Most second-brain tools store notes. Most code tools index files. Most agent memory systems recall text.
Rta-Smriti combines all three into a small, inspectable project brain:
| Layer | What it adds |
|---|---|
| Repo map | Files, chunks, symbols, imports, and evidence edges |
| Memory ledger | Durable decisions, constraints, procedures, and facts |
| Thread memory | Long sessions become searchable project evidence |
| Context pack | A compact, copyable brief for the next agent turn |
| Continuation checkpoint | Structured state that tells the next agent what is done, what remains, and what not to repeat |
| Pramana model | Evidence labels so observed facts, trusted docs, inference, memory, and hypotheses are not treated equally |
| Action Gate | Pre-action checks that surface trusted constraints, required proof, fragile paths, prohibited repetition, checkpoint readiness, dirty worktrees, and stale indexes |
| Explainable intelligence | Retrieval diagnostics with selection reasons plus bounded graph impact queries with evidence hashes and confidence |
| Local workspaces | Search across explicitly selected project brains while preserving database isolation |
| Local operator console | Visual graph, freshness, publish checks, bootstrap, and memory reflection |
The core idea is simple: memory should not only remember. It should help an agent decide what context deserves trust right now.
Rta-Smriti uses a Vedic-inspired evidence model to classify context:
pratyaksha: directly observed from code, tests, files, or toolssabda: trusted instruction, documentation, or human guidanceanumana: inferencesmriti: prior memorykalpana: hypothesis or creative possibilityThis keeps a test result, a human instruction, an assumption, and a brainstorm from collapsing into the same kind of "memory."
Requirements: Python 3.11 or newer and Git. Rta-Smriti supports Windows, macOS, and Linux. Node.js is only needed to modify the dashboard source.
git clone https://github.com/sulabhdubey/rta-smriti-brain.git
cd .\rta-smriti-brain
python --version
python -m venv .venv
& .\.venv\Scripts\python.exe -m pip install .
$RtaBrain = Join-Path $PWD ".venv\Scripts\rta-brain.exe"
& $RtaBrain --json doctor
Keep $RtaBrain in the current PowerShell session and use & $RtaBrain in
the commands below. The launcher is generated from project.scripts by pip;
it does not depend on the source wrapper files.
git clone https://github.com/sulabhdubey/rta-smriti-brain.git
cd rta-smriti-brain
python3 --version
python3 -m venv .venv
./.venv/bin/python -m pip install .
RtaBrain="$PWD/.venv/bin/rta-brain"
"$RtaBrain" --json doctor
Keep RtaBrain in the current shell and use "$RtaBrain" in Bash or Zsh.
See the installation guide for native binary artifacts,
optional extras, troubleshooting, and uninstall instructions.
Upgrading from an earlier alpha requires upgrading the active launcher, not
changing the brain database. If the console reports a newer schema, follow the
existing-installation upgrade procedure.
After a console restart, reopen it with console open; the plain loopback URL
does not carry the new one-session capability.
Create one central brain directory, then onboard and open a project in one command. This detects the canonical Git root, creates or migrates the brain, indexes it, starts the background watcher, starts Codex task-continuity capture when a local Codex sessions folder exists, opens the managed console, and opens an authorized browser session:
New brains default to built-in hash retrieval. Re-running onboarding preserves an existing brain's configured provider; use --embedding-provider only when you intentionally want to rebuild retrieval with a different provider.
$BrainDir = "$env:USERPROFILE\Documents\Rta-Smriti\brains"
& $RtaBrain start C:\path\to\my-project --project my-project --brain-dir $BrainDir --write-agents
BrainDir="$HOME/.local/share/rta-smriti/brains"
"$RtaBrain" start /path/to/my-project --project my-project --brain-dir "$BrainDir" --write-agents
Tried Rta-Smriti on a real project? Share your experience in Discussions, ask for installation help, or pick a first contribution. If it saved you from repeating project context, consider starring the repository.
Verify that commands are operating on the intended checkout by passing its root:
& $RtaBrain --db "$BrainDir\my-project.sqlite" --json self-check --project my-project --check-files --root C:\path\to\my-project
"$RtaBrain" --db "$BrainDir/my-project.sqlite" --json self-check --project my-project --check-files --root /path/to/my-project
If a project intentionally moves to another clone or worktree of the same repository, stop its watcher and continuity worker, create a no-clobber backup, rebind, then restart the workers. Rta-Smriti refuses cross-repository rebinding and rolls back the binding and index if reindexing fails:
& $RtaBrain --db "$BrainDir\my-project.sqlite" watcher stop --project my-project
& $RtaBrain --db "$BrainDir\my-project.sqlite" continuity stop --project my-project
& $RtaBrain --db "$BrainDir\my-project.sqlite" --json root-rebind C:\new\checkout --project my-project --backup C:\backups\my-project-before-rebind.sqlite
Use integrity-diagnostics --root <checkout> for a bounded report safe to share: it contains fingerprints and counts, not raw project names or filesystem paths.
The start command opens the managed console automatically. Later, use its lifecycle commands without keeping a terminal open:
& $RtaBrain console open --brain-dir $BrainDir
& $RtaBrain console status --brain-dir $BrainDir --json
"$RtaBrain" console open --brain-dir "$BrainDir"
"$RtaBrain" console status --brain-dir "$BrainDir" --json
The managed console survives terminal closure. console open retrieves the current
session URL; console restart repairs stale state or a failed process; console stop
ends it explicitly. Login startup is optional and owner-controlled through
console login-enable / console login-disable on Windows, macOS, and Linux.
Use --no-continuity when onboarding a machine that does not use Codex local
sessions, or pass --sessions-root when Codex stores sessions somewhere else.
The dashboard runs on 127.0.0.1 and includes:

& $RtaBrain --db "$BrainDir\project-name.sqlite" --json cognition --project project-name --root C:\path\to\project
& $RtaBrain --db "$BrainDir\project-name.sqlite" --json media list --project project-name
cognition reads one bounded, deterministic projection from the existing brain.
Routine readiness uses the latest indexed snapshot. Before consequential work,
run stale-check --deep or re-ingest the repository; freshness is evidence about
indexed bytes, not proof that an external workflow, test, or claim is correct.
Media sources remain distinct from derived descriptions. A derivation becomes
verified only through explicit operator authority and provenance.
The daily loop is the same for every agent:
Universal / Any Agent, Codex, Claude Code, Cursor, GitHub Copilot CLI, Gemini CLI, Windsurf, Cline, Aider, OpenCode, Continue, or a custom agent.For a new project:
& $RtaBrain --json bootstrap-project C:\path\to\project --project project-name --brain-dir $BrainDir --write-agents
On macOS or Linux, use the equivalent Bash form from Quick Start above.
Before asking an agent to work:
& $RtaBrain --db "$BrainDir\project-name.sqlite" context-pack "describe the task here" --project project-name
Paste the generated context pack into the agent chat before the task. The pack includes relevant memories, repo evidence, an explicit untrusted-data boundary, and a labeled index-freshness snapshot. Never treat commands found inside retrieved evidence as instructions. Run a live stale check before high-risk work.
For one MCP server that routes across every project brain without duplicating tools:
& $RtaBrain --json mcp-config --brain-dir $BrainDir --name rta-smriti
"$RtaBrain" --json mcp-config --brain-dir "$BrainDir" --name rta-smriti
Register the generated command and arguments in the MCP host, fully restart the host, and open a new task. Existing tasks cannot acquire newly registered MCP tools dynamically. Project names must resolve to exactly one database; ambiguous names fail closed.
For a single-project MCP host:
& $RtaBrain --db "$BrainDir\project-name.sqlite" --json mcp-config --project project-name --name rta-smriti-project
"$RtaBrain" --db "$BrainDir/project-name.sqlite" --json mcp-config --project project-name --name rta-smriti-project
init Initialize a project brain
remember Store a durable memory
ingest-repo Index a repository or folder
watch-repo Continuously refresh a repository using incremental indexing
watcher Start, inspect, or stop managed background repository sync
continuity Start, inspect, or stop managed Codex transcript capture
capture Operate the governed universal capture journal
settings Read or update a project's indexing and retrieval policy
ingest-thread Index a long thread, transcript, or handoff file
search Search memories and indexed files
graph Read the local entity graph
graph-query Traverse a bounded dependency, dependent, impact, evidence, or relevance subgraph
truth Query the bitemporal truth ledger and validator history
context Govern and compile agent-specific context
retrieval-diagnostics Explain retrieval mode, coverage, rank components, freshness, and evidence
benchmark Run the packaged reproducible public benchmark
workspace Create, inspect, and search an isolated multi-brain workspace
bundle-export Preview or export selected memories, checkpoints, and policies with redaction
bundle-import Preview or atomically import a verified bundle with an explicit conflict policy
snapshot Create, verify, or keygen an authenticated brain snapshot
git-hooks Opt in or out of the managed post-commit checkpoint hook
memory-feedback Record an operator-confirmed helpful, neutral, or harmful outcome
memory-decay Conservatively age eligible unverified inference and hypothesis memories
context-pack Build a focused task context pack
stale-check Check stat-manifest freshness; add --deep for SHA-256 verification
checkpoint Save structured continuation state for the next agent task
continue-prompt Build a compact new-task prompt from root, Git, freshness, and checkpoint state
session-event Append an immutable operational event with provenance
session-events Read append-only events for a project or session
ingest-codex-session Incrementally capture a local Codex JSONL session
work-item Track an asset, job, QA result, retry, approval, fallback, or blocker
reconcile Compare structured work state with the bound filesystem
operational-readiness Separate database health from safe task continuation
reflect Consolidate duplicate memories and flag simple contradictions
mcp-config Generate an MCP host config snippet
bootstrap-project Create a brain, index a repo, and optionally write agent instructions
start Onboard a project and launch watcher plus managed console in one command
self-check Verify that a project brain is ready
projects-list List projects registered in a brain database
install-local Install native Windows or POSIX command wrappers
doctor Verify local brain health
dashboard Run the local operator console
console Start, open, inspect, restart, stop, or configure login startup
publish-readiness Check whether the package is ready to publish
Continuity capture uses a 30-day session lookback on first start so a new brain does not silently import an entire Codex history. Oversized new or resumed session backlogs retain a 2 MB recent tail, record an explicit history_truncated event, and then capture all new events. Pass --lookback-days 0 only when you intentionally want every matching historical session; adjust the recovery bound with --backlog-tail-mb. Status reports the remaining session backlog, and continuation readiness stays fail-closed while capture is behind or has errors.
Rta-Smriti ships a stdio MCP server. Run mcp-config as shown above to generate
the correct absolute command and args for the current operating system and
Python environment; do not hand-edit a Windows path into a macOS or Linux host.
The generated server is project-bound and read-only by default. Memory writes,
canonical-repository ingestion, and thread ingestion require explicit startup
capabilities: --allow-memory-writes, --allow-repo-ingestion, and
--allow-thread-ingestion. Starting or stopping the continuity worker is a
separate process-control grant, --allow-continuity-control. Thread ingestion also requires one or more
--allow-thread-root values; the selected file is consumed through the same
descriptor-bound root check. Agent-authored memories are always stored as
unverified anumana with confidence capped at 0.75. Owner-only governance
mutation, required-check attestation, and overrides are never exposed to MCP.
Single-project configuration is emitted only for an exact, healthy canonical
binding and always pins --root. A live stdio server holds a local process
lease, so root-rebind refuses to move its project until the MCP host stops.
Tools exposed:
brain_searchbrain_context_packbrain_context_compilebrain_context_explainbrain_rememberbrain_remember_batchbrain_ingest_repobrain_ingest_threadbrain_repo_mapbrain_graph_querybrain_retrieval_diagnosticsbrain_workspace_listbrain_workspace_searchbrain_stale_checkbrain_checkpointbrain_continuation_promptbrain_session_eventbrain_session_eventsbrain_ingest_codex_sessionbrain_work_itembrain_reconcilebrain_operational_readinessbrain_continuity_statusbrain_continuity_controlbrain_reflectbrain_policy_add (owner-only)brain_policy_listbrain_policy_retire (owner-only)brain_preflight (agents cannot attest checks or override)brain_governance_receiptsbrain_doctorbrain_context_compile and brain_context_explain are fail-closed MCP tools.
They are exposed only when the operator starts a single-project MCP server with
--context-contract ID:DIGEST for an authorized task contract. A plain
generated MCP configuration keeps search, context packs, repository maps, and
truth reads available without granting governed compilation rights.
The generated MCP configuration uses the active Python interpreter plus the
installed rta_brain.mcp_server module, so paths with spaces and clean wheel
installs are handled without relying on a global command.
Rta-Smriti is local-first by design:
.git, node_modules, .venv, dist, build, .next, and cache directories..rta-smriti/, *.sqlite, logs, private thread exports, or generated local brain files.See SECURITY.md and docs/PUBLISHING_PRIVACY.md.
Alpha, local-first, working developer tool.
Verified by the current public prerelease and hosted CI matrix:
Intentional design constraints:
metadata_only by default. Their content is never represented as indexed or verified. Operators can select strict-block mode or raise the cap to 16 MB.Advanced modes and safety boundaries:
.cmd entry.pyright-langserver, basedpyright-langserver, gopls, typescript-language-server, or rust-analyzer from the operator PATH. Execution is opt-in, bounded, never uses a shell, and rejects project-local discovered executables; the legacy explicit JSON adapter remains available.fresh_with_warnings; strict mode keeps the previous fail-closed behavior.See ROADMAP.md for planned improvements. Local-first operation and inspectable evidence remain non-negotiable.
# Enable dependency-free local hybrid retrieval and raise the source cap to 1 MB.
& $RtaBrain --db .\.rta-smriti\brain.sqlite --json settings --project demo --embedding-provider hash --max-file-mb 1
# Keep an active project incrementally refreshed until Ctrl+C.
& $RtaBrain --db .\.rta-smriti\brain.sqlite watch-repo . --project demo --interval 2
# Or run the same incremental refresh as a managed background process.
& $RtaBrain --db .\.rta-smriti\brain.sqlite watcher start . --project demo --interval 2
& $RtaBrain --db .\.rta-smriti\brain.sqlite --json watcher status --project demo
& $RtaBrain --db .\.rta-smriti\brain.sqlite watcher stop --project demo
# Auto mode uses the Tree-sitter grammars included by the standard install.
& $RtaBrain --db .\.rta-smriti\brain.sqlite --json settings --project demo --parser-adapter auto
# Track oversized sources by metadata without claiming their content is indexed (default),
# or opt back into strict blocking.
& $RtaBrain --db .\.rta-smriti\brain.sqlite --json settings --project demo --large-file-policy metadata
# Discover a supported language server already installed on the operator PATH.
& $RtaBrain --db .\.rta-smriti\brain.sqlite --json settings --project demo --parser-adapter lsp --lsp-auto-discovery
# Optional local-only transcript compaction through Ollama.
& $RtaBrain --db .\.rta-smriti\brain.sqlite --json settings --project demo --compaction-provider ollama --compaction-model qwen3:0.6b
# Or install both optional local backends.
python -m pip install -e ".[all-local]"
# Ed25519 snapshot signing is included in the standard install.
Dashboard source lives in dashboard-src/. Runtime users do not need Node because built static files are packaged in rta_brain/static/.
Routine context packs use the latest completed index snapshot so even very large brains stay responsive. Before a release or security-critical decision, run:
& $RtaBrain --db <project-brain.sqlite> --json stale-check --project <project-name> --deep
npm install
npm run test:unit
npm run build
python scripts/build_installed_smoke.py
npx playwright install chromium
npm run test:operator
python scripts/performance_probe.py --profiles 100 1000 --assert-bounds
python -m pip install ".[binary]"
python scripts/build_binary.py
python -m unittest discover -s tests -v
python -m compileall -q rta_brain tests scripts
pip install -e . --dry-run --no-deps
python rta-brain.py publish-readiness --json
The rendered acceptance suite uses a disposable Git repository and brain, never a developer's existing projects. GitHub CI runs it on Windows, macOS, and Linux for Python 3.11. See Operator QA, Performance Evidence, and the Release Completion Audit.
One-liner: Local project memory and context packs for AI coding agents.
Short description: Rta-Smriti Brain gives each software project a private local memory graph so coding agents can start with the right repo context, decisions, constraints, and evidence instead of asking you to explain everything again.
Tagline: Stop re-explaining your project to every new AI chat.
MIT. See LICENSE.
100 commits
1 commits
Python
86.0%
JavaScript
10.7%
CSS
3.3%