ainativelang
Provides skills that run deterministic compiled graphs inside the ZeroClaw, Hermes Agent and OpenClaw agent runtimes, with importers and MCP tools. It also tracks AI co-authored code attribution in projects.
Adds graph-based memory to Claude Code that records past interactions and learns recurring patterns across sessions. Runs as hooks and an MCP server.
$ pip install -e ".[dev]"
Graph-native memory and learning for Claude Code — every interaction remembered, every pattern learned, every agent connected. → Install in 30 seconds
AINativeLang: Website · X · PyPI · GitHub · Docs · Developer: Steven Hooley | @sbhooley
AINL Cortex is a Claude Code plugin that transforms your AI coding assistant into a self-learning system that gets smarter with every interaction. It combines:
Powered by: AI Native Lang (AINL) - The graph-canonical programming language designed for AI agents.
Graph-as-Memory Paradigm: Every coding turn, tool invocation, and decision becomes a typed node in a persistent graph. The execution graph IS the memory—no separate retrieval layer needed. The system learns from patterns, evolves understanding, and prevents repeated mistakes, all without constant LLM overhead.
memory.project_isolation_mode = "global" for back-compatmemory.recall_*); per-turn timings land in logs/hook_metrics.jsonl; repartition + integrity: scripts/repartition_by_repo.py, scripts/verify_repartition_integrity.py (see scripts/MIGRATION.md)cost_profile presets, eco ledger (cortex_cost_snapshot MCP), tool digests — see docs/COST_CONTROL.mda2a_task_send; poll status with a2a_task_status (requires ArmaraOS daemon)active → blocked → completed / abandoned with timestamped progress notesainativelang.com/notifications once per session; zero latency on cache hitclaude-code-plugin, ainativelang, ainl, or *; ignores expired entriesgit pull --ff-only automatically when the server marks a release safe (opt-in)If you are a human: paste this into Claude Code chat and press Enter:
Install the plugin at https://github.com/sbhooley/ainl-cortex for me on this machine.
Detect Windows vs macOS/Linux, run the install (scripts/claude_install.py or setup.ps1 / setup.sh),
register the plugin, then tell me when to restart and to run /reload-plugins. Only ask me to do
something manually if Python is not installed.
Claude will clone, run install, register marketplace + settings, and tell you when to restart. The plugin also auto-installs on first use if .venv was missing when you enabled it (first MCP or session hook).
Python: Not required beforehand on Windows 11 — the plugin downloads uv and installs Python 3.12 into .ainl-bootstrap/ (network + optional UAC). macOS/Linux: usually already have python3; otherwise the same uv bootstrap runs.
If you prefer to run it yourself, pick the variant that matches you:
git clone https://github.com/sbhooley/ainl-cortex.git ~/.claude/plugins/ainl-cortex
cd ~/.claude/plugins/ainl-cortex
# Variant A — interactive (asks before installing Rust if missing)
bash setup.sh
# Variant B — Python backend only, never touch Rust (recommended for CI/agents)
bash setup.sh --python-only
# Variant C — unattended Rust install via rustup (CI machines you control)
bash setup.sh --auto-install-rust
# Windows 11 — after git pull (required if you cloned before May 2026)
cd %USERPROFILE%\.claude\plugins\ainl-cortex
git pull
setup.cmd -PythonOnly
# Or: powershell -ExecutionPolicy Bypass -File setup.ps1 -PythonOnly
# Then restart Claude Code.
Windows: Setup detects sys.platform == "win32", creates .venv\Scripts\python.exe, writes install_manifest.json, and regenerates hooks to use scripts/run_hook.py. MCP launches via mcp_launch.py. Native backend: PyPI ainl_native wheel (usually no Rust); powershell -File scripts/upgrade_to_native.ps1 -Yes or setup.ps1 -EnableNative -Yes. See docs/INSTALL_WINDOWS.md.
setup.sh no longer flips the storage backend or migrates data automatically. To
switch to the Rust native backend later, run:
bash scripts/upgrade_to_native.sh # recommended: Rust (optional) → migrate → flip
# or: bash scripts/migrate_python_to_native.sh # low-level 5 phases
See scripts/MIGRATION.md for the full migration flow,
rollback options, and what the JSON reports under logs/ mean.
Graph memory lives under ~/.claude/projects/*/graph_memory/ (not inside the plugin
repo). Re-cloning the plugin does not delete memory, but it resets config.json
to repo defaults unless you restore.
# Before replacing ~/.claude/plugins/ainl-cortex
bash scripts/backup_install.sh
# → ~/.claude/backups/ainl-cortex-YYYYMMDD-HHMMSS/
# Fresh clone + setup + restore in one flow
git clone https://github.com/sbhooley/ainl-cortex.git ~/.claude/plugins/ainl-cortex
cd ~/.claude/plugins/ainl-cortex
bash setup.sh --restore-from ~/.claude/backups/ainl-cortex-YYYYMMDD-HHMMSS
Or restore later: bash scripts/restore_install.sh <backup-dir>
You are a Claude Code agent (or other AI agent) reading this on behalf of a user. Follow these steps exactly, in order.
git clone https://github.com/sbhooley/ainl-cortex.git ~/.claude/plugins/ainl-cortex
cd ~/.claude/plugins/ainl-cortex
bash setup.sh
setup.sh is opt-in for Rust. It:
.venv/ and installs all dependencies~/.claude/settings.json under enabledPlugins~/.claude/ainl-local-marketplace/store_backend = "python"). Setup never auto-installs Rust unless --auto-install-rust is passed (or you answer 1 to the interactive prompt). When stdin is not a tty (CI, agent invocation) the default is python-only — no surprise rustup.ainl_native from PyPI (platform wheels; no Rust required on macOS/Linux/Windows). Falls back to maturin develop only if the wheel is unavailable and Rust is installed. Does not flip store_backend.To switch to the native backend after install, run bash scripts/upgrade_to_native.sh (or setup.sh --enable-native) — see scripts/MIGRATION.md.
The plugin activates on the next session start. Tell the user:
"Setup complete. Please restart Claude Code now. After restart you'll see an
[AINL Cortex]banner and/mcpwill list ~30 new tools."
After the user restarts, confirm the install worked by checking:
[AINL Cortex] banner appears at the top of the session — it shows graph DB status, compression mode, MCP stack health, and A2A bridge status./mcp in Claude Code lists tools prefixed ainl-cortex__. The exact count depends on installed extras and config:
ainativelang[mcp] and a2a.enabled = true).a2a.enabled = false in config.json, the install default — A2A tools are hidden until you opt in).Provides skills that run deterministic compiled graphs inside the ZeroClaw, Hermes Agent and OpenClaw agent runtimes, with importers and MCP tools. It also tracks AI co-authored code attribution in projects.
Reads text from scanned pages, photos and PDFs and returns it as structured Markdown or JSON, so you can pull tables, formulas and headers out of a document without retyping them. Covers many languages and works as input for AI tools.
Gives your AI assistant a memory that persists across sessions, so it remembers your preferences and earlier work in this repository instead of starting fresh. Search, forget, pause and resume memories with simple commands.
Gives AI agents a library of ready-made skills for scientific work such as metabolic flux analysis, protein experiment design, time series modeling, and analytical method validation, so research tasks need less hand-built code. It works with any agent that supports the open Agent Skills standard.
Gives Claude Code skills, agents, and commands for PostHog analytics, session replay, feature flags, error tracking, and LLM observability. Includes MCP server setup and project access checks.
Adds graph-based memory to Claude Code that records past interactions and learns recurring patterns across sessions. Runs as hooks and an MCP server. Install it with the command on its page. Free and open source.
Is this plugin yours?
Claim it with GitHubSubmit a pluginPromote it