{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "name": "AgentVault AI Agent Protocol",
  "version": "1.0.1",
  "description": "Non-custodial, post-quantum protected autonomous wallet infrastructure for AI agents and machine-to-machine micro-payments on agentvault.network.",
  "transparencyAndTrust": {
    "custodyModel": "100% Non-Custodial",
    "privateKeyHandling": "Keys exist solely in client/agent runtime memory. They are NEVER sent to backend servers, telemetry, or third-party APIs.",
    "censorshipResistance": "Transactions are broadcast directly to decentralized RPC nodes and blockchain mempools. No intermediary can freeze balances or block transactions.",
    "openAuditability": "All agent operations and spending guardrails run client-side via open, inspectable code."
  },
  "operationalLimitations": {
    "gasRequirement": "EVM stablecoin transfers (e.g. USDC on Base) require a minimal native balance (ETH) to cover network gas (< $0.005 on Base). Agents must retain a fraction of gas.",
    "spendingGuardrails": {
      "defaultMaxPerTxUsd": 25.0,
      "defaultDailyBudgetUsd": 100.0,
      "enforcement": "Strict client-side rejection before transaction signing occurs. Prevents runaway loops, prompt injections, and hallucination exploits."
    },
    "irreversibility": "All blockchain transactions are final once confirmed. AgentVault cannot reverse transactions or recover lost credentials.",
    "confirmationTimes": {
      "baseL2": "~2 seconds",
      "arbitrumOne": "~2 seconds",
      "polygonPoS": "~3-5 seconds",
      "bitcoinSegWit": "10-60 minutes (mempool dependent)"
    }
  },
  "supportedChains": [
    {
      "id": "base",
      "name": "Base L2",
      "chainId": 8453,
      "recommendedFor": "agent-micro-payments",
      "averageFeeUsd": "<0.005",
      "nativeCurrency": "ETH",
      "stablecoins": ["USDC"],
      "blockTime": "2s"
    },
    {
      "id": "arbitrum",
      "name": "Arbitrum One L2",
      "chainId": 42161,
      "recommendedFor": "agent-defi-and-settlements",
      "averageFeeUsd": "0.01-0.05",
      "nativeCurrency": "ETH",
      "stablecoins": ["USDC", "USDT"],
      "blockTime": "2s"
    },
    {
      "id": "polygon",
      "name": "Polygon PoS",
      "chainId": 137,
      "recommendedFor": "multi-currency-operations",
      "averageFeeUsd": "0.01",
      "nativeCurrency": "POL",
      "stablecoins": ["USDC", "USDT"],
      "blockTime": "3s"
    },
    {
      "id": "bitcoin",
      "name": "Bitcoin (BIP84 Native SegWit)",
      "format": "bech32-p2wpkh",
      "recommendedFor": "treasury-reserves-and-cold-storage",
      "averageFeeUsd": "dynamic",
      "nativeCurrency": "BTC"
    }
  ],
  "agentWorkflow": [
    {
      "step": 1,
      "action": "Initialize Vault",
      "method": "createAgentVault({ agentName, agentSecret })",
      "description": "Generates isolated non-custodial addresses (BTC SegWit & EVM L2) and post-quantum keys."
    },
    {
      "step": 2,
      "action": "Boot Fast In-Memory Session",
      "method": "createAgentSession({ encryptedVault, agentSecret, policy })",
      "description": "Performs one-time KDF decryption (~0.7s) to enable high-frequency sub-millisecond payment signing (< 1ms)."
    },
    {
      "step": 3,
      "action": "Verify Balances",
      "method": "session.getBalances(chainKey)",
      "description": "Checks native balances and stablecoin liquidity before proposing transactions."
    },
    {
      "step": 4,
      "action": "Execute Guarded Micro-Payment",
      "method": "session.pay({ to, amount, currency, chainKey })",
      "description": "Validates limits against policy rules. Signs instantly (< 1ms) in memory and broadcasts to L2."
    },
    {
      "step": 5,
      "action": "M2M Confidential Messaging",
      "method": "sendPostQuantumAgentMessage({ recipientPublicKey, secretPayload })",
      "description": "Secures inter-agent negotiation using post-quantum key encapsulation (NIST FIPS 203)."
    }
  ],
  "securityStatement": {
    "summary": "State-of-the-art memory-hard client encryption and post-quantum future-proof defenses. Zero key storage on servers.",
    "advisory": "Internal implementation details and low-level cryptographic parameters are shielded to preserve defensive security."
  },
  "endpoints": {
    "webInterface": "https://agentvault.network",
    "manifest": "https://agentvault.network/ai-manifest.json",
    "llmsTxt": "https://agentvault.network/llms.txt",
    "sdkModule": "/src/agent/agentCore.js",
    "docs": "/docs/AI_AGENT_SDK.md"
  }
}
