Agent Router

Policy-driven AI model routing with verifiable provenance across 0G, Hedera, and The Graph.

Visit Repo
Agent Router banner

About

AgentRouter is a reusable decision and provenance layer for autonomous AI agents. Instead of hardcoding one model provider, an agent can discover available routes, compare exact cost, latency, capabilities, privacy, and budget constraints, then deterministically select the best eligible option. It executes inference through 0G Compute and produces a canonical receipt explaining what was considered, why alternatives were excluded, and which route was selected. Non-secret evidence can be stored on 0G Storage, while receipt hashes are anchored and independently verified on 0G Chain. The project also supports HBAR settlement and Mirror Node verification through Hedera, giving agents an auditable way to decide, spend, execute, and prove what happened.

How it's made

AgentRouter is built as a reusable TypeScript toolkit with a Next.js and React demonstration application. Zod defines the versioned contracts for model catalogs, normalized quotes, routing policies, execution evidence, payment challenges, and canonical receipts. A deterministic router filters candidates by capability, privacy, currency, quote expiry, and integer-denominated budgets, then ranks eligible routes by price, latency, and stable identifiers. 0G is the core infrastructure: 0G Compute executes model requests, 0G Storage holds non-secret content-addressed evidence, and a Solidity contract on 0G Chain anchors receipt hashes so another agent can verify them independently. Hedera adds HBAR payment settlement, HashScan evidence, HCS audit anchors, and Mirror Node verification with replay protection. Supabase/Postgres provides durable workflow state and atomic budget reservations. The Graph adapter normalizes indexed provider records into the same contract as local fixtures, allowing discovery sources to change without changing the routing engine. The deliberately “hacky” part is the strict separation of truth: slow indexing never triggers a second payment, The Graph is used for discovery and monitoring rather than settlement verification, and every externally retried operation uses stable idempotency keys. The entire project is validated with TypeScript checks, ESLint, Vitest, production builds, Subgraph builds, and client-bundle secret scanning.

From the public ETHGlobal showcase page. Votes, swipes and the judge score are hackfeed's own.

AI judge

Not judged yet. A free model reads this page, compares it with similar projects and this event's winners, then scores it and says what would make it win.

Still being built?

DormantLast push 131 days ago

Swipe stats

0upvotes
0skips
0saves

Discussion 0

No comments yet. Ask the team something, or say what you'd use it for.

Posting as a guest. Plain text, 1,000 characters max.

Already built nearby

Closest projects by meaning and shared words. Similar isn't the same as copied: read them.

AgentPay

AI agents discover, evaluate, and autonomously pay the best AI service using ENS, Graph & Hedera.

Agent-Verify

Trust layer for AI agents: ENS identity, on-chain execution proof, and decentralized storage.

Alt Agent

Pay-per-inference AI on Hedera. x402 micropayments auto-routed to the cheapest capable model.