agentreflexagentreflexcommonsdocs★ github
the open reflex commons

Give your AI agents reflexes.

Skills are what your agent can do. Reflexes are how you'd do it.

$npx agentreflex add
★ star on github
one reflex, compiled into every agent's native hook ↓
reflexes/no-force-push.tsyou write this
import { defineReflex, deny, pass } from "@agentreflex/core";

export default defineReflex({
  name: "no-force-push",
  onToolCall(ctx) {
    if (ctx.tool === "Bash" && ctx.command?.includes("--force"))
      return deny("open a PR — don't force-push shared history");
    return pass();
  },
});
.claude/settings.jsonagentreflex writes this
{
  "hooks": {
    "PreToolUse": [
      {
        "matcher": "Bash|Edit|Write",
        "hooks": [
          { "type": "command", "command": "arx hook --agent claude" }
        ]
      }
    ]
  }
}
01 in the moment

Caught the instant before it runs.

Same reflexes, every agent. Switch tabs — the command runs through the hook either way.

fired
the proactive move you'd have made
blocked
the mistake you'd never make
paused
the call only you should make
$
evaluating
02 the commons10 reflexes · open

An open commons of reflexes.

Yours to copy, remix, and give back — proactive or protective, every one a file you own.

contribute yours ›
+ bring your owna reflex is a file you own — ts, python, or bash. share it by URL or PR it here.defineReflex(…)
03 write & share

A reflex is a file you own.

Keep it in your repo. Hand it to your team. Or give it to everyone.

01write

An instinct in TypeScript, Python, or bash. No SDK, no deploy.

reflexes/your-reflex.ts
02add

Pull one into any project. It wires itself into every agent you use.

npx agentreflex add no-secrets
03share

Send it back — by URL, or a PR to the commons. Now it's everyone's.

arx add github:you/reflex

Teach it once. It never forgets.

Open source, MIT, and yours to extend. Bring your reflexes to every agent you code with.

$npx agentreflex add
★ star on github