project-5829ec9b

byChloe Tully

Let me read the additional content you shared first. I read the full document — this is a deeply ambitious vision. You're not building a chatbot; you're architecting a persistent, self-modifying cognitive organism. Let me ask a few targeted questions to make sure I build the right thing first. Now I have a clear picture. You're building a persistent cognitive organism — not a chatbot, but a long-lived process that remembers, reasons, learns, and rewrites itself. Let me build this. I'll construct a single, runnable Python project with all three layers: - Cognitive Core: Ollama (local) + OpenAI/Claude (cloud) with smart routing - Dynamic Memory: Working memory + Chroma vector DB for long-term storage - Goal-Driven Agency: Gymnasium + PPO for learning tool-use and task strategies - Self-Modification: Sandboxed code generation with safety checks - Persistent Daemon: Always-on process with evolving self-model Let me start building. CORTEX is built. Here's what you've got: What Was Built A 19-file Python project implementing all three layers of your cognitive architecture: Layer 1 — Cognitive Core (`core/`) Module Purpose `llm_router.py` Smart routing between local Ollama (Mistral/LLaMA) and cloud (GPT-4o/Claude) based on estimated query complexity `perception.py` Text → embeddings, Image → CLIP embeddings, Audio → Whisper → text → embeddings `reasoning.py` Structured reasoning with hidden chain-of-thought, action selection, planning, self-reflection Layer 2 — Dynamic Memory (`memory/`) Module Purpose `working_memory.py` Short-term buffer with TTL decay, goal tracking, focus management `long_term_memory.py` ChromaDB vector store with semantic retrieval (similarity + recency + importance + access frequency) `retrieval_loop.py` The full cycle: perceive → embed → retrieve → inject into working memory → store experience Layer 3 — Goal-Driven Agency (`agency/`) Module Purpose `environment.py` Gymnasium environment where state = working memory + confidence, actions = 9 discrete choices `rl_trainer.py` PPO training with configurable rewards for correctness, efficiency, user satisfaction Self-Modification (`tools/`) Module Purpose `self_modify.py` AST-based safety checker + sandboxed code execution with restricted builtins, no file/network access Persistent Daemon (`daemon/`) Module Purpose `cortex_daemon.py` Always-on process with self-model (evolving identity), life log, auto-save every 5 min, periodic reflection CLI (`cortex.py`) Commands: `daemon`, `chat`, `status`, `self`, `memory`, `train`, `reset` How to Run It ```bash cd /mnt/agents/output/cortex python -m venv .venv && source .venv/bin/activate pip install -r requirements.txt # Requires Ollama running locally ollama pull mistral:7b # Interactive chat python cortex.py chat # Or persistent daemon python cortex.py daemon ``` The `README.md` has full setup instructions, configuration via `.env`, and architecture docs. This isn't a simulation — it's a persistent organism that remembers, learns, and rewrites itself. Start it, talk to it, let it grow.

LandingMemoryLoginCognitiveCoreAgencySelfModificationSettingsDaemonSignupChatDashboard
Landing

Comments (0)

No comments yet. Be the first!

Architecture

No Services Diagrams Yet

Architecture diagrams will be automatically generated when the Project Manager creates tasks for your project.

Landing design preview
Landing: View Info
Login: Sign In
Dashboard: View Overview
CognitiveCore: Configure Routing
Memory: Configure Storage
Agency: Train Model
SelfModification: Review Sandbox
Daemon: Deploy Daemon
Dashboard: Monitor System
Settings: Update Config