Janusjanus
Hedera Testnet (EVM 296) · 6-Decimals HTS USDC · Verified

Task-Bound Budgets.Sovereign Agent Recovery.

Moneybelongstothetask,nottheagent.JanusgivesautonomousAIworkerstemporaryspendingauthoritywithonchainepochfencing,durabledeliverablecaching,andzerodouble-chargerecovery.
Launch DashboardExplore Architecture
§0 BytesCryptographic Envelope
Ø0 ReplaysZero Double-Debit Proof
∑0 LedgersDistinct Accounting States
✓0%Independent Owner Exit
Interactive Story · What Janus Actually Does

TheLifeofanAutonomousTask

Follow how Janus protects your capital when an AI agent executes real financial operations, crashes midway, and safely resumes.

Act 01 · Task Isolation

Never Give an AI Agent Your Credit Card

Lock spending to a single task instead of an open-ended wallet

Giving an autonomous agent a corporate card or private key invites runaway costs. Janus deposits capital into an onchain Hedera treasury contract with an immutable cap. The agent can spend within its allocation—and not a single cent more.

Task ID 0x4a9b... strictly isolated. No access to other tasks or owner wallet.
Onchain Ledger State

Task Provisioned · Cap 100 USDC

EPOCH 01
Spent: 0 USDCReserved: 0 USDCAvailable: 100 USDC
Live Wire Signal:
Task Deposit: 100 USDC Locked on Hedera
Owner Wallet
ACTIVE ROOT
Depositing 100 USDC task cap
Hedera Treasury
EVM CHAIN 296
EPOCH 01 · Vault Active · HTS USDC 0.0.429274
Worker A (Primary)
STANDBY
Authorized for Task 0x4a9b
Durable Cache
FSYNC DISK
Waiting for valid 96-byte envelope
Deterministic Handoff Engine · CONTEXT.md

SeeanAgentCrashandResumptioninAction

When an autonomous worker times out after payment, Janus increments the onchain epoch. The old worker is immediately fenced from new commitments, while the replacement worker recovers previously paid deliverables without paying twice.

Worker A Running (Epoch 01)
Worker A (Primary)EPOCH 01

Financial Analyst Agent

Spent on Deliverable20.00 USDC
In-Flight Lock10.00 USDC
✓ Authorized for 96-byte envelope operations
Epoch Transition
Worker B (Replacement)STANDBY

Failover Agent Ready

Available Budget70.00 USDC
Duplicate Debits0.00 USDC
Idle waiting for epoch fence increment
Immutable Deliverable Cache: Worker A is currently active under Epoch 01. Budget: 20 spent, 10 reserved, 70 available.
SHA-256: 0x7f4b...3a19
Real-Time Invariants · Automated Consensus

Telemetry&DynamicStability

Watch continuous settlement verifications and real-time state projections. The accounting oracle continuously matches chain state against the independent reference model.

Verified Settlement Latency

120 ms

Hedera Testnet 296
HTS USDC Base Units (0.02 Spend Proof)2-Block Confirmation Depth
Autonomous Invariant Radar

6-Axis Proof Boundaries

JanFebMarAprMayJun
INDEX
100 fixed-seed differential traces passed
Live Onchain Settlement Stream
Polling Pinned Hedera Mirror
19:54:12Task 0x8a2f: Settlement confirmed 0.02 USDCHedera Testnet
19:54:05Worker A timeout detected (30s heartbeat lost)Epoch 01 -> 02
19:53:50Deliverable 0x4c9b retrieved from durable fsync cacheZero Double-Charge
19:53:18Owner direct recovery check verified: 9 Phase-1 scenariosSmart Contract Exit
Independent Oracle · Invariant Verified

FiveDistinctQuantities.ZeroAmbiguity.

Available, reserved, spent, released-to-reserve and withdrawn are distinct physical balances. Cancellation never refunds settled purchases or invalidates existing reservations.

100TOTAL TASK CAP (UNITS) · EPOCH 02
Spent20Settled deliverables
Reserved10In-flight locks
Available70Unallocated budget
Live State Transition Simulator
Initial state: 100 cap, 20 spent, 10 reserved -> 70 available.
✓

Reservation Inviolability

In-flight commitments survive task cancellation and worker transitions until expiry or merchant settlement.

✓

Deterministic Reconciliation

Unknown payment outcomes require onchain receipt verification before retrying to prevent double debiting.

✓

Fenced Worker Epochs

Incrementing the epoch fencing counter invalidates signatures from disconnected workers immediately.

✓

Mathematical Conservation

Cap = Available + Reserved + Spent + Released. Derived balances conform to the independent reference oracle.

Wire Specification · ARCHITECTURE.md

The96-ByteCryptographicEnvelope

Click each slot in the envelope below to inspect how task isolation, operation uniqueness, and attempt replay protection are packed into 96 contiguous bytes.

01

Merchant Quote Generation

Merchant issues a cryptographically signed quote pinning price, expiration timestamp, and deliverable schema.

02

96-Byte Envelope Packaging

Worker signs the structured 96-byte envelope binding spending directly to the active task ID and current epoch.

03

Onchain Settlement & Verification

Smart contract verifies worker authorization, decrements reservation, transfers funds, and commits settlement intent.

04

Fsynced Immutable Result Storage

Deliverables are fsynced to disk. If connection drops after payment, replacement worker recovers output without repayment.

Authorization Inspector

96 BYTES TOTAL
Task ID (32 Bytes)Isolated budget ceiling & allocation identifier
bytes32 [0..32]
Operation ID (32 Bytes)Canonical hash of deliverable & merchant intent
bytes32 [32..64]
Attempt Counter (32 Bytes)uint64 retry attempt with 24-byte zero padding
uint256 [64..96]
// Slot 1: Task ID (0..32 bytes)
// Prevents cross-task contamination.
// Spending is strictly scoped to:
bytes32 taskId = 0x4a9b23f81e04c81099fecb894103194a; // Cap: 100 USDC
Repository Topology · 4 Decoupled Packages

Janus Module Ownership

frontend/

Next.js Application

Owns Next.js 16 app router, Privy authentication identity plumbing, Apple glass dashboard, and live telemetry projections.

Next.js 16TurbopackPrivy Auth
backend/

Hedera Services

Owns HTTP merchant/facilitator, Hedera utilities, fsynced result cache, checkpoint runner, and fail-closed signer locks.

Hedera SDKFsync StoreCheckpoint Runner
contracts/

Solidity Treasuries

Owns Phase-0 bounded payment probe and Phase-1 multi-task treasury contracts, isolated test suites, and compiler scripts.

Solidity 0.8.24Hedera EVM 296HTS USDC
shared/

Protocol Specification

Common context across modules: Hedera network config, canonical 96-byte wire rules, versioned ABI, and accounting oracle.

protocol.mjsnetwork.jsonOracle Model
End-to-End Transaction SequenceARCHITECTURE.md §Integration
Step 01Owner WalletConnects via Privy to establish operator identity. Deposits base capital into treasury.
Step 02Autonomous WorkerSigns 96-byte envelope binding task ID, operation ID, and attempt under active epoch.
Step 03Hedera TreasurySmart contract settles payment, decrements reservation, and emits Paid receipt.
Step 04Durable DeliveryMerchant fsyncs result. Any interrupted worker recovers deliverable without double-charge.
Independent Exit · RECOVERY.md

OwnerRecoveryWithoutApplicationBackend

Your identity connects you to the workspace; your wallet remains the root of onchain authority. If Janus servers disappear, capital recovery executes directly through smart contract calls.

Traditional Agent Architectures

Centralized API Key Risk

  • ✕ Blanket corporate card access without per-task isolation
  • ✕ Lost agent responses require manual dispute or double payment
  • ✕ Server downtime traps all capital in third-party databases
  • ✕ Disconnected agents can continue draining unallocated balances
Janus Cryptographic Guarantees

Hardware-Level Owner Sovereignty

  • ✓ Strict spending ceilings enforced by onchain smart contracts
  • ✓ Automatic result durability protects against double-charge upon retry
  • ✓ Direct owner recovery executes via independent CLI without app servers
  • ✓ Epoch increment revokes rogue workers within a single transaction
Direct Smart Contract Exit Tools
ZERO MIDDLEWARE REQUIRED

The CLI in contracts/phase1/scripts/recover.mjs and static recovery browser bundle in contracts/phase1/artifacts/recovery-browser/ verify deployment identity, chain RPC, and token contract directly with your wallet.

# Step 1: Read-only recovery plan inspection (verifies chain, runtime hash & owner) npm run recovery:plan -- ../shared/deployments/hedera-testnet.json TASK_ID OP_ID # Step 2: Atomic execution (cancels task, expires reservations, releases available balance & withdraws reserve) npm run recovery:plan -- ../shared/deployments/hedera-testnet.json TASK_ID OP_ID --execute
Verified Test Suite · Node 22 CI

Phase-VerifiedFinancialPrimitives

All contract scenarios, accounting invariants, merchant HTTP adapters, and recovery paths are verified locally with reproducible differential traces.

Phase 0 Verified

Bounded Spend Core

Bounded spend approvals, owner recovery without middleware, and restricted single-payer authorization in Solidity.

Phase 1 Verified

Multi-Task Treasury

Isolated task caps, reservation management, single settlement invariant, and epoch worker fencing.

Adapter Verified

96-Byte Envelope SDK

Canonical wire serialization, merchant quote validation, fsynced result store, and restart resilience.

Oracle Verified

Accounting Model

100 fixed-seed differential traces verifying mathematical conservation of available, reserved, and spent units.

Live Hardening Verified

Hedera Settlement

2-block confirmation depth, 500k gas ceiling, cached receipt reconciliation, and 20,000 USDC testnet proof.

Runner Verified

Checkpointed Resumption

Local 4-task runner with deterministic worker crash, epoch handoff, and zero double-charge result reuse.

Stop worrying about rogue agent spend.

Put your autonomous AI workflows on a provable, revocable budget. Built on Hedera testnet with guaranteed zero duplicate debits.

HEDERA TESTNET (CHAIN 296) · 6-DECIMALS HTS USDC · SOVEREIGN AGENT RECOVERYNode 22 Verified · Independent Accounting Oracle