sprix-sage-router: Sprix SAGE Router: Why the Best Agent Is Often the Wrong Choice
A state-aware routing layer for A2A networks that weighs progress, permissions, trust, and handoff friction before it commits a task to SELF, COLLABORATE, or HANDOFF.

Sprix SAGE Router is an open-source algorithmic research output of that initiative. Company attribution describes the project's origin; this public repository remains a research preview and does not expose proprietary production systems or data.
- Sprix SAGE Router treats delegation as a live judgment about whether to continue, collaborate, or hand off, not as a static ranking problem.
- Its real edge is progress awareness, because a task that is already far along can be worse to transfer than to finish badly or slowly.
- Permission checks come before optimization, which makes the router useful in settings where access is as important as capability.
- The project is small and research-oriented, but it is testing a serious idea: explicit delegation can be more reliable than heuristic orchestration.
When the best agent is the wrong answer
Most agent routers ask a simple question: who is best? SAGE asks a harder one: what state is the task in right now? That matters when work is already underway, context is expensive to rebuild, and an otherwise strong agent cannot legally or practically take over.
The three-way decision: SELF, COLLABORATE, HANDOFF
SAGE's core output is not a single agent ID. It is a mode. SELF means keep going alone. COLLABORATE means recruit complementary help. HANDOFF means transfer ownership to a better fit. That triage is the whole point, because binary route or do-not-route systems miss the middle ground where many real tasks live.
from enum import Enum
class Mode(Enum):
SELF = "self"
COLLABORATE = "collaborate"
HANDOFF = "handoff"
Why progress matters more than prestige
This is the sharpest idea in the project. SAGE tracks execution state, including transferable_context, so a task that is 80 percent complete can stay with the current agent even if a specialist looks better on paper. The router prices context loss, not just future capability.
That is why SAGE feels less like a scheduler and more like a sober project manager. It does not merely ask who can do the next step. It asks who can do it with the least waste, the least loss of context, and the least risk of breaking what already works.
How SAGE prices trust, coverage, and friction
Under the hood, the router combines contextual trust, team coverage, and a utility function that weighs value against success probability, handoff loss, and coordination overhead. The result is practical Bayesian bookkeeping, not mystical autonomy. A candidate agent is useful only if its permissions pass, its trust is credible for the requirement at hand, and the team configuration does not introduce more friction than value.
Utility = expected value × success probability - handoff loss - coordination overhead
If permissions fail, the candidate is removed before utility is computed.
SAGE Router is a research-preview Python framework that decides at runtime whether an agent should continue alone, recruit collaborators, or hand off a task above the A2A protocol. It ranks SELF, COLLABORATE, and HANDOFF routes in one utility function, with learned per-requirement trust, budget and deadline constraints, and task-DAG scheduling.
Security before optimization
This is a strong product choice. SAGE filters unauthorized agents before it even starts comparing utility, which means access control is not an afterthought. In an enterprise or cross-org A2A setting, that is the difference between an interesting ranking engine and a system people can actually trust.
| Approach | Decision style | Handles partial progress? | Permission-aware? | Learns from outcomes? | Best for |
|---|---|---|---|---|---|
| SAGE Router | State-aware triage across SELF, COLLABORATE, HANDOFF | Yes | Yes | Yes | A2A routing where tasks are already in motion |
| Static agent ranking | Pick the highest scored agent | No | Sometimes | Usually no | Simple selection problems |
| Generic workflow orchestrator | Follow predefined graph steps | Limited | Depends on the stack | Sometimes | Structured pipelines with known paths |
| Binary router | Route or keep local | Weak | Varies | Rarely | Small decision trees with few constraints |
How it learns without a database
The learning loop is deliberately light. SAGE updates Beta-style beliefs from task outcomes, so trust shifts with evidence instead of waiting for a separate analytics layer. That gives it adaptivity without the operational weight of a full model registry or history service.
In practice, that means the router can warm up from use. It is not trying to know everything in advance. It is trying to become less wrong, one completed task at a time.
Where it fits in the agent stack
SAGE is not a full agent framework. It sits above execution and below discovery, which is exactly where routing intelligence belongs. If A2A or MCP tells you which agents exist, SAGE helps decide who should continue, who should join, and who should take over.
| Layer | What it solves | SAGE's role |
|---|---|---|
| Discovery | Which agents are available | Consumes available candidates |
| Routing | Who should do the work now | Owns the decision |
| Execution | How the task gets carried out | Does not replace it |
| Framework | Full agent lifecycle | Can host SAGE, but SAGE is smaller and narrower |
What this project is really testing
The real experiment here is whether delegation in agent systems can be explicit, auditable, and state-aware instead of hidden inside heuristics. That is a worthwhile bet. The codebase is compact, dependency-free, and clearly meant to test an idea before it becomes an ecosystem.
SAGE's best claim is not that it always finds the optimal agent. It is that it knows when the optimal agent is the wrong answer.