cortex CLAUDE.md

cortex CLAUDE.md is an instructions file for coding agents from MikeSquared-Agency/cortex. It costs 1,549 tokens per session, scanned A, original, MIT.

A repository guide for Cortex, an embedded memory engine for AI agents. It describes the Rust workspace, language client libraries, storage and search components, documentation areas, and common build and test commands.

In plain words
What is it for?
Use it when working on Cortex's Rust libraries, server, client SDKs, protocol definitions, documentation, or examples. It also explains how to build, test, lint, and run the system.
Why use it?
It gives coding agents the project's structure and working conventions before they change code. This helps them choose the right package and run the expected checks.

Instructions file

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/mikesquared-agency/cortex/claude-md
Clone the repo
git clone --depth 1 https://github.com/MikeSquared-Agency/cortex

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for cortex CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/mikesquared-agency/cortex/claude-md.svg)](https://agentmods.dev/instructions/mikesquared-agency/cortex/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/mikesquared-agency/cortex/claude-md"><img src="https://agentmods.dev/badge/instructions/mikesquared-agency/cortex/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,549 This file is loaded in full into every session.
When invoked 1,549 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.01549 $0.01549
Opus 5 $0.00775 $0.00775
Sonnet 5 $0.00310 $0.00310
Haiku 4.5 $0.00155 $0.00155

Measured 4d ago against content hash 996cd71a76a4, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

cortex CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

CLAUDE.md · 147 lines

How it starts

The opening of the file, as written. The whole thing — 147 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CLAUDE.md — Cortex Agent Guide

What is this?

Cortex is an embedded graph memory engine for AI agents. Rust, redb (embedded DB), gRPC + HTTP APIs, vector search (HNSW), auto-linking.

Repo structure

crates/
  cortex-core/     — Storage, graph, vector, auto-linker, types. The library.
  cortex-server/   — gRPC/HTTP server, CLI, config. The binary.
  cortex-client/   — Rust gRPC client crate.
  cortex-proto/    — Protobuf definitions + generated code.
  warren-adapter/  — Optional Warren integration (feature-gated).
sdks/
  typescript/      — cortex-memory-client npm package
  python/          — cortex-memory-client PyPI package (`cortex_memory` import)
  go/              — Go client module
specs/             — Design specs (tagged IMPLEMENTED/DEFERRED)
docs/              — User-facing documentation
examples/          — Integration examples (LangChain, CrewAI, etc.)

Build & test

cargo test --workspace                          # All 176 tests
cargo test --workspace --no-default-features    # Without warren adapter
cargo build -p cortex-server --release          # Release binary
cargo clippy --workspace                        # Lint

Run

cortex init                    # Create cortex.toml
cortex serve                   # Start server (gRPC :9090, HTTP :9091)
cortex node create --kind fact --title "..."
cortex search "query"
cortex briefing <agent-id>
cortex shell                   # Interactive REPL

Key types

  • NodeKind / Relation — validated string newtypes (not enums)
  • Cortex::open(path) — library mode, no server needed
  • Storage trait — RedbStorage implements it
  • IngestAdapter trait — pluggable event sources
  • TrustEngine -- computes trust from graph topology, no stored confidence
  • BriefingRoleConfig -- maps node kinds to briefing roles (identity, persistent, trackable, temporal, reviewable, superseding)
  • BriefingScope -- Agent (default), Shared (cross-agent), Unified (orchestrator)
  • Entity convention: kind: "entity" + metadata.entity_type
  • Config: cortex.toml with #[serde(default)] on all structs

Read the full file on GitHub · 147 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 147 lines · 1,549 tokens per session scan A 996cd71a76a4

Subscribe to this mod's changes

cortex CLAUDE.md is an instructions file published in the GitHub repository MikeSquared-Agency/cortex (11 stars, last pushed 1mo ago), licensed MIT. It adds 1,549 tokens to every session, about $0.0077 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.