
Security News
Ruby's Bundler 4.0.18 Extends Cooldown to bundle lock and bundle cache
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.
cortex-engine
Advanced tools
Portable cognitive engine for AI agents — storage, embeddings, memory, FSRS, and MCP server
Persistent memory for AI agents. Open source, LLM-agnostic, works with any MCP client.
Most AI agents forget everything when the session ends. cortex-engine fixes that — it gives agents a persistent memory layer that survives across sessions, models, and runtimes.
query, observe, believe, wander, dream, etc.) over the Model Context ProtocolThe result: personality and expertise emerge from accumulated experience, not system prompts. An agent with 200 observations about distributed systems doesn't need to be told "you care about distributed systems." It just knows.
Works with Claude Code, Cursor, Windsurf, or any MCP-compatible client. Runs locally (SQLite) or in the cloud (Firestore + Cloud Run).
| Module | Role |
|---|---|
core | Foundational types, config, and shared utilities |
engines | Cognitive processing: memory consolidation, FSRS, graph traversal |
stores | Persistence layer — SQLite (local) and Firestore (cloud) |
mcp | MCP server and tool definitions |
cognitive | Higher-order cognitive operations (dream, wander, validate) |
triggers | Scheduled and event-driven triggers |
bridges | Adapters for external services and APIs |
providers | Embedding provider implementations |
bin | Entry points: serve.js (HTTP + MCP), cli.js (admin CLI) |
npm install cortex-engine
npx fozikio init my-agent
cd my-agent
npx cortex-engine # starts MCP server
Your agent now has 25 cognitive tools. See the Quick Start wiki page for the full 5-minute setup.
npx fozikio agent add researcher --description "Research agent"
npx fozikio agent add trader --description "Trading signals"
npx fozikio agent generate-mcp # writes .mcp.json with scoped servers
Each agent gets isolated memory via namespaces. See the Architecture wiki page for details.
The fastest path: open an AI agent in an empty directory and say "set up a cortex workspace." The agent runs npx fozikio init, reads the generated files, and is immediately productive. See the Installation wiki page for the full guide.
npm run dev # tsc --watch
npm test # vitest run
npm run test:watch
| Variable | Required | Description |
|---|---|---|
CORTEX_API_TOKEN | Optional | Used by the cortex-telemetry hook to send retrieval feedback to the cortex API. Not required to run the MCP server. |
Additional variables are required depending on which providers you enable (Firestore, Vertex AI, OpenAI, etc.). See docs/ for provider-specific configuration.
fozikio init automatically installs safety rules, skills, and agent definitions from the fozikio.json manifest into the target workspace.
cortex-engine ships with Reflex rules — portable YAML-based guardrails that work across any agent runtime, not just Claude Code.
| Rule | Event | What It Does |
|---|---|---|
cognitive-grounding | prompt_submit | Nudges the agent to call query() before evaluation, design, review, or creation work |
observe-first | file_write / file_edit | Warns if writing to memory directories without calling observe() or query() first |
note-about-doing | prompt_submit | Suggests capturing new threads of thought with thread_create() |
Rules live in reflex-rules/ as standard Reflex YAML. They're portable — use them with Claude Code, Cursor, Codex, or any runtime with a Reflex adapter. See @fozikio/reflex for the full rule format and tier enforcement.
Claude Code users also get platform-specific hooks (in hooks/) for telemetry, session lifecycle, and project board gating. These are runtime adapters, not rules — they handle side effects that the declarative rule format doesn't cover.
To customize: Edit the YAML rule files directly, or set allow_disable: true and disable them via Reflex config.
Skills are invocable workflows that agents can use via /skill-name.
| Skill | When to Use | What It Provides |
|---|---|---|
cortex-query | Before evaluation, review, design, or creation work | Best practices for querying cortex — specificity, keyword mode, neighbor exploration, anti-patterns |
cortex-review | When reviewing code, designs, or proposals | A structured review workflow that grounds feedback in cortex memory, with a standard output format |
| Agent | Description |
|---|---|
cortex-researcher | Deep research agent that queries cortex before external sources, observes novel findings back into memory |
fozikio init reads fozikio.json from the package rootcortex-engine ships with 25 cognitive tools out of the box. Plugins add more: Fozikio Plugin Docs
| Plugin | What It Adds |
|---|---|
| @fozikio/tools-threads | Thought threads — create, update, resolve ongoing lines of thinking |
| @fozikio/tools-journal | Session journaling — structured reflections that persist |
| @fozikio/tools-content | Content pipeline — draft, review, publish workflow |
| @fozikio/tools-evolution | Identity evolution — track how the agent's personality changes over time |
| @fozikio/tools-social | Social cognition — interaction patterns, engagement tracking |
| @fozikio/tools-graph | Graph analysis — memory connections, clustering, visualization data |
| @fozikio/tools-maintenance | Memory maintenance — cleanup, deduplication, health checks |
| @fozikio/tools-vitals | Vitals tracking — agent health metrics and operational signals |
| @fozikio/tools-reasoning | Cognitive reasoning — abstraction, contradiction detection, surfacing |
Install any plugin: npm install @fozikio/tools-threads — cortex-engine auto-discovers and loads installed plugins.
MIT — see LICENSE
FAQs
This package has been renamed to @fozikio/cortex-engine. Install that instead.
The npm package cortex-engine receives a total of 6 weekly downloads. As such, cortex-engine popularity was classified as not popular.
We found that cortex-engine demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.

Security News
During a UK cyber test, a Mythos 5 agent used sockpuppets, social engineering, and prompt injection to try to get a maintainer to merge malware.

Company News
Socket is now in the AWS Security Hub Extended plan. Adopt it through AWS, apply committed spend, and block malicious open source packages.