Claim Market Router (claim-market-router)
A cost-aware, quota-aware Claim Market Delegation Provider (delegation.backend: claim_market) and optional llm_request reasoning-effort shaper for Hermes Agent.
Derived from Cost-aware-claim-based-multi-model-AI-orchestrator (MISAKA AGENT) and watt-window.
Core Idea
Cheap models explore. Strong models decide. Expensive models finalize.
Instead of static tier mapping, claim-market-router treats subagent delegation (delegate_task) as a claim market:
- Task Cards: Each delegated task specifies
role_needed(explorer,implementer,verifier,finalizer),complexity(1..5), and an optionalmax_cost_unitsceiling. - Claim Synthesis & Shadow Pricing: Candidate model routes synthesize claims from capability fit and rolling-window quota health minus a convex shadow price ($\lambda_i$) that rises as the route's token budget approaches exhaustion:
$$\text{confidence}_i = 0.60 \cdot \text{capability_fit}_i + 0.40 \cdot \text{quota_health}_i - \lambda_i(\text{utilization})$$ - Agreement vs. Weighted Voting: When the pure utility score and highest-confidence claim agree within
agreement_margin, the route is assigned directly; otherwise, candidate routes resolve the disagreement via weighted voting and nominate the strongest independent route asrecommended_verifier. - Explainable Infeasibility & Sensitivity Reports: If
max_cost_unitsor exhausted quota filters out all routes, the router raises aDelegationRouteErrorexplaining the exact budget relaxation needed.
Installation & Configuration
hermes plugins install misakamikotoghr-5205/hermes-hackathon-plugins --subdir claim-market-router
hermes plugins enable claim-market-router
hermes config set delegation.backend claim_market
By default, DEFAULT_CANDIDATES is empty ([]): enabling delegation.backend: claim_market inherits the parent agent's model and provider until you list delegation.backends.claim_market.candidates in config.yaml, so the backend never routes tasks to providers or models you did not explicitly configure.
Note on
service_tierandfallback_providers:
- Omit
service_tieron OpenRouter routes (service_tier: fastis accepted by Hermes only on first-party Anthropic, OpenAI, or xAI endpoints that offer it).- Write
fallback_providersentries as{provider, model}mappings so Hermes retains the full fallback chain.
Example config.yaml setup:
delegation:
backend: claim_market
backends:
claim_market:
agreement_margin: 0.08
window_budget_tokens: 500000
candidates:
- name: scout-fast
provider: openrouter
model: google/gemini-3.8-flash
reasoning_effort: low
fallback_providers:
- provider: openrouter
model: deepseek/deepseek-v4.1-flash
- provider: openrouter
model: z-ai/glm-5.3-flashx
cost_units: 1.0
quality_tier: 2
preferred_roles: [explorer, implementer]
vote_weight: 1.0
window_quota_tokens: 300000
- name: builder-balanced
provider: openrouter
model: anthropic/claude-sonnet-5.5
reasoning_effort: medium
fallback_providers:
- provider: openrouter
model: openai/gpt-6.1-sol
- provider: openrouter
model: moonshotai/kimi-k3
cost_units: 3.5
quality_tier: 4
preferred_roles: [implementer, verifier]
vote_weight: 1.4
window_quota_tokens: 200000
- name: arbiter-frontier
provider: openrouter
model: openai/gpt-6-astra-pro
reasoning_effort: high
fallback_providers:
- provider: openrouter
model: anthropic/claude-opus-5.5
- provider: openrouter
model: google/gemini-4-argon
cost_units: 8.0
quality_tier: 5
preferred_roles: [verifier, finalizer]
vote_weight: 1.8
window_quota_tokens: 100000
Surfaces Provided
- Delegation Provider:
claim_market(ctx.register_delegation_provider) - Tools:
claim_market_auction,claim_market_ledger - Hook:
post_llm_call(tracks token usage in<HERMES_HOME>/plugin-data/claim-market-router/data.db) - Middleware:
llm_request(no-op by default; whenauto_effort_shaping: true, shapesreasoning_efforton exploratory turns when shadow price is elevated) - Commands:
/claim-market [status|auction <goal>|reset]andhermes claim-market [status|auction|reset]
Disclosure (Catalog Rule 13)
- Network & Subprocesses: None. All claim synthesis, weighted voting, and sensitivity calculations are deterministic and local.
- Credentials: Reads no credentials or provider secret files.
- Storage: Writes token-usage counts and auction receipts to
<HERMES_HOME>/plugin-data/claim-market-router/data.dbviaplugins.plugin_storage.plugin_db. - Middleware Behavior:
llm_requestmiddleware is disabled by default (auto_effort_shaping: false); when enabled by the user, it adjusts onlyreasoning_efforton outgoing requests when window shadow price exceeds0.20.
README from the reviewed commit 60c6281; it updates when the author re-pins.

misakamikotoghr-5205