{"slug": "show-hn-coretex-an-open-source-unix-like-biomimetic-flat-file-ai-harness", "title": "Show HN: CoreTex – An Open-Source, Unix-like, biomimetic, flat-file AI Harness", "summary": "Daniel Casper released CoreTex, an open-source AI agent harness that combines Unix-like flat-file architecture with biomimetic design based on human neuroanatomy. The tool operates as an always-on daemon with a five-tier memory stack, zero-token code execution through \"cerebellar muscle memory,\" and sandboxed code execution in a Deno-hosted V8 jail. CoreTex aims to provide safe, cost-effective AI integration by processing text files locally before spending API tokens and supporting composability through standard Unix pipes and redirects.", "body_md": "Note to Systems Engineers:I took the biomimicry domain-driven design quite far (e.g., the master daemon is the`Medulla`\n\n, short-term memory is the`Hippocampus`\n\n). It is eccentric, but underneath is (arguably) a highly optimized, concurrent, lock-safe, and execution engine that runs purely on flat files.\n\n**CoreTex** is a UNIX-inspired, biomimetic agent harness and knowledge engine intended to help you use AI safely, cost-effectively, and in a way that helps you integrate the whole of your life.\n\nBorrowing deeply from [human neuroanatomy](/mrdanielcasper/CoreTex/blob/main/docs/Biomimesis.md), CoreTex lets you organize and synthesize information (supercharging Obsidian Vaults), write and execute code in a hardened environment, and utilize peripherals (camera, mic, etc.) alongside webhooks and headless web browsing to observe and react to the outside world.\n\nCoreTex is also intended to be an always-on daemon, understanding your goals and helping you achieve them over time.\n\n**UNIX Philosophy:** Everything is a file like it's the 1970s! State, IPC, data, and queue files are guarded by OS-level locks. Databases are banished to the shadow realm (excluding the SQLite FTS5 DB which reads the flat files for performance). Composability with standard operators is supported - pipe, redirect, etc.**Cerebellar Muscle Memory (Zero-Token Execution):** When CoreTex successfully completes writing code, e.g. setting up a project, the Cerebellum can make it an engram to rerun at 0-cost.*Highly experimental*and will need improvements.[Roadmap item](/mrdanielcasper/CoreTex/blob/main/ROADMAP.md)to enable engram sharing.[Token economics](/mrdanielcasper/CoreTex/blob/main/docs/Token-Economics.md)is a major concern for CoreTex.**5-Tier Biomimetic**[Memory Stack](/mrdanielcasper/CoreTex/blob/main/docs/Memory.md):** Working Memory**- token aware compression inserted between active head and tail for infinite task continuity without amnesia.** Short-Term Recall (Vectorless Search):**Replace the DB with a local SQLite FTS5 index and BM25 ranking. Snippet truncation finds code matches without bloating the context window.**Relation Knowledge**- maps dependencies and markdown connections to a serialized graph, protected by the Anterior Cingulate Cortex circuit breaker if a loop is detected.**Episodic Memory**- keeps a ledger of its objectives and actions in a thread safe WAL JSONL stream.** Long Term Memory**- when CoreTex sleeps, it rotates logs and extracts key memories from them which are used to align the system to you\n\n**Safe-by-Default:** The default \"Cognitive Mode\" is strictly for reading/writing/working on an Obsidian vault or files. Code execution requires explicit user opt-in and is isolated inside an offline Deno-hosted V8 + WebAssembly jail with strict resource limits.\n\nCoreTex operates on text files and local indexing, meaning you can parse your entire codebase before spending a single API token.\n\n**1. Absorb data (0 Token Cost - Local SQLite Indexing)**\n\n```\n./ctx absorb ./my_old_project -d Studio/MyProject -t \"legacy, python\"\n./ctx absorb ./journal -d Personal/Journal -t \"journal, writing\"\n```\n\n**2. Execute a sandboxed agentic task**\n\n```\n./ctx task \"Audit ./my_project for concurrency race conditions and output to audit.md\"\n```\n\n**3. Native Unix Piping**\n\n```\ncat error.log | grep \"Timeout\" | ./ctx task \"Explain this failure cascade\"\n```\n\n**4. Daydreaming**\n\n```\n./ctx daydream\n# NOTE: CURRENTLY ONLY DAYDREAMS ABOUT ITSELF, SELFISH MACHINE.\n# TOPIC-BASED DREAMING IS AN IMMEDIATE TO-DO\n```\n\nCoreTex features a unified setup script to automatically handle prerequisites, virtual environments, and container architectures.\n\n```\nchmod +x setup.sh\n./setup.sh --check      # Optional: run preflight diagnostics\n./setup.sh              # Interactive setup (use --local or --docker to bypass prompts)\npowershell -ExecutionPolicy Bypass -File .\\setup.ps1 -Check\npowershell -ExecutionPolicy Bypass -File .\\setup.ps1  # Use -Local or -Docker to bypass prompts\n```\n\n*Note: CoreTex natively supports routing via Enterprise API Gateways (Cloudflare, Portkey, Helicone) for observability. Select [Gateway] during setup.*\n\nThe setup utility offers two distinct runtime architectures:\n\n**Local (Recommended):** Uses Astral's hyper-fast`uv`\n\nand the`deno`\n\nsecure runtime.**Isolated Container:** Uses Docker Compose with strict UID/GID mapping to prevent root-owned file pollution.\n\nBoth paths launch the **Synaptic Genesis** wizard to configure your nervous system:\n\n**Operating Profile:*** Cognitive Mode*(safe advisory) or*Agentic Mode*(sandboxed execution).**Sensory Innervation:** Toggle vision scrapers (Playwright) or local hardware mic/speakers.**Synapses & Workspace:** Link your LLMs (OpenAI, Anthropic, local Ollama) and bind CoreTex to a target directory.\n\nOnce complete, restart your terminal and command the swarm:\n\n```\n./ctx status\n./ctx task \"Summarize this repository in five bullets\"\n./ctx status # health check\n./ctx live # engage main daemon\n./ctx task \"do a thing\" # executes along route + domain\n./ctx absorb examples/show-hn-mini-project --domain Professional --tags show-hn,demo\n./ctx daydream\n```\n\nDeclarative configs via YAML (these will be cleaned up). After setup, you can freely customize your agents, tools, and models without touching code:\n\n: Change default cloud models (e.g. swap`System/config/system.yaml`\n\n`gpt-4o-mini`\n\nfor`claude-3-5-sonnet-latest`\n\n), set maximum daily token limits, or tweak system behavioral conditions like`dopamine`\n\n(increases temperature) and`cortisol`\n\n(ignores token budgets).: Definitions of system prompts, execution routes, agents (like`System/config/agents.yaml`\n\n`fast_responder`\n\nor`qa_auditor`\n\n), and tool calling lives here.: The physical capability registry. Expose new bash commands, define webhooks, or add JSON schemas for entirely new sensory organs.`System/config/tools.yaml`\n\n*(Note: The setup script will automatically map your preferred default AI model to system.yaml during installation!)*\n\n## 🔐 [Security](/mrdanielcasper/CoreTex/blob/main/docs/Security.md) & Sandboxing (Safe-by-Default)\n\nRunning LLM-generated code locally is inherently dangerous. CoreTex ships in **Cognitive Mode** by default—it can write code and plan tasks, but it *cannot* execute scripts. If you explicitly opt-in (`CORETEX_ENABLE_CODE_EXECUTION=true`\n\nin your `.env`\n\n), CoreTex activates a strict containment matrix:\n\n**The Deno + WASM Jail:** CoreTex does*not*run generated code in your native Python or Bash environment. It forces the LLM to write code executed inside an ephemeral, unprivileged**Deno + WebAssembly** instance.- Firecracker support is on the horizon\n\n**The Volume Mask:** The agent is physically incapable of seeing files outside the specific directory bound during setup.**Cognitive Fallback:** If Deno is missing or unreachable, the system safely degrades back to*Cognitive Mode*, immediately stripping the agent's subprocess execution tools entirely.\n\n** Obsidian** is a first class citizen in CoreTex. CoreTex will automatically detect the\n\n`.obsidian`\n\nconfiguration folder and atomically configure native hotkeys (`Ctrl+Alt+S`\n\n).\n*Note: To map active shell commands directly to these hotkey bindings from within the graphic editor interface, please ensure the standard*\n\n`obsidian-shellcommands`\n\ncommunity plugin is active in your vault. You may struggle with these.[Commands](/mrdanielcasper/CoreTex/blob/main/docs/Commands.md) include:\n\n`./ctx setup`\n\n: Boot the interactive onboarding wizard to configure API keys, LLM routing, and workspace bindings.`./ctx task \"<prompt>\"`\n\n: Dispatches a multi-agent swarm to accomplish a goal.`./ctx daydream`\n\n: Triggers the Default Mode Network (DMN) to autonomously organize files, compress old memories, and refactor code in the background.`./ctx status`\n\n: Opens the real-time Cortical Telemetry dashboard to monitor active agent loops and memory usage.\n\nTrigger CoreTex [external receptors](/mrdanielcasper/CoreTex/blob/main/docs/Sense.md) directly from the execution plane:\n\n`./ctx sense screenshot \"https://google.com\" \"google.png\"`\n\n-*Takes a headless web screenshot.*`./ctx sense perceive \"google.png\" \"Describe layout\"`\n\n-*Uses the Occipital Lobe to analyze visual stimuli.*`./ctx sense scrape \"https://github.com\"`\n\n-*Transduces a web page into raw markdown text format.*`./ctx sense listen --duration 10`\n\n-*Activates physical microphone hardware receptors.*`./ctx sense speak output.wav`\n\n-*Dispatches sound arrays down physical speaker hardware channels.*\n\nIf you are done with CoreTex, leave no trace behind:\n\n```\n./ctx destroy\n```\n\n*This securely purges all local ledgers, token tracking logs, environment API keys, and execution queues. It respects your machine.*\n\nCoreTex values Shift-Left engineering. We enforce focused regression coverage around security, file locking, and execution bypass logic. To verify your PR against our automated gates:\n\n```\nuv run pytest System/tests Sense/tests -v\nuv run ruff check .\n```\n\nIf you believe in a local, flat-file AI harness and want to see where this biological experiment goes, please consider giving the repo a star! It is the best way to help other developers discover the project which will help me keep it going.", "url": "https://wpnews.pro/news/show-hn-coretex-an-open-source-unix-like-biomimetic-flat-file-ai-harness", "canonical_source": "https://github.com/mrdanielcasper/CoreTex", "published_at": "2026-05-27 12:30:20+00:00", "updated_at": "2026-05-27 12:46:00.634492+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "ai-infrastructure", "ai-safety"], "entities": ["CoreTex", "Obsidian", "Medulla", "Hippocampus", "Cerebellum"], "alternates": {"html": "https://wpnews.pro/news/show-hn-coretex-an-open-source-unix-like-biomimetic-flat-file-ai-harness", "markdown": "https://wpnews.pro/news/show-hn-coretex-an-open-source-unix-like-biomimetic-flat-file-ai-harness.md", "text": "https://wpnews.pro/news/show-hn-coretex-an-open-source-unix-like-biomimetic-flat-file-ai-harness.txt", "jsonld": "https://wpnews.pro/news/show-hn-coretex-an-open-source-unix-like-biomimetic-flat-file-ai-harness.jsonld"}}