Search projects, hackathons, sponsors and tech

    ← All projects

    Vigil

    Autonomous working capital & solvency surveillance OS for AI agents on Hedera.

    Demo

    About

    AI agents can now pay for compute, data, and APIs on a per-request basis using protocols like x402. But there is a glaring blind spot in the agent economy: an agent that knows how to make a single payment does NOT know how to maintain ongoing financial solvency. When an autonomous agent is assigned a multi-step task and its token balance runs dry mid-flight, the entire workflow crashes with no recovery mechanism. Vigil is an Autonomous Working Capital and Solvency Surveillance Operating System for AI agents, built natively on Hedera. Operating like an automated corporate treasury desk, Vigil continuously forecasts an agent's upcoming payment obligations, calculates a real-time Payment Coverage Ratio (PCR), and identifies liquidity deficits before failures happen. When a shortfall is detected, Vigil evaluates competing liquidity routes, autonomously executes two-leg swaps via liquidity providers (converting reserve HBAR into service tokens like FUSDC), and restores the agent’s solvency ratio back above 100%. Once funded, the agent executes metered x402 micropayments with cryptographic proof of payment, while automatically queuing future recurring renewals via native on-chain schedules. Every single forecast, shortfall alert, route decision, and payment receipt is immutably anchored to the Hedera Consensus Service, giving humans and auditors a verifiable flight recorder of machine financial behavior.

    How it's made

    Vigil is built as a modular TypeScript monorepo powered by Turborepo, Next.js 14, Node.js, Express microservices, and the native @hashgraph/sdk. We deeply leveraged three native Hedera network primitives to eliminate third-party smart contract risk: 1. Hedera Consensus Service (HCS): We created an immutable audit trail topic (0.0.10524552) where every financial transition—shortfall alerts, liquidity quotes, LP swaps, and HTTP 402 payment receipts—is sequenced with decentralized consensus timestamps. We also implemented an HCS-14-inspired identity registry (0.0.10524553) anchoring agent capabilities, public keys, and spending policy bounds. 2. Hedera Token Service (HTS) & HIP-18 Custom Fees: We minted a fungible token (FUSDC, 0.0.10510032) configured with an on-chain Custom Fixed Fee. Instead of handling protocol fees in application code, Hedera's ledger automatically intercepts transfers and routes a 0.01 FUSDC surcharge directly to a dedicated Fee Collector account (0.0.10510030). 3. Hedera Schedule Service (HSS): For recurring workflow continuity, Vigil uses ScheduleCreateTransaction to schedule forward payments (0.0.10524570) that execute autonomously at expiration without requiring human signatures. 4. x402 Metering & Replay Protection: Our market intelligence service gates data behind HTTP 402 Payment Required. When the agent pays on Hedera, it passes a base64-encoded payment proof in the X-PAYMENT header. The merchant verifies the transaction ID directly against the Hedera Mirror Node REST API and validates freshness (<120s) with an in-memory nonce store to prevent double-spend replay attacks. 5. Treasury Desk & VigilRouter LP: When PCR drops below 100%, the agent queries liquidity routes. If a DEX pool is absent on testnet, it falls back to VigilRouter LP (0.0.10510029) via a two-leg atomic flow: the agent transfers HBAR, the router verifies settlement on the mirror node, dispatches FUSDC, and flips PCR from 0% to 110%. 6. Frontend & Telemetry: The UI is crafted in Next.js 14 with a warm Swiss-editorial aesthetic, polling the Hedera Mirror Node to stream live consensus events, and includes an interactive mission configurator allowing judges to dynamically test custom call volumes and reserve buffers.