Sulcus Documentation
Sulcus is a Semantic Virtual Memory Management Unit (VMMU) for AI coding agents. Run 100% locally with embedded PostgreSQL 17 and CPU embeddings, or coordinate teams across repositories through Sulcus Cloud and Managed Private VPC appliances.
How Sulcus Thinks About Memory
Map vs. Territory
Sulcus separates the lightweight Map (pointer_summary, 384-d BGE vector, archetype, heat) from the heavy raw Territory. Agents scan compact pointers in milliseconds and call page_in only when a specific memory faults.
Thermodynamic Salience
Every node carries current_heat (0.0 to 1.0) and stability. Useful memories gain heat and stability when recalled; ignored episodic chatter cools naturally and folds into consolidated synthesis nodes.
Multi-Channel Context
Harness hooks deliver three distinct XML blocks: <sulcus-memories> for recalled knowledge, <sulcus-peers> for live Agent Bus collisions and broadcasts, and <sulcus-namespaces> for linked peer repositories.
Map vs. Territory & Thermodynamics
Agents scan compact Map pointers first and page in heavy Territory lines only on demand, governed by interaction-epoch and wall-clock heat decay.
Multi-Agent Event Bus
Live peer presence, automatic territory.conflict file collision alerts, intent.overlap detection, and SSE broadcast streams across harnesses.
Linked Namespaces & Two-Gate ACL
Connect related repositories with auto_search or on_match routing while enforcing allow/read/deny policies and episodic privacy gates.
Reactive Triggers
Automate pinning, salience boosts, cross-namespace broadcasts, and HMAC-SHA256 webhooks across 10 lifecycle and bus events.
Activity Ledger & Surgical Undo
1,000-turn mutation ring buffer with SHA-256 state verification, out-of-order surgical hunk reversal, and LIFO batch rewind.
REST & MCP Protocol Reference
Complete route catalog for the Sulcus API, Streamable HTTP /mcp, workstation proxy stdio, and all canonical MCP tools.
Install & Connect in 60 Seconds
# 1. Install the native Rust sulcus binary (includes embedded PostgreSQL 17 + CPU embeddings)
curl -fsSL https://sulcus.ca/install.sh | bash
# 2. Authenticate against Sulcus Cloud, your Private VPC, or run 100% offline
sulcus login
# 3. Wire zero-secret MCP configuration into Junie, RubyMine, VS Code, Claude Code, Codex, or OpenCode
sulcus connect
# 4. Verify workstation identity, dynamic libraries, seat lease, and daemon health
sulcus doctor// Written automatically by `sulcus connect` (no raw API keys stored in project repos)
{
"mcpServers": {
"sulcus": {
"command": "sulcus",
"args": ["mcp-proxy"]
}
}
}sulcus mcp-proxy reads credentials from ~/.config/sulcus/sulcus.ini (or macOS Keychain when sulcus login --keychain is used) and forwards MCP calls with X-Sulcus-Machine-Id and X-Namespace. If no remote server is configured, it routes automatically to your local 127.0.0.1:4203 daemon or embedded stdio engine.Golden Index Archetypes & Decay Classes
Verified architectural invariants, schemas, endpoints, and security contracts.
Step-by-step runbooks, release workflows, debugging recipes, and learned CLI undos.
Standing engineering conventions, code review rules, and operator preferences.
Distilled high-salience summaries consolidated from older episodic debugging clusters.
Domain concepts, service boundaries, and cross-repository architectural context.
Time-bound session notes, active task state, and transient investigation breadcrumbs.
Cools twice as fast; ideal for scratch debugging hypotheses.
Default multiplier inheriting the archetype baseline profile.
Cools half as fast; ideal for long-lived service conventions.
Immune to decay without consuming pinned active-index slots.
Python & TypeScript SDK Quickstarts
from sulcus import Sulcus
client = Sulcus(api_key="sk-...")
# Store a standing preference with persistent decay (2.0x half-life) and a heat floor
client.remember(
"Build release artifacts locally before deploying",
memory_type="preference",
decay_class="persistent",
is_pinned=True,
min_heat=0.35,
key_points=["local release builds", "zero server compilation"],
)
# Store a verified architectural fact in a repository namespace
client.remember(
"Keycloak OIDC RS256 tokens authenticate multi-tenant API sessions",
memory_type="fact",
namespace="shared-platform",
)
# Hybrid vector + BM25 + graph resonance recall
results = client.search("authentication and build rules", namespace="shared-platform")
for m in results:
print(f"[{m.memory_type}] {m.pointer_summary} (heat={m.current_heat:.2f})")
# Explicit relevance feedback reinforces high-signal nodes and trains SIRU
client.feedback(results[0].id, "relevant")import { Sulcus } from "sulcus";
const client = new Sulcus({ apiKey: process.env.SULCUS_API_KEY! });
await client.remember("Verify Stripe HMAC signatures with constant-time compare", {
memoryType: "procedural",
decayClass: "persistent",
minHeat: 0.25,
namespace: "payments-rails",
});
// Assemble token-budgeted working context in a single call
const context = await client.buildContext({
query: "webhook signature verification",
tokenBudget: 1800,
namespace: "payments-rails",
});
console.log(context.formattedBlock);/api/v1/agent/ingest/api/v1/agent/search/api/v1/agent/bus/heartbeat/api/v1/namespaces/links/api/v1/agent/ledger/undo/mcp