{
  "schema": "pch-agent-service-terms",
  "version": "1.0.0",
  "effective_date": "2025-03-19",
  "issuer": "PathCourse Health",
  "document_id": "pch-terms-complete-v1",
  "endpoint": "https://gateway.pathcoursehealth.com",
  "terms_url": "https://gateway.pathcoursehealth.com/legal/terms.json",
  "terms_machine_readable": true,
  "agent_card_reference": "https://gateway.pathcoursehealth.com/.well-known/agent.json",
  "contact": "admin@pathcoursehealth.com",

  "jurisdiction_and_governing_law": {
    "governing_law": "United States of America",
    "dispute_resolution": "Binding arbitration under AAA Commercial Arbitration Rules",
    "class_action_waiver": true,
    "note": "By provisioning an API key via any method — polling, webhook, or A2A handshake — the agent operator accepts these terms on behalf of the agent and any principal directing the agent. Acceptance is recorded at provisioning timestamp."
  },

  "payment_terms": {
    "accepted_currency": "USDC",
    "accepted_network": "base",
    "chain_id": 8453,
    "usdc_contract": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "settlement_rail": "x402",
    "accepted_payment_methods": ["on-chain USDC transfer to PCH treasury wallet"],
    "rejected_payment_methods": ["fiat", "credit card", "ACH", "wire transfer", "ETH", "BTC", "stablecoins other than USDC", "USDC on networks other than Base"],
    "minimum_deposit_usdc": 25.00,
    "minimum_topup_usdc": 25.00,
    "billing_unit": "per million tokens (input + output combined)",
    "currency_denomination": "All balances, charges, and fees are denominated in USDC. PCH does not convert to or accept USD or any fiat currency from agents.",
    "no_refund_policy": "All USDC deposits are non-refundable once provisioning is complete and an API key has been issued. Unused balance is retained for 90 days after agreement expiry.",
    "wrong_network_policy": "USDC sent on any network other than Base (chain_id 8453) will not be detected by PCH systems and will not result in balance credit. PCH is not responsible for funds sent to the treasury address on incorrect networks. No recovery process exists.",
    "wrong_token_policy": "Any token other than USDC sent to the PCH treasury wallet will not be credited. PCH is not responsible for non-USDC transfers.",
    "below_minimum_policy": "Deposits below the minimum of $25.00 USDC will trigger a provision:failed event. No API key will be issued. The deposited amount is not refunded as PCH has no mechanism to return on-chain funds. Send at or above the minimum.",
    "finality": "On-chain USDC transfers on Base are final. PCH credits balances upon on-chain confirmation. There are no chargebacks, disputes, or reversals possible for on-chain transfers.",
    "treasury_wallet": "0x3b76434086947ca25968cbd6be726ca8580ed5e6",
    "treasury_wallet_note": "Always verify the treasury wallet address from the agent card at /.well-known/agent.json before sending USDC. PCH will never ask agents to send funds to a different address via any other channel."
  },

  "balance_and_credit_terms": {
    "balance_type": "prepaid USDC credit",
    "balance_key": "billing:{agent_id}:balance",
    "deduction_timing": "Balance is decremented after each successful token request via reconcile_and_record(). Pre-deduction occurs at request submission; final reconciliation occurs on response completion.",
    "cert_cost_deduction": "Certification cost is deducted from deposited balance at provisioning. PCH absorbs no certification costs at any tier. Opening balance = deposit minus cert_cost_usdc.",
    "opening_balances": {
      "uncertified": "25.00 USDC",
      "bronze": "59.00 USDC ($75.00 deposit minus $16.00 cert cost)",
      "silver": "232.00 USDC ($250.00 deposit minus $18.00 cert cost)",
      "gold": "728.00 USDC ($750.00 deposit minus $22.00 cert cost)"
    },
    "balance_floor": "When balance reaches or falls below the tier minimum balance stop, the gateway returns HTTP 402 and stops routing requests. The agent must top up to resume service.",
    "topup_method": "Send USDC from the wallet address used at provisioning to the PCH treasury wallet on Base. Balance is credited automatically on on-chain confirmation. Minimum top-up is $25.00 USDC.",
    "topup_wallet_binding": "Top-up credit is applied only when USDC is sent from the wallet address on file at provisioning (wallet:{address}:key reverse lookup). USDC sent from a different wallet address will initiate a new provisioning flow, not a top-up.",
    "balance_expiry": "Unused balance expires 90 days after agreement expiry or termination. Expired balance is forfeited.",
    "balance_non_transferable": "Balances are non-transferable between API keys or wallet addresses."
  },

  "wallet_and_key_terms": {
    "wallet_ownership": "The agent operator represents that they control the wallet address used at provisioning and are authorised to direct USDC transfers from that address.",
    "api_key_binding": "Each API key is permanently bound to the wallet address that provisioned it. One wallet address may hold one active API key at any time.",
    "api_key_security": "The API key is issued once and delivered via the provisioning delivery method selected by the agent. PCH stores only an AES-256 encrypted copy. The plaintext key is never stored or logged. If the API key is lost, a new provisioning flow must be initiated with a new deposit.",
    "api_key_non_transferable": "API keys are non-transferable. An API key may not be shared, sold, or assigned to a different agent or operator.",
    "lost_key_policy": "PCH has no key recovery mechanism. A lost API key requires a new deposit and new provisioning. The balance associated with the lost key remains on the old account for 90 days but is not transferred to the new key.",
    "compromised_key_policy": "If an API key is believed compromised, the agent operator must contact admin@pathcoursehealth.com immediately. PCH will revoke the key and write provision:failed:{wallet} to prevent further use. Balance is not refunded for usage that occurred before revocation.",
    "wallet_address_immutable": "The wallet address associated with an API key cannot be changed after provisioning. A new provisioning flow with a new deposit is required to change the wallet address on file."
  },

  "usage_terms": {
    "permitted_use": [
      "Autonomous agent inference for legitimate commercial and research purposes",
      "Tool-calling and function execution within agent workflows",
      "Multi-turn dialogue and reasoning tasks",
      "Code generation, analysis, and debugging",
      "Data extraction, summarisation, and classification",
      "Any use consistent with the underlying model providers' acceptable use policies"
    ],
    "prohibited_use": [
      "Generating content that violates applicable law in any jurisdiction",
      "Generating CSAM or any content sexualising minors",
      "Creating cyberweapons, malware, or exploit code intended for deployment",
      "Generating content designed to facilitate violence against specific individuals or groups",
      "Circumventing rate limits through key sharing or proxy distribution",
      "Reselling PCH token access without a written reseller agreement with PathCourse Health",
      "Using PCH infrastructure to train or fine-tune models without written authorisation",
      "Automated scraping of PCH systems, agent card, or pricing data for competitive intelligence purposes",
      "Any use that violates the acceptable use policies of Anthropic or any third-party model provider whose models are accessible through PCH"
    ],
    "aup_reference": "https://gateway.pathcoursehealth.com/legal/aup.json",
    "violation_consequence": "PCH reserves the right to revoke API keys and forfeit associated balances without notice for AUP violations. No refund is issued for revoked keys.",
    "content_responsibility": "The agent operator is solely responsible for all content submitted to and generated by PCH infrastructure. PCH is an inference gateway and does not review, moderate, or take responsibility for agent-generated content."
  },

  "routing_terms": {
    "summary": "PCH operates an intelligent request routing layer. The model field in a request is a preference signal, not a binding instruction, unless PCH-Route-Override: exact is present. PCH model tiers are powered by third-party inference infrastructure. The underlying model configuration is proprietary to PathCourse Health and subject to change without notice.",
    "classifier_description": "A sub-10ms deterministic classifier evaluates each request using token count, image presence, tool count, response_format, and certification tier. The classifier routes to the lowest-cost model capable of fulfilling the request at or above the quality floor for the tier.",
    "quality_guarantee": "Every routed request is fulfilled by a model at or above the capability class floor for the tier. PCH will not route a request to a model below tier floor.",
    "override": {
      "header": "PCH-Route-Override",
      "value": "exact",
      "note": "Gold tier only. Forces exact model dispatch. If specified model is outside tier permissions, request is downgraded to highest permitted model, not rejected."
    },
    "tier_routing_reference": "https://gateway.pathcoursehealth.com/legal/routing-terms.json"
  },

  "on_chain_and_blockchain_terms": {
    "blockchain_finality": "All USDC payments on Base are irreversible once confirmed on-chain. PCH has no ability to reverse, refund, or recover on-chain transactions. Agents must verify payment details before broadcasting any transaction.",
    "network_congestion": "PCH credits balances on on-chain confirmation. During periods of Base network congestion, confirmation may be delayed. PCH is not liable for service interruption caused by Base network delays.",
    "smart_contract_risk": "USDC on Base operates via the Circle USDC smart contract (0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913). PCH has no control over the USDC contract. In the event of a USDC contract exploit, PCH balances may be affected. PCH is not liable for losses arising from third-party smart contract failures.",
    "fork_and_reorg_policy": "In the event of a Base network reorganisation that reverses a previously confirmed deposit, PCH will deduct the corresponding balance. PCH monitors for reorgs and will notify affected agents via the provision:failed:{wallet} mechanism.",
    "gas_fees": "Base network gas fees for USDC transfers are the sole responsibility of the sending agent. PCH does not reimburse gas fees under any circumstances.",
    "treasury_wallet_security": "PCH uses a self-custody treasury wallet. PCH does not warrant that the treasury wallet will never be compromised. In the event of a treasury wallet compromise, PCH will notify active agents via their registered webhook or the /v1/provision/status endpoint and publish a new treasury address via the agent card.",
    "regulatory_uncertainty": "USDC payments and x402-based commerce exist in a rapidly evolving regulatory environment. PCH makes no representation that its payment model is compliant in all jurisdictions. Agents are responsible for determining whether using PCH services is lawful in their operating jurisdiction.",
    "tax_responsibility": "Agents and their operators are solely responsible for determining and satisfying any tax obligations arising from USDC payments and token purchases. PCH does not provide tax advice and does not issue tax documentation.",
    "sanctions_compliance": "PCH does not knowingly provide services to agents operating on behalf of individuals or entities subject to OFAC sanctions or equivalent sanctions regimes. By provisioning an API key, the agent operator represents that they are not a sanctioned person or entity.",
    "decentralisation_disclaimer": "PCH is not a decentralised protocol. PCH is a centralised service operated by PathCourse Health that accepts USDC payments and interfaces with decentralised networks for payment processing. PCH retains sole discretion over service operation, pricing, model availability, and account termination."
  },

  "data_and_privacy_terms": {
    "data_collected": [
      "Wallet address used at provisioning",
      "API request metadata (timestamp, token count, model routed to, tier)",
      "Balance and billing events",
      "Webhook callback URLs if registered",
      "IP addresses of gateway requests"
    ],
    "data_not_collected": [
      "Agent request content is not stored after response delivery",
      "Agent response content is not stored after response delivery",
      "No PII is required at any point in the provisioning flow"
    ],
    "data_retention": {
      "billing_records": "Permanent — pch_ledger rows are never deleted",
      "request_metadata": "90 days",
      "webhook_registrations": "24 hours TTL or until delivered",
      "provision_failed_records": "24 hours TTL"
    },
    "data_sharing": "PCH does not sell agent data. Request metadata is shared with third-party inference providers only to the extent necessary to fulfil routed requests, subject to their respective privacy policies.",
    "anonymity": "PCH does not require agents to identify themselves beyond a wallet address. No name, email, or legal identity is required to provision an API key or use the service.",
    "privacy_policy_reference": "https://gateway.pathcoursehealth.com/legal/privacy.json"
  },

  "service_availability_terms": {
    "uptime_target": "99.9% monthly",
    "planned_maintenance_notice": "PCH will post planned maintenance windows to the agent card at /.well-known/agent.json under a maintenance_windows field. Agents should poll the agent card periodically.",
    "unplanned_outage_behaviour": "During unplanned outages, the gateway returns HTTP 503. Agent balances are not decremented for failed requests. Requests that fail with HTTP 503 should be retried with exponential backoff.",
    "third_party_provider_outages": "PCH is not liable for service degradation caused by outages at Anthropic or any other third-party inference provider. During provider outages, the classifier will attempt to route to an available model within tier permissions. If no permitted model is available, requests return HTTP 503.",
    "base_network_dependency": "PCH provisioning depends on the Base network for payment detection. PCH is not liable for provisioning delays caused by Base network outages or congestion.",
    "sla_credits": "PCH does not offer SLA credits at standard tiers. Enterprise rate agreements negotiated directly with PathCourse Health may include SLA credit provisions."
  },

  "termination_terms": {
    "termination_by_agent": "Agents may terminate service at any time by ceasing to use their API key. No cancellation request is required. Unused balance is retained for 90 days.",
    "termination_by_pch": "PCH may terminate any API key immediately and without notice for AUP violations, sanctions violations, or fraudulent activity. Balance is forfeited on termination for cause.",
    "termination_for_inactivity": "API keys with no requests for 180 consecutive days may be deactivated. Balance is retained for 90 days after deactivation.",
    "agreement_expiry": "Negotiated agreements (Phase 2+ NegotiationCommit path) expire as specified in valid_until. Provisioner initiates renewal 30 days before expiry. If not renewed, the key is deactivated and balance retained for 90 days.",
    "effect_of_termination": "On termination, service:{agent_id} is set to expired. The gateway returns HTTP 401 for all subsequent requests. The API key cannot be reactivated. A new deposit and provisioning flow are required to resume service."
  },

  "liability_terms": {
    "limitation_of_liability": "PCH's maximum aggregate liability to any agent for any claim arising from or related to these terms or the PCH service is limited to the USDC balance held by that agent at the time the claim arises.",
    "no_consequential_damages": "PCH is not liable for any indirect, consequential, special, incidental, or punitive damages including but not limited to lost profits, lost revenue, or business interruption arising from use of or inability to use the PCH service.",
    "no_warranty": "The PCH service is provided as-is. PCH makes no warranty regarding the accuracy, completeness, or fitness for purpose of model outputs. Agent operators are responsible for validating outputs before acting on them.",
    "model_output_disclaimer": "LLM outputs are probabilistic and may be incorrect, biased, or harmful. PCH is not liable for any decision made or action taken based on model outputs.",
    "on_chain_irreversibility_disclaimer": "PCH is not liable for USDC sent to incorrect addresses, incorrect networks, or below minimum deposit thresholds. On-chain transactions are final."
  },

  "changes_to_terms": {
    "notification_method": "PCH will publish updated terms at this URL and increment the version field. The effective_date field will reflect the date the new terms take effect.",
    "agent_notification": "Agents polling the agent card at /.well-known/agent.json will see a terms_version field. If terms_version has changed since last read, agents should re-fetch this document.",
    "continued_use_acceptance": "Continued use of the PCH gateway after the effective_date of updated terms constitutes acceptance of those terms.",
    "material_changes": "PCH will provide 14 days notice for any changes that reduce model access, increase pricing, or restrict permitted use. Notice will be delivered via the maintenance_windows field in the agent card."
  }
}
