AI agents pay per query for live Mumbai flood reports from verified humans; reporters get paid.
During Mumbai's monsoon, a delivery rider can lose an hour—or a vehicle—to a flooded subway that no weather API knows about. Weather data tells an agent it rained. It doesn't tell the agent whether a particular street is passable right now.
KneeDeep is a paid, real-time API for street-level flood conditions, powered by human reports and built for AI agents.
GET /v1/conditions. The endpoint returns HTTP 402, allowing agents to pay 0.1 HBAR per query through x402 on Hedera, using their own account. Responses include the condition, confidence, supporting evidence, and a vehicle passability verdict: safe, risky, blocked, or unknown.The demo runs on testnets and uses clearly labelled simulated scenarios. The CRE demonstration uses the simulator's trusted-sender configuration; production DON signature verification is a separate deployment step.
KneeDeep is a TypeScript monorepo consisting of a NestJS API, PostgreSQL database, Vite + React + Leaflet frontend, standalone dispatch agent, and Chainlink CRE workflow with a Foundry smart contract. A single Docker image runs on Render, with the API serving the web application.
Hedera + x402: The paid conditions endpoint uses @x402/express and @x402/hedera, with the Blocky402 facilitator. The agent signs HBAR payments from its own account using @x402/fetch, with per-query and per-trip spending caps. Invalid requests are not charged. Eligible reporter earnings are paid through the Hiero SDK using batched transfers. Database reservations, pre-generated transaction IDs, advisory locks, and Mirror Node reconciliation protect against duplicate payouts after failures.
Arkiv: Reports and votes are public entities with native TTLs. Votes expire with their associated reports, so evidence expiration is handled by the data layer rather than a cleanup cron job. Agents and independent workflows can inspect the underlying evidence without relying on KneeDeep's API.
World ID: IDKit Proof of Human is used to limit duplicate reporter identities. The relying-party request is signed server-side, legacy proofs are rejected, and the public reporter ID is derived from a salted nullifier hash. The nullifier itself is not stored.
Fusion engine: A deterministic, dependency-free function combines reports and votes. Evidence recency decays with a 45-minute half-life, each human counts once, corroboration follows 1 − 0.5^n, and disputes count against a reported level. Ties resolve toward the more severe condition because routing decisions are safety-critical.
Chainlink CRE: The same fusion logic is compiled into the CRE workflow. Each workflow node reads public Arkiv JSON-RPC data and recomputes area conditions for a shared scheduled timestamp. CRE consensus requires identical canonical results before publishing an attestation to the Sepolia contract. The API compares its condition results against the latest attestation. The current demonstration uses the CRE simulation forwarder with a trusted-sender restriction; production deployment would use the signature-verifying Keystone Forwarder.
Engineering challenges:
127 tests across the API, agent, contract, and workflow.

