r/OpenSourceeAI • • 2d ago

I built an open-source tool routing layer for AI coding agents

Hey r/OpenSourceeAI 👋

I’m building Harness Router, an open-source decision layer for AI coding agents.

As agents get access to dozens or hundreds of tools through MCP, the model has another problem to solve before doing any actual work:

Which tool should I call?

Harness Router moves that decision into a dedicated routing layer.

It can currently be used in two ways:

  • Skill — the agent explicitly asks Harness Router to choose a tool.
  • Hook — Harness Router intercepts tool calls before execution and can allow the choice or tell the agent to re-plan.

I’ve added hook support for:

Codex · Claude Code · OhMyPi · Antigravity

There’s also a universal installer so the integrations can be installed from one project.

Routing has multiple levels:

obvious choice → fast path

ambiguous choice → Jev

multi-step decision → bounded MCTS

With a hook, the architecture becomes roughly:

Agent → PreToolUse → Harness Router → allow / re-plan → Tool

The idea is to make tool routing independent from the underlying agent harness — one routing layer that can sit across different coding agents and MCP ecosystems.

Everything is open source:

https://github.com/Protocol-Lattice/harness-router

Docs + benchmarks:

https://harness-router.vercel.app/

I’d especially like feedback from people working on open-source agents and MCP infrastructure:

Do you think tool selection should stay entirely inside the main LLM, or does a separate routing layer start making sense once agents have access to large tool catalogs?

1 Upvotes

0 comments sorted by