System · Cognitive Runtime

NeurOSA Human Brain: persistent programmable state for AI agents

Agents need more than a context window. NeurOSA is an R&D cognitive runtime for durable state, native documents, retrieval, controlled activation and auditable memory changes.

CLAIM ≠ PROOF. No evidence = UNKNOWN.

The implemented path is explicit: source text becomes tokens, AST, semantic analysis, type checks, IR and runtime activation. State and ledger data persist in SQLite rather than existing only inside a transient prompt.

.nsa → lexer → parser → AST → semantic analysis → type checks → IR 0.1 → runtime activation → SQLite state → SHA-256 hash-chain ledger

NeurOSA includes a native workspace for Markdown documents, frontmatter, tags, headings, wikilinks, backlinks, immutable revisions and SQLite FTS5 search. An Obsidian importer is read-only against the source Vault and converts content into NeurOSA-owned state.

Connect adds persistent agent sessions, core context plus retrieval and atomic writes back into documents and the ledger. Ingest covers Drive-style inputs, PDF/DOCX/text and conversation exports through the same Brain API surface.

The ledger is append-only and chained with SHA-256. The documented verifier detects changed payloads, event deletion or reordering, and broken previous/event hashes. Execution itself is bounded with hop, event and time limits plus cycle detection and cancellation.

NeurOSA is explicitly R&D. The repository is a functional reconstruction after loss of an earlier unpushed scratch workspace and does not claim byte-for-byte recovery of that lost source.

The verified NeurOSA build implements a full language-to-runtime path rather than treating memory as an unstructured vector store.

.nsa → lexer → parser → AST → semantic analysis → type checks → IR 0.1 → runtime activation → SQLite → hash-chain ledger

The runtime supports excitatory and inhibitory synapses, bounded impulse propagation, activation traces, persistent state and restart recovery. Execution limits include hop, event and time bounds, cycle detection and cancellation.

Checkpoint A adds a native document workspace with Markdown, frontmatter, tags, headings, wikilinks, backlinks, pins, favorites, trash, immutable revisions and SQLite FTS5 search. The data belongs to NeurOSA itself and does not require Obsidian at runtime.

Checkpoint B adds a one-time read-only Obsidian importer that copies notes and safe attachments into the native workspace, creates neurons and real synapses from wikilinks, and records the operation in the ledger.

Connect adds persistent agent sessions, core context plus retrieval, and atomic writes back into existing documents and the ledger. Ingest accepts Google Drive material, PDF/DOCX/text files and chat exports. HTTP and MCP adapters use the same Brain API instead of implementing separate memory semantics.

The append-only ledger is linked with SHA-256 hashes and stored with runtime state in SQLite. verifyLedger() detects payload mutation, deleted or reordered events, and invalid previousHash or eventHash values.

The repository also states an important recovery boundary: it is a functional reconstruction after loss of an older unpushed scratch workspace and does not claim byte-identical recovery of the missing Git objects or source files.

pnpm format:check pnpm lint pnpm typecheck pnpm test pnpm check pnpm compile pnpm build pnpm smoke