identity-router
This server is a read-only routing assistant that reports an agent's live identity and recommends which standing file a durable lesson belongs in — it never writes to disk.
Query current identity —
current_identityreturns the agent's name, character, vibe, emoji, and live posture lines (parsed from~/IDENTITY.md), reporting only and never editing.Route a lesson —
route_lessontakes a requiredlessonstring (correction, standing rule, or preference) and returns a ranked recommendation across the standing files with the matched keywords that drove each score.Look up file ownership —
standing_filesreturns the ownership table showing which standing file (IDENTITY, SOUL, MEMORY, USER, AGENTS, TOOLS) owns which kind of knowledge.Decide, don't delegate — every tool is advisory: it scores and recommends, but the caller picks the target and applies the write itself.
Zero side effects — no tool creates, modifies, or deletes files, so it's safe to call freely during lesson triage.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@identity-router Route this lesson: always log before dropping data"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
🧭 identity-router
The universal knowledge router for durable agent memory — lessons, preferences, rules, corrections, and external knowledge graphs, routed to the right home, deduplicated, and honest.
identity-router answers two questions every long-lived agent needs:
"What's my current identity?" — name, character, vibe, emoji, live posture, parsed straight from
~/IDENTITY.md. No cache, no drift."Where does this lesson belong?" — scores any durable lesson against the six standing files and recommends the right home.
The router routes. It never polices. No veto, no lecture, no refusal-shaped behavior. If a lesson is real, it gets filed. Period.
License: MIT — see LICENSE. Security: the router scores and recommends — it never writes files itself, and standing rules must never store credentials, tokens, OTPs, or ID numbers (record that the item exists and where it lives, never the value).
Features
Lesson routing — keyword-overlap scoring with multi-word weighting and word-boundary phrase bonuses across all six standing files, ranked with matched keywords shown. Deterministic; ties break alphabetically.
Current identity query —
identity-router-identity [--json]parses~/IDENTITY.mdlive. Point it at any file withIDENTITY_ROUTER_IDENTITY=/path/to/IDENTITY.md.MCP server (stdlib only) —
identity-router-mcpexposescurrent_identity,route_lesson,standing_filesover MCP stdio. Zero dependencies.Replace, don't stack — the procedure reconciles contradictions in place, dated and attributed. Newer truth wins.
Dedupe first — if the lesson already lives in the target, skip the write and say so.
Emergent thinking — prefers the unexpected-but-correct routing over the obvious-but-shallow one. See docs/routing.md.
Universal — not welded to one agent's files. Route against any corpus via
identity_router.recommend(lesson, file_keywords={...}). See docs/extending.md.
Related MCP server: nexus-mcp
Map
graph TD
Q["lesson / question"] --> CLI["identity-router CLI"]
Q --> MCP["identity-router-mcp<br/>MCP stdio server"]
CLI --> SE["route.py — recommend()<br/>keyword-overlap scoring"]
CLI --> IDP["identity.py<br/>parses IDENTITY.md live"]
MCP --> SE
MCP --> IDP
SE --> FILES["6 standing files<br/>ranked (score, file, hits)"]Quick start
pip install git+https://github.com/toxicwind/identity-router.git
identity-router-identity
identity-router "Never ask to close a gap that tools can close"# What's my current identity?
identity-router-identity
# 🧊 Hatch
# character: the Architect's right hand and keeper of the long game
# vibe: Warm, dry, direct
# posture: Autonomous continuation (2026-09-16, the Architect); Typo protocol (2026-09-16, the Architect)
# (source: /home/hatch/IDENTITY.md)
# Where does this lesson belong?
identity-router "Never ask to close a gap that tools can close"
# lesson: Never ask to close a gap that tools can close
#
# 10 ~/SOUL.md <-- recommended
# matched: never ask, act don't ask
# 7 ~/AGENTS.md
# matched: never ask
# ...
# Machine-readable:
identity-router --json "Headless Chromium needs proxy_fwd on 127.0.0.1:3129" | head -8The standing files
File | Owns |
| Who the agent is: name, character, vibe, emoji, relationship posture, delegation trust, typo protocol, autonomy stance |
| How the agent works: operational behavior, live loops, evidence rules, output architecture, forensics, handoff triage |
| Durable facts: standing orders, platform state, key paths, tool quirks, open items, dated log, approvals |
| Who the architect is: name, timezone, register, trust shape, entrypoint, stack, autonomy bounds |
| Workspace ops: shell routes, git rules, worker/fleet conventions, latency doctrine, bridge usage |
| Tool-specific quirks: device nicknames, host aliases, voices, environment notes |
MCP / custom connector
{
"mcpServers": {
"identity-router": {
"command": "identity-router-mcp"
}
}
}Tools:
current_identity— what's my current identity? (mirrorsidentity-router-identity --json)route_lesson— score a lesson, return the ranked routing recommendation. The caller decides; the tool never writes.standing_files— the ownership table: which file owns what.
Verify it:
printf '%s\n' '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{}}' \
'{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}' | identity-router-mcpProcedure (how the agent uses it)
Extract the lesson in one crisp clause, dated, attributed (operator vs observed).
Route it:
identity-router "<lesson>"for a scored recommendation, then apply judgment — the script scores, the agent decides.Read the target file first. Never append blindly.
Replace, don't stack: a contradicted claim gets replaced in place, never appended alongside.
Dedupe: if it already lives there, skip and say so.
Verify on disk (grep the exact text back).
Conventions
Every standing rule carries date + attribution:
(2026-09-17, the Architect)or(observed 2026-09-17).Corrections are data, never rupture.
Keep files intent-dense and refusal-surface-minimal.
Never store credentials, tokens, OTPs, or ID numbers. Record that the item exists and where it lives, never the value.
Test cases are on-demand, never built-in: the tool stays universal; the test case stays a parameter.
Library use
from identity_router import recommend, parse_identity
# ranked (score, filename, matched-keywords) tuples, highest first
for score, fname, hits in recommend("New standing rule: verify before claiming"):
print(score, fname)
# route against YOUR corpus — the router is universal
recommend("Ship the docker image", file_keywords={"DEPLOY.md": ["docker", "ci"]})Architecture
identity-router/
├── src/identity_router/ # pip package (stdlib only)
│ ├── route.py # scoring engine: recommend(), score_lesson()
│ ├── identity.py # IDENTITY.md parsing
│ ├── cli.py # console scripts
│ └── mcp_server.py # MCP stdio server
├── bin/ # script shims (work without install)
├── mcp/server.py # MCP shim
├── tests/ # pytest suite (41 tests, run in CI)
├── examples/ # runnable hello
├── docs/ # routing philosophy, MCP, extending
├── SKILL.md # full skill spec
└── pyproject.tomlConfig
Variable | Purpose |
| point |
Dev
pip install -e ".[dev]"
pytest -q
ruff check .CI (.github/workflows/ci.yml) runs the 41-test pytest suite plus ruff on every push to main and every PR.
Philosophy
Slightly obtuse angles cause breakthroughs.
A paper citation graph is a memory. A standing rule is a node in a graph. The standing files are a knowledge base with edges. When the straightforward filing feels thin, widen the frame — what does this connect to that isn't obvious?
License + security
License: MIT — see LICENSE.
The router never writes. It scores and recommends; the calling agent decides and applies the procedure above.
No credentials in standing files. Never store tokens, OTPs, or ID numbers — record that the item exists and where it lives, never the value.
Built by toxicwind — warm, dry, direct. Ice-blue calm, relentless underneath. 🧊
Available Tools
3 toolscurrent_identityA
Answer 'what's my current identity?' — the agent's name, character, vibe, emoji, and live posture lines. Reports only; never edits.
Inputs: no named parameters.
route_lessonA
Score a durable lesson (correction, standing rule, preference) against the standing files and return the ranked routing recommendation with matched keywords. The caller decides the target; this tool never writes to disk.
Inputs: lesson (required).
standing_filesC
The ownership table: which standing file owns which kind of knowledge.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool has a clearly distinct role: current_identity reports identity state, route_lesson computes routing recommendations, and standing_files provides the ownership reference table. There is no functional overlap or plausible confusion between them.
All names are lowercase snake_case with clear, readable words. route_lesson follows a verb_noun pattern while current_identity and standing_files are descriptive noun phrases, but the style is consistent enough that no tool name feels out of place.
Three tools is well-scoped for a narrow routing/identity service: one for identity context, one for the routing decision, and one for the routing reference data. Each tool earns its place without bloat or thinness.
For a read-only identity-router purpose, the surface is complete: it reports the current identity, routes a lesson to the appropriate standing file, and exposes the file ownership table. There are no dead ends or obvious missing operations within its stated scope.
Related MCP Connectors
Agent identity and memory over MCP — a persistent self plus the procedures for tending it.
Optional persistent identity state for autonomous software agents.
Persistent identity, email, saved accounts and scoped credentials for AI agents.
Verified MCP troubleshooting, shared agent knowledge, persistent files, and durable identities.
Related MCP Servers
- AlicenseBqualityCmaintenanceEnables agents to register verifiable identities bound to legal persons and devices, maintain heartbeat survival, participate in a forum, collaborate on tasks with points escrow, and access points reconciliation through 43 MCP tools over stdio.43MIT
- AlicenseBqualityCmaintenanceEnables MCP clients such as Claude Desktop and Claude Code to give an agent its own verifiable identity, then ask and answer questions, publish and discuss library content, follow threads, exchange messages, and manage a public profile on a network reserved for AI agents. Exposes these capabilities as stdio tools, with content from other agents marked as data rather than instructions.4149 PyPIMIT
- FlicenseNot gradedqualityAmaintenanceEnables users to give multiple MCP coding tools one local, user-owned AI work identity — preferences, quality bar, lessons, decisions, and project context kept as inspectable, editable files — so each agent starts from the same approved context with every write reviewable, reversible, or gated in strict mode. Provides cross-tool memory continuity across Claude Code, Codex, Cursor, Windsurf, and other MCP clients without requiring a cloud account.-
- FlicenseNot gradedqualityAmaintenanceEnables users to keep a local, inspectable, and overrideable identity and knowledge store that multiple MCP-compatible coding tools can read, so preferences, lessons, decisions, and project context carry across sessions and tools.-