cortex  by by-scott

Cognitive runtime for local-first, long-running AI agent workflows

Created 2 months ago
401 stars

Top 71.9% on SourcePulse

GitHubView on GitHub
Project Summary

Cognitive runtime for language models with memory, metacognition, multimodal channels, native plugins, and a self-evolving Executive.

Cortex provides a local-first cognitive runtime for language models, addressing the need for persistent state and controlled interaction across diverse interfaces. It targets developers, researchers, and power users seeking durable memory, retrieval, tool integration, and operator control for AI workflows, ensuring user-owned data and state independent of external model providers.

How It Works

Cortex functions as a cognitive harness, architected with distinct responsibilities: the Substrate manages durable state, memory, RAG, and policy; the Executive drives model input and context assembly; and the Repertoire handles skills and learned procedures. It employs event-sourced runtime state, robust RAG with provenance, and a secure tool execution framework. Key features include a ten-state turn machine, metacognitive detectors for runtime health, and explicit "Cognitive Contracts" defining workspace, memory, and learning systems.

Quick Start & Requirements

Installation is performed via a bash script: curl -sSf https://raw.githubusercontent.com/by-scott/cortex/main/scripts/cortex.sh | CORTEX_API_KEY="your-key" CORTEX_PERMISSION_LEVEL="balanced" bash -s -- install. Prerequisites include a Linux x86_64 system with systemd, a bash shell, and an LLM provider API key. Management commands like cortex start, cortex status, and cortex stop are available.

Highlighted Details

  • Supports long-running sessions across CLI, HTTP, socket, Telegram, QQ, and WhatsApp channels.
  • Features actor-scoped identity, durable memory with provenance, and agentic RAG that is cited, scoped, and taint-aware.
  • Offers plugin governance for process-isolated JSON tools and trusted native ABI extensions, with review and testing workflows.
  • Implements metacognitive detectors (e.g., DoomLoop, Fatigue) and a ten-state turn machine for runtime monitoring and control.

Maintenance & Community

No specific details regarding maintainers, community channels (e.g., Discord, Slack), or project health signals were found in the provided README text.

Licensing & Compatibility

The project is licensed under the MIT license, which permits broad use, including commercial applications and integration into closed-source projects, with minimal restrictions.

Limitations & Caveats

Cortex does not claim biological consciousness, complete prompt-injection defense, or mature sandbox containment for hostile multi-tenant environments. Native ABI plugins run in-process and require explicit trust, and its policy/risk gates supplement, but do not replace, OS-level isolation.

Health Check
Last Commit

1 month ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
1 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.