Skip to content

robertogogoni/cortex-claude

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

111 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧠 Cortex OS

The Biological AI Memory Engine

npx -y github:robertogogoni/cortex-claude

A local, persistent memory storage system for Claude. Features zero-shot vector mapping, an interactive terminal dashboard, Obsidian integration, and automatic event logging.

⚑ Quick Start Β  β€’ Β  πŸ’» Usage Β  β€’ Β  πŸ”Œ API Reference Β  β€’ Β  🧬 Architecture


Latest Release Build Status Anthropic License



⚑ Tutorials: Quick Start

1. Global Installation

Launch the environment and run the Terminal Dashboard instantly using a zero-install prompt:

npx -y github:robertogogoni/cortex-claude

(This automatically clones into a secure cache context, executes the setup wizard, checks for your API Keys, and boots the local dashboard!)

2. Launch TUI Dashboard

Pull up the interface directly from the terminal globally.

cortex-tui


πŸ’» How-To: Interactive CLI

The Cortex CLI enables absolute graphical, highly-responsive offline systems maintenance over your mapped cognitive layers. From here, you possess absolute read/write supremacy over your nodes.

  • πŸ” Query Engine – Invoke Hybrid-Search executing reciprocal rank fusions combining dense vectorized data to pinpoint semantic facts.
  • 🎀 Ingest Data – Deposit hard data, voice logs, and syntax directly into the network.
  • πŸ“ Build Vault – Rip your biological network locally into an Obsidian environment mapping.
  • 🧠 Node Migration – Clean up rogue, legacy, or fragmented directories assigning them topographical positions.


πŸ”Œ Reference: API Specs & Key Systems

Cortex is architecturally abstracted extending its network over standard Web API sockets to assist 3rd Party HUD developments and multi-agent coordination. Boot npm run cortex locally to bind port :4000.

Query Route:

curl -X POST http://localhost:4000/api/query \
  -H "Content-Type: application/json" \
  -d '{"prompt": "How did I deploy the AWS bucket?", "domain": "engineering"}'

Core Execution Matrix

Feature Layer Core Execution Engine Operations Detail
Biological Algorithms claude-3-5-sonnet Translates raw text boundaries into highly precise biomechanical arrays with limits, weights, and node routing algorithms.
Local Whisper Pipeline @xenova/transformers Off-grid speech-to-text pipeline utilizing lightweight transformer models for highly secure, multi-modal audio captures.
Dashboard Interface @inquirer/prompts Terminal-UI (TUI) allowing offline audit querying, data ingesting, explicit memory migrations, and hardware back-ups.
Obsidian Integration Vanilla Javascript Translates topographical memories dynamically into localized markdown layouts complete with styling and bi-directional indexing.


🧬 Explanation: Neural Topography

AI agents traditionally suffer from context-window amnesia. They forget prior sessions, decisions, and idioms the moment a session ends. Cortex OS resolves this entirely.

Cortex automatically monitors your terminal sessions, ingests multi-modal data (text & audio), computes structural relevance using claude-3-5-sonnet, and stores knowledge into a fully searchable vector database mapping cleanly into an Obsidian Vault.

It organizes memory using hierarchical data structures rather than flat logs:

  • [Lobe] β€” The highest structural group (e.g., Engineering, Prefrontal, Temporal).
  • [Region] β€” The operational domain classification (e.g., Data Processing, UX Design).
  • [Cluster] β€” The synaptic target containing isolated, immutable atomic context.

C4 Container Architecture

C4Container
    title System Context diagram for Cortex OS

    Person(user, "User/Agent", "CLI user or autonomous Claude agent generating log data.")
    
    System_Boundary(c1, "Cortex Extraction Engine") {
        Container(ingest, "Ingestion Pipeline", "Transformers/Hooks", "Captures Whisper audio and MCP terminal streams.")
        Container(solver, "Anthropic Neural Solver", "Claude 3.5 Sonnet", "Computes topological mapping and bi-temporal bounds.")
        ContainerDb(db, "Primary SQLite Matrix", "JSONL & Vector Array", "Stores semantic embeddings and localized atomic strings.")
    }
    
    System_Ext(obsidian, "Obsidian Vault", "Provides bi-directional spatial routing mappings for human-readable audit structures.")

    Rel(user, ingest, "Transmits raw multimodal data", "CLI/Audio")
    Rel(ingest, solver, "Pipes untyped logs")
    Rel(solver, db, "Synthesizes and classifies graph nodes", "JSONL")
    Rel(db, obsidian, "Exports local directory trees", "Markdown")
Loading


πŸ“š Theoretical Grounding

Cortex operates robustly because it inherits its methodology directly from verified academic research frameworks rather than experimental guesswork:

  • HyDE (Hypothetical Document Embeddings) [Gao et al., 2022]: Cortex utilizes reciprocal rank fusion across hypothetically generated documents to execute zero-shot vector searches, allowing precision recall without fine-tuning bounds.
  • Generative Agents: Interactive Simulacra [Park et al., 2023]: We bypass basic vector storage in favor of Lobe/Cluster spatial topography, adopting the methodology of mapping agentic memories into structured, spatial environments for rapid associative recall.
  • MemGPT [Packer et al., 2023]: By segmenting data autonomously via a background execution layer, Cortex bypasses hard context limitations, effectively acting as an Operating System for LLM memory paging.


πŸ›‘οΈ Telemetry & Security

This project ships rigorously tested CI/CD matrices to ensure ExtractionEngine integrity via Anthropic Mock protocols. Any pull request modification to core mechanics will be systematically rejected if npm run test generates structural variance errors against the graph engine.


Maintained securely under the MIT License.

About

100% persistent memory system for Claude Code with auto-extraction, auto-recall, and compounding learnings (LADS)

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors