# harness-router Harness Router is an open-source decision layer that routes agent tool calls before execution. It supports fast closed-choice routing, optional MCTS escalation over side-effect-free state graphs, and integrations with Codex, Claude Code, ohmypi, Antigravity, and DeepSeek Harness. - Findings24: - Website: - Pricing: Freemium - Categories: Productivity Tools ## What is harness-router? Harness Router is a tool-call routing layer for coding-agent harnesses. It helps an agent choose among available tools before a selected call is executed, either through an explicit skill or through a `PreToolUse` hook that intercepts calls automatically. The project is intended for workflows where tool selection is a narrow, closed-choice decision that does not need the full reasoning loop of the host agent. The router provides a fast path for ordinary choices and can escalate ambiguous decisions to `route_mcts`. That mode searches a supplied side-effect-free state graph, using local simulations to select the first real action without executing simulated writes, shell commands, browser mutations, or network mutations. A native stdio MCP server exposes both routing tools to compatible clients. ## What can harness-router do? ### Pre-execution tool routing A \`PreToolUse\` integration checks tool choices before execution and validates calls against the discovered tool inventory. ### Explicit routing skill The skill lets Codex delegate straightforward tool selection to Harness Router instead of spending a full model reasoning step on an obvious choice. ### MCTS escalation \`route\_mcts\` explores a supplied state graph when one-step selection is insufficient. The search remains side-effect-free and returns only the first real action. ### Native MCP server A stdio MCP server exposes \`route\` and \`route\_mcts\`, keeps the provider connection alive, reuses connections, and returns structured routing results. ### Project hook installation The installer adds integration files for supported harnesses, preserves existing settings and hooks, and backs up changed files. Antigravity also receives an MCP registration. ## Use Cases ### Reduce overhead in routine coding-agent choices Use the fast route for deterministic transitions such as choosing a known file-reading tool or running a test after an edit, keeping the host agent focused on broader planning and execution. ### Enforce routing before execution Install the \`PreToolUse\` hook when tool calls should pass through a routing and inventory-validation layer without requiring the model to invoke a skill explicitly. ### Resolve multi-step tool decisions Supply a side-effect-free state graph to \`route\_mcts\` when the best first action depends on several possible follow-up states rather than a single obvious choice. ### Expose routing inside an MCP client Configure the native stdio server so an MCP-compatible harness can call \`route\` and \`route\_mcts\` directly, including from Codex or the Antigravity setup described by the project. ## Frequently Asked Questions ### What does Harness Router route? It routes live agent tool calls before they run, choosing from the available tool candidates and validating the selected call against the discovered inventory when used through the hook integration. ### How does \`route\` differ from \`route\_mcts\`? \`route\` is intended for fast, ordinary tool choices. \`route\_mcts\` searches a supplied side-effect-free state graph for cases where selecting one move requires looking ahead across multiple steps. ### Does the MCTS mode execute simulated actions? No. The project states that the server does not execute simulated writes, shell commands, browser mutations, or network mutations. It selects only the first real action after the search. ### Which agent harnesses are named as supported? The site names Codex, Claude Code, ohmypi, Antigravity, and DeepSeek Harness. The documented project installer uses a provider option and can be run for all five; the available text does not provide a complete configuration reference for every harness. ### How is the router exposed to clients? It can run as a native stdio MCP server exposing \`route\` and \`route\_mcts\`. The site also documents a Codex MCP configuration and says the Antigravity hook installer registers the server in \`.agents/mcp\_config.json\`. ## Quick Facts - **Category**: Developer Tool - **Primary function**: Pre-execution agent tool routing - **Interfaces**: Skill, \`PreToolUse\` hook, and native stdio MCP server - **Named harnesses**: Codex, Claude Code, ohmypi, Antigravity, DeepSeek Harness - **License**: MIT open source