Janus powers AI agents with onchain budgets, x402 payments, and checkpointed agent handoffs.
**Janus is a financial recovery layer for AI agent workflows, built to prevent worker failures from causing duplicate purchases, lost paid results or uncontrolled spending. It targets teams whose agents buy tools, data and services through separately authorized payments.
The market context shows growing adoption alongside operational risk: McKinsey’s 2025 survey found 23% of respondents’ organizations were scaling agentic AI and another 39% were experimenting. Gartner forecast that over 40% of agentic AI projects would be cancelled by the end of 2027, citing escalating costs, unclear value and inadequate risk controls. These figures establish the broader problem; they do not measure losses specifically caused by payment recovery failures. M, G
Janus’s research examined durable orchestration, payment idempotency, agent wallets and stale-worker protection. Its technical approach connects these mechanisms: budgets belong to tasks, Solidity contracts enforce spending limits and pending obligations, worker epochs revoke obsolete authority, and durable purchase records let replacements reuse paid results. Checkpoints preserve progress, Arkiv supplies replacement discovery, and an independent recovery client preserves owner access to available funds.
Recorded improvements are concrete but bounded:
Customer-level cost savings and percentage improvements over existing systems still require comparative pilots.
Technology stack: We built the dashboard with Next.js 16, React 19, TypeScript and Tailwind CSS. Node.js 22 runs the backend and agent processes, while Solidity 0.8.30 and OpenZeppelin components power the treasury. Viem handles contract reads, transactions and receipt verification.
Agent orchestration: A detached supervisor launches parallel worker processes, coordinates model requests and saves checkpoints, artifacts and activity events. Closing the browser does not stop execution. Workers receive neither provider API keys nor signing tools; the supervisor manages those capabilities.
Authentication and credentials: Privy provides wallet sign-in, with server-side verification keeping runs and configurations account-specific. Provider keys are encrypted using AES-256-GCM with identity-bound data. Application login remains separate from permission to spend task funds.
Task-owned budgets: Contracts track available, reserved and spent funds for each task. Reservations count against the budget before settlement, preventing concurrent purchases from overspending. Funds stay with the task when its worker changes.
Safe replacement: Every assignment has an increasing epoch number. Reassignment advances it, blocking new commitments from the previous worker while preserving existing payment obligations. The replacement continues with the actual remaining budget.
Preventing duplicate payments: Each purchase has a stable operation ID that survives replacement. The merchant stores transaction receipts, purchased results and SHA-256 hashes; the replacement retrieves and verifies the original result. Ambiguous payment outcomes enter reconciliation before another transaction is attempted.
Partner integrations: Hedera provides contract execution and token settlement. Arkiv supplies public, expiring worker profiles for replacement discovery; Janus separately checks readiness and spending authority. We also implemented a separate HTTP payment endpoint using the official Hedera x402 SDKs.
Notable engineering: An assignment outbox records intent before reassignment and reconciles chain state if the acknowledgement disappears. Per-signer queues prevent transaction nonce collisions, while synchronized file writes and atomic rename preserve checkpoints and payment records across supported restarts.
Independent recovery: A CLI and downloadable static browser client share the same recovery core. Owners can validate the deployment and recover available funds directly through their wallet, without the Janus backend. Local browser tests exercised recovery after the dashboard stopped.
Evidence and testing: A local four-task handoff completed five unique purchases totalling 100 base units, reused the interrupted task’s paid result and kept three other tasks progressing. A separate Hedera testnet proof settled 0.02 test-USDC and reused the same transaction on replay. Ganache, Playwright, Node tests and an independent accounting model verify these behaviors; production reliability remains under development. ̑

