1. Introduction: The Routing Problem in Agentic Systems
Every agentic system begins with a routing decision. When a user submits a request — “Process this refund,” “Review this contract,” “Escalate this compliance issue” — something must decide where that request goes. In a traditional software system, routing is handled by explicit URL paths, API endpoints, or message queue topics. The routing logic is hardcoded and deterministic. In an agentic system, routing must be intelligent: the same natural language input might require different handlers depending on context, user role, system state, and risk level.
The prevailing approach to intelligent routing is keyword-based classification. The router extracts salient tokens from the input (“refund,” “contract,” “compliance”), maps them to predefined categories, and dispatches to the corresponding handler. More sophisticated variants use embedding-based semantic similarity or fine-tuned classifiers, but the fundamental paradigm is the same: routing is treated as a function from input text to category label.
This paper argues that this paradigm is fundamentally wrong for enterprise agentic systems, and proposes the Action Router as a replacement. The key insight is deceptively simple: routing should determine what action to take, not which category the input belongs to. The difference is not semantic. It is architectural. A category label is passive metadata. An action is an executable specification with preconditions that must be verified, effects that must be predicted, responsibility that must be assigned, and gates that must be cleared.
1.1 Why Keyword Routing Fails at Scale
Consider a concrete scenario. A user submits: “The client wants to cancel the contract and get a refund, but there’s a compliance issue with the original terms.” A keyword router sees “cancel,” “contract,” “refund,” and “compliance” — four keywords mapping to at least three different categories. Which category wins? The keyword router must apply heuristics: longest match, highest confidence, first match, or majority vote. All of these are arbitrary. None of them answer the actual question: what action should the system take?
The Action Router does not classify the input. It analyzes the full context (who is the user, what is their authority level, what is the contract state), extracts the intent (the user wants resolution of a multi-faceted issue), evaluates the system state (is the contract in a cancellable state, is the refund within policy limits, is there a pending compliance review), and selects the optimal action from a pre-defined action space. The selected action might be “initiate_contract_review_with_compliance_hold” — a single action that addresses all three concerns simultaneously, with a defined responsibility chain and gate requirements.
1.2 Contributions
This paper makes five contributions. First, we formalize the keyword detection fallacy and derive an information-theoretic lower bound on misrouting that cannot be removed by better keyword engineering alone. Second, we define the Action Router formally as a function over the triple (Context, Intent, State) and prove that it subsumes both keyword and semantic routing as degenerate cases. Third, we formalize the action space with precondition-effect semantics and show that this formalization enables compositional routing with MARIA OS gates. Fourth, we derive a cost function over the action space and characterize tractable optimization regimes: linear-time exact selection over feasible candidate sets and projected-gradient approximation under continuous relaxation. Fifth, we present simulated benchmarks demonstrating the superiority of action routing across four enterprise workloads.
1.3 Category vs. Action (Operational Difference)
- Category: A passive label used for dispatch only.
- Action: An executable object with preconditions, predicted effects, responsibility assignment, gate requirement, and cost.
- Governance implication: Categories can be logged after the fact; actions can be audited, approved, rejected, or escalated before execution.
2. The Keyword Detection Fallacy
2.1 Formal Model of Keyword Routing
Let Σ be the vocabulary and let x ∈ Σ* be the user input. A keyword router R_kw defines a set of category-keyword mappings {(c_j, K_j)} where c_j is a category label and K_j ⊆ Σ is the keyword set for category j. The routing decision is:
This is a weighted bag-of-words classifier. Despite decades of NLP progress, a startling number of production routing systems implement exactly this formula, sometimes dressed up with TF-IDF weights or n-gram matching but structurally identical.
2.2 Information-Theoretic Bound on Misrouting
We prove that keyword routing has a fundamental accuracy ceiling that no amount of keyword engineering can overcome.
Theorem 1 (Keyword Routing Bound, Fano Form). Let H(A | X) be the conditional entropy of the correct action A given the input X, and let H(A | K(X)) be the conditional entropy of A given only the keyword features K(X) ⊆ X. For finite action space A, the error rate of any keyword router satisfies:
The gap H(A | K(X)) - H(A | X) represents the information lost by reducing the input to keywords. In enterprise corpora, this gap is substantial because the correct action depends on context (who is asking), state (what is the current system configuration), and intent (what outcome does the user want) — none of which are captured by keywords alone.
Proof sketch. This is the standard Fano lower bound for decoding A from compressed features K(X). Since keyword extraction discards contextual and state variables, H(A | K(X)) remains strictly larger than H(A | X) whenever the correct action depends on non-keyword features. Therefore a non-zero misrouting floor persists even with perfect keyword matching. ◼
2.3 Empirical Validation of the Bound
We measure the keyword information gap on four enterprise corpora: customer support tickets (n = 12,000), contract review requests (n = 4,500), compliance escalations (n = 3,200), and internal operations requests (n = 8,800). The keyword-only conditional entropy H(A | K(X)) exceeds the full-context entropy H(A | X) by 1.4 to 2.8 bits across all four corpora, yielding a Fano-style misrouting floor in the 20-44% range depending on |A|. Empirically, deployed keyword routers achieve 23-47% misrouting on these corpora — consistent with the lower bound.
2.4 The Semantic Similarity Extension and Its Limits
Semantic similarity routing replaces keyword matching with embedding distance: R_sem(x) = argmin_{c_j} d(embed(x), embed(c_j)), where embed maps text to a vector space and d is cosine or Euclidean distance. This approach captures more of the input’s meaning than keywords, but it still maps input to category. The fundamental problem persists: the correct routing decision depends on (Context, Intent, State), not on Input alone. Semantic similarity reduces H(A | K(X)) but does not close the gap to H(A | X) because embeddings capture meaning of the text but not the state of the world.
3. Action Router: Formal Definition
3.1 The Routing Triple
The Action Router operates on a triple (C, I, S) rather than raw input x:
- Context C: The full environmental context including user identity, authority level (MARIA coordinate), session history, time of day, active organizational policies, and relevant document state. Formally, C ∈ C where C is the context space.
- Intent I: The extracted user intent, which is not a category label but a structured goal specification: what outcome does the user want, what constraints do they impose, what priority do they assign. Formally, I ∈ I where I is the intent space.
- State S: The current system state including active workflows, pending decisions, agent availability, risk levels, and resource utilization. Formally, S ∈ S where S is the state space.
3.2 The Action Router Function
The Action Router is defined as:
where A is the action space (defined in Section 4). The key distinction from keyword routing is that R does not return a label — it returns an action. An action is not a string or an enum. It is a structured object with preconditions, effects, responsibility assignments, and gate requirements.
3.3 Subsumption of Prior Routing Paradigms
The Action Router subsumes keyword routing and semantic routing as degenerate special cases:
Proposition 1 (Subsumption). (a) Keyword routing is an Action Router with C = ∅, I = K(x), S = ∅, and A = {categories}. (b) Semantic routing is an Action Router with C = ∅, I = embed(x), S = ∅, and A = {categories}. (c) Both are information-lossy projections of the full Action Router.
This proposition establishes that Action Routing is strictly more general. Any routing quality achievable by keyword or semantic routing is achievable by Action Routing, but not vice versa. The additional information in (C, S) enables routing decisions that are impossible for input-only routers.
3.4 Intent Extraction vs. Keyword Extraction
The Action Router requires intent extraction rather than keyword extraction. Intent extraction produces a structured representation of the user’s goal:
{
"goal": "resolve_multi_issue",
"constraints": ["refund_limit<=10000", "regulatory_hold_if_flagged"],
"priority": 0.82,
"urgency": "high"
}Note that intent extraction takes both the input x and the context C as arguments. This is critical: the same input “process this refund” has different intents depending on whether C indicates the user is a customer (goal: receive money), a support agent (goal: resolve ticket), or an auditor (goal: verify refund compliance). Keyword extraction, by contrast, produces the same output regardless of context.
4. Action Space Formalization
4.1 Action Definition
An action a ∈ A is a tuple a = (id, pre, eff, resp, gate, cost, rev, comp) where:
- id: Unique action identifier within the MARIA coordinate system
- pre(C, S) → {true, false}: Precondition function that determines whether the action is executable in the current context and state
- eff(S) → S′: Effect function that maps the current state to the post-action state
- resp ∈ MARIA_Coordinate: The MARIA coordinate of the agent or team responsible for executing this action
- gate ∈ GateSpec: The gate specification (auto-approve, human-review, or escalate) determined by the risk tier
- cost(C, I, S) → ℝ≥0: The cost of executing this action in the given context, intent, and state
- rev ∈ {reversible, irreversible}: Reversibility class of the action effect
- comp ∈ \mathcal{A} \cup {\emptyset}: Optional compensating action required when rev = irreversible
4.2 Action Space Structure
The action space A = {a₁, a₂, ..., a_n} is finite but potentially large (hundreds to thousands of actions in an enterprise deployment). We impose structure on A through a hierarchical decomposition aligned with MARIA coordinates:
where A_Z is the set of actions available within Zone Z. This decomposition enables efficient routing: the router first narrows to the relevant Galaxy, Universe, Planet, and Zone before searching within the zone-local action space. The complexity of action search is O(log|A|) rather than O(|A|) under this hierarchical structure.
4.3 Precondition Verification
Before routing to an action, the Action Router must verify that the action’s preconditions are satisfied. This is a critical safety property: routing to an action whose preconditions are not met results in a guaranteed failure. We define the feasible action set at time t as:
The Action Router only considers feasible actions, eliminating an entire class of misrouting errors that keyword routers cannot prevent (routing to a handler that cannot execute given the current state). In our experiments, precondition filtering alone reduces misrouting by 31% before any optimization of the routing function itself.
4.4 Effect Prediction and State Transition Safety
Each action’s effect function eff_a: S → S′ predicts the post-action state. The Action Router uses effect prediction to evaluate candidate actions before selection. This enables look-ahead routing: instead of choosing the action that best matches the input, the router chooses the action whose predicted effect best satisfies the user’s intent:
where d measures the distance between the predicted post-action state and the user’s goal, and λ weights the cost term. This formulation transforms routing from pattern matching (find the closest category) to planning (find the action that best achieves the goal).
5. Gate Integration: Action Router × MARIA OS Gate Engine
5.1 The Composition Property
The central architectural innovation of the Action Router is its compositional integration with the MARIA OS Gate Engine. Rather than applying gates after routing (the retrofit approach used by keyword routers), the Action Router incorporates gate constraints into the routing decision itself:
More precisely, the gated routing function applies the gate specification of the selected action as part of the routing output. The gate does not modify the action — it wraps the action in an execution envelope that enforces the required approval level:
- RiskLevel = low: Gate = auto-approve. The action executes immediately.
- RiskLevel = medium: Gate = human-review. The action is queued for human approval with the MARIA coordinate of the responsible reviewer.
- RiskLevel = high: Gate = escalate. The action is routed to a senior decision-maker with full context, intent, and state documentation.
5.2 Responsibility Preservation Theorem
Theorem 2 (Responsibility Preservation and Controlled Recoverability). For any input (C, I, S) and any action a = R(C, I, S), the composite Action-Gate routing R_gated preserves the following properties: (a) Traceability: the MARIA coordinate of the responsible agent is embedded in the routing output; (b) Auditability: the full routing decision (input triple, feasible actions considered, selected action, gate level applied) is logged as an immutable audit record; (c) Controlled recoverability: reversible actions must declare an executable rollback, while irreversible actions must declare gate = escalate, stronger evidence requirements, and a compensating action.
Proof. Property (a) follows from the action definition: every a ∈ A carries resp ∈ MARIA_Coordinate by construction. Property (b) follows from the MARIA OS audit pipeline, which intercepts all routing decisions at the Gate Engine layer. Property (c) follows from registration constraints on (rev, comp): reversible actions are admitted only with tested rollback procedures, and irreversible actions are admitted only when escalation, evidence strengthening, and compensating recovery paths are explicitly attached. ◼
5.3 Gate-Constrained Optimization
The presence of gates modifies the routing optimization. High-gate actions incur latency (waiting for human approval) that must be weighed against the benefit of selecting the optimal action. We extend the cost function to include gate latency:
where μ weights the latency cost and ν weights the risk penalty for selecting high-risk actions. The routing optimization becomes a three-way tradeoff between action quality (closeness to the user’s goal), execution speed (gate latency), and safety (risk penalty). In production, when preconditions reduce candidates to K feasible actions and J_gate is computable per action, exact minimization is a linear O(K) scan. For larger or differentiable relaxed formulations, projected-gradient methods provide near-optimal solutions with explicit approximation error tracking.
6. Responsibility Preservation in Action Routing
6.1 The Responsibility Chain
Every routed action creates a responsibility chain: a sequence of MARIA coordinates identifying who requested the action (the user or upstream agent), who routed it (the Action Router instance), who will execute it (the downstream agent), and who approved it (the gate resolver). This chain is constructed at routing time and attached to the action envelope:
Keyword routers cannot construct this chain because they do not have the concept of “executor” — they route to a category, not to a responsible agent. The Action Router constructs it by definition: every action carries its executor’s MARIA coordinate.
6.2 Audit Trail Completeness
We define audit trail completeness as the fraction of routing decisions for which the full responsibility chain can be reconstructed from the audit log. In keyword routing systems, audit trail completeness is typically 40-60% because the router logs only the category, not the downstream execution path. In Action Router systems, completeness is 100% by construction because the action definition includes all four chain elements.
6.3 Cross-Zone Routing and Coordinate Propagation
When an action requires execution across multiple MARIA zones (e.g., a contract review that involves legal, finance, and compliance agents in different zones), the Action Router decomposes the action into sub-actions, each with its own responsibility assignment:
The composite action preserves the hierarchical responsibility structure of MARIA OS: the Galaxy-level owner retains ultimate responsibility, while zone-level agents hold operational responsibility. This decomposition is impossible in keyword routing, which has no concept of multi-zone actions.
7. Mathematical Framework: Cost Function and Optimization
7.1 The Routing Cost Function
We define the routing cost function as a weighted sum of four components:
where d measures goal distance (how far the action’s predicted outcome is from the user’s intent), risk measures the probability of adverse effects, latency measures the expected execution time including gate delays, and resource measures the computational and organizational cost of execution. The weights α, β, γ, δ are configurable per deployment and reflect organizational priorities.
7.2 Gradient-Based Optimization over Continuous Relaxation
While the action space A is discrete, we define a continuous relaxation for optimization purposes. Let p ∈ Δ^{|A|} be a probability distribution over actions (the softmax of action scores). The expected cost is:
The gradient ∇_p E[J] can be computed efficiently because J is decomposable over the four cost components, and each component is differentiable with respect to p. We use a projected gradient descent on the simplex Δ^{|A|} to find the optimal routing distribution, then select the action with the highest probability. This approach enables end-to-end training of the Action Router when action outcomes are observed.
7.3 Regret Bound for Online Action Routing
In the online setting where routing decisions are made sequentially and outcomes are observed after execution, we prove that the Action Router achieves sub-linear regret:
Theorem 3 (Regret Bound). Under the multiplicative weight update rule for action scores, the cumulative regret of the Action Router after T routing decisions satisfies:
This O(√T log|A|) regret bound means the Action Router converges to the optimal fixed action at rate O(1/√T), and the dependence on |A| is only logarithmic. For a typical enterprise deployment with |A| = 500, the regret per decision falls below 0.1 after T = 10,000 routing decisions — approximately one week of operation.
8. Comparison with Traditional Routing Paradigms
8.1 Three-Way Comparison
| Dimension | Keyword Router | Semantic Router | Action Router |
|---|---|---|---|
| Input | Raw text tokens | Embedded text vector | (Context, Intent, State) triple |
| Output | Category label | Category label | Executable action with metadata |
| State awareness | None | None | Full system state |
| Context awareness | None | Partial (embedding) | Full organizational context |
| Precondition check | None | None | Mandatory before routing |
| Effect prediction | None | None | Required for goal-directed routing |
| Responsibility | Not assigned | Not assigned | Embedded in action (MARIA coord) |
| Gate integration | Retrofit (post-hoc) | Retrofit (post-hoc) | Native (compositional) |
| Audit trail | Category log only | Category + similarity score | Full chain: requester → router → executor → approver |
| Misrouting rate | 23-47% | 15-28% | 8-12% |
| Latency (P99) | 12ms | 89ms | 28ms |
8.2 Why Semantic Routing Is Not Sufficient
Semantic routing improves on keyword routing by capturing meaning rather than tokens, but it still treats routing as classification. The embedding space conflates semantically similar but operationally distinct requests. “Review this contract for compliance” and “Review this contract for negotiation leverage” are semantically similar (high cosine similarity) but require completely different actions, different agents, different gates, and different responsibility chains. The Action Router distinguishes them because the intent extraction produces different goal specifications (compliance_verification vs. negotiation_analysis) even though the input embeddings are nearly identical.
8.3 Latency Analysis
Counterintuitively, the Action Router is faster than semantic routing despite doing more work. The reason is architectural: semantic routing requires a forward pass through an embedding model (typically 50-100ms for a production-grade encoder) followed by a nearest-neighbor search over the category embedding space. The Action Router performs intent extraction (10-15ms using a lightweight classifier trained on organizational data), precondition filtering (2-5ms, purely rule-based), and objective minimization over a pre-filtered feasible set (5-8ms, typically linear in feasible set size K). The total P99 is 28ms versus 89ms for semantic routing.
9. Experimental Results
9.1 Experimental Setup and Metric Definitions
We evaluate Action Router against keyword routing and semantic routing on four enterprise workloads: (1) Customer Support (CS) with 12,000 tickets across 47 action types; (2) Contract Review (CR) with 4,500 requests across 23 action types; (3) Compliance Escalation (CE) with 3,200 incidents across 31 action types; (4) Internal Operations (IO) with 8,800 requests across 62 action types. All workloads include ground-truth action labels assigned by domain experts, as well as MARIA coordinate annotations for responsibility verification.
To avoid metric ambiguity, we define evaluation metrics explicitly: - Misroute: counted when the selected action is not in the expert-approved action label set for that request, or when the selected action fails execution eligibility checks at dispatch time. - Responsibility attribution failure: counted when any required chain element is wrong or missing (executor mismatch, missing approver for gated action, or missing immutable audit record). - Gate compliance: the fraction of executed actions that satisfy all required gates before execution; equivalently, one minus the bypass rate of mandatory gates.
9.2 Routing Accuracy
| Workload | Keyword Router | Semantic Router | Action Router | Action Router + Gate |
|---|---|---|---|---|
| CS (n=12K) | 62.3% | 74.1% | 88.7% | 91.2% |
| CR (n=4.5K) | 53.1% | 71.8% | 86.4% | 89.1% |
| CE (n=3.2K) | 57.8% | 68.2% | 90.3% | 93.6% |
| IO (n=8.8K) | 71.4% | 79.6% | 92.1% | 94.8% |
The Action Router outperforms keyword routing by 21-33 percentage points and semantic routing by 12-22 percentage points across all workloads. The addition of gate constraints (Action Router + Gate) provides a further 2-4 point improvement by filtering actions that would violate responsibility constraints.
9.3 Responsibility Attribution
| Metric | Keyword Router | Semantic Router | Action Router |
|---|---|---|---|
| Chain completeness | 41.2% | 52.7% | 100% |
| Correct executor ID | 34.8% | 48.3% | 97.1% |
| Gate compliance | 71.3% | 76.8% | 99.7% |
| Audit reconstructability | 38.4% | 55.1% | 100% |
9.4 Latency Distribution
| Percentile | Keyword Router | Semantic Router | Action Router |
|---|---|---|---|
| P50 | 3ms | 52ms | 14ms |
| P90 | 8ms | 78ms | 22ms |
| P99 | 12ms | 89ms | 28ms |
| P99.9 | 45ms | 142ms | 41ms |
The Action Router is 3.2× faster than semantic routing at P99 while achieving significantly higher accuracy. At P99.9, the gap narrows because rare edge cases trigger fallback to full-context re-evaluation, but the Action Router remains competitive with keyword routing even at the tail.
10. Conclusion
The Action Router represents a paradigm shift in AI routing: from classification to control, from keywords to actions, from labels to executable specifications. The key insight — that routing should determine what to do, not what category the input belongs to — has profound implications for enterprise agentic systems. When every routing decision produces an action with preconditions, effects, responsibility assignments, and gate requirements, the routing layer itself becomes a governance mechanism. There is no need to retrofit responsibility after routing; responsibility is embedded in the routing output by construction.
The mathematical framework we present — objective optimization over a structured action space with gate constraints — provides a principled foundation for routing that is both adaptive (in the regret-theoretic sense) and safe (in the responsibility-preservation sense). The simulated benchmarks, measured with explicit misroute/responsibility/gate definitions, demonstrate that this theoretical advantage translates to practical superiority: 67% reduction in misrouting, 94% elimination of responsibility attribution failures, 3.2× latency improvement, and 99.7% gate compliance.
For MARIA OS, the Action Router is not an optional enhancement. It is the routing layer that makes gate-based governance possible at scale. Without action-level routing, gates must be retrofitted as post-hoc checks — a pattern that achieves only 71% compliance in our experiments. With Action Routing, gates are compositional: they emerge from the action definitions themselves, achieving near-perfect compliance by construction. The future of intelligent routing is not smarter classification. It is action control.
References
1. Sakura / BONGINKAN (2026). Why AI Routing Should Be Action-Based, Not Keyword-Based. note.com. 2. Russell, S. & Norvig, P. (2021). Artificial Intelligence: A Modern Approach. 4th Edition, Pearson. 3. Freund, Y. & Schapire, R.E. (1997). A decision-theoretic generalization of on-line learning. JCSS, 55(1), 119-139. 4. Ghallab, M. et al. (2004). Automated Planning: Theory and Practice. Morgan Kaufmann. 5. MARIA OS Technical Documentation (2026). Action Router Architecture Specification, v1.0.