Claude Code model router

Microbrainsforagents

Sub-2ms CPU safety shield & smart tool router for AI agents (Claude Code, MCP). Stops bugs, destructive shell commands, and leaked secrets before execution—saving tokens, money, and your machine.

Install

From source
git clone https://github.com/drtikov/microbrainsforagents.git

From the README

Aetheris Microbrains

Aetheris Microbrains is a deterministic, sub-2ms pre-flight policy engine and cache-aware tool router for autonomous LLM coding agents (Claude Code, Hermes Agent, Codex, SWE-agent, OpenHands).

It sits directly in front of tool execution and shell invocation. By analyzing unified diffs via Python AST and shell commands via wrapper-aware tokenization before execution, it intercepts syntax errors, destructive commands, and secret exfiltration locally on CPU—saving expensive multi-turn error recovery loops and prompt tokens.

📑 Table of Contents

- 🎯 Primary Use Cases & Value Proposition
- 🧩 Built-in Claude Code Skill (/microbrains)
- 🪽 Hermes Agent Integration (FastMCP + Lifecycle Hooks)
  - ⚡ Performance Gains with Hermes
  - One-Command Setup for Hermes
- 🤖 Codex CLI Integration (Hooks + Skill + Plugin)
  - 📊 Measured Benchmarks with Codex
  - Setup: Automatic Gate + Optional MCP
  - How Escalations Behave in Codex
- 🚀 Google Antigravity Integration (Native Plugin: Hooks + MCP + Skill + Rules)
  - 📊 Antigravity Benchmarks (Tokens, Safety & Speed)
  - One-Command Setup for Antigravity
  - Implementation & Test Suite
- ⚠️ Scope, Threat Model & Defense-in-Depth Disclaimer
- 🤝 Compatible Agent Ecosystems
- 💡 Key Benefits & Architectural Features
- 🔒 Cybersecurity & Pre-Flight Policy Controls
- 🏗️ 4-Layer Decision Architecture
- 📦 Installation
- ⚡ Quickstart & Python Examples
  - 0. Unified 4-Layer Decision Contract
  - 1. Claude Code & Agent Harness PreToolUse Hook Integration
  - 2. Allowlist-First Shell Gate & Dev Profile
  - 3. Cache-Safe Sticky Session Tool Narrowing
- 🧪 Testing & Reproducible Benchmarks
  - 0. Micro-Benchmark: decide() Latency Distribution
  - 1. External Tool-Drop Rate & Live-LLM A/B
  - 2. SWE-bench Lite Zero-LLM…
Read the full README on GitHub

Details

Language
Python
License
Apache-2.0
Last updated
23 November 2026
Topics
ai-agentsconformal-predictioncontinual-learningcounterfactual-reasoningedge-aihyperdimensional-computingllm-orchestrationmicro-transformermixture-of-expertsnumpyopenclpython

FAQ

What is Microbrainsforagents?

Sub-2ms CPU safety shield & smart tool router for AI agents (Claude Code, MCP). Stops bugs, destructive shell commands, and leaked secrets before execution—saving tokens, money, and your machine. It is a model router for Claude Code, from drtikov/microbrainsforagents on GitHub.

How do I install Microbrainsforagents?

Clone drtikov/microbrainsforagents from GitHub and follow the setup steps in its README.

Is Microbrainsforagents popular?

drtikov/microbrainsforagents has 31 GitHub stars and 4 forks. It was last updated on 23 November 2026.

More model routers & proxies

Browse the most popular Claude Code mods, all model routers & proxies, or the skills and MCP server directories.