> ## Documentation Index
> Fetch the complete documentation index at: https://docs.precipiq.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Precipiq: The AI Consequences Ledger

> Precipiq records every AI agent decision and links it to its dollar outcome on an immutable, hash-chained ledger. Audit, attribute, and defend.

Precipiq is the financial accountability layer for production AI. Every decision your agents make — a discount offered, a refund approved, an email sent — is recorded on an append-only, hash-chained ledger and linked to its downstream dollar consequence: revenue earned, cost incurred, or liability opened. The result is a forensically auditable trail from "the model said X" to "the customer was charged Y."

<CardGroup cols={2}>
  <Card title="Quick Start" icon="rocket" href="/quickstart">
    Install the SDK, log your first decision, and see it on the dashboard in five minutes.
  </Card>

  <Card title="Core Concepts" icon="book-open" href="/concepts/decision-records">
    Understand Decision Records, Financial Events, Consequence Links, and the Hash Chain.
  </Card>

  <Card title="REST API Reference" icon="code" href="/api-reference">
    Full endpoint reference with interactive try-it forms and multi-language code samples.
  </Card>

  <Card title="Integrations" icon="plug" href="/integrations/stripe">
    Connect Stripe, QuickBooks, LangChain, and CrewAI to your Precipiq ledger.
  </Card>
</CardGroup>

## How Precipiq works

<Steps>
  <Step title="Log a decision">
    When your AI agent picks an action, the SDK writes a **Decision Record** — inputs, outputs, confidence score, and a human-in-loop flag — to the append-only ledger.
  </Step>

  <Step title="Chain the record">
    Each record hashes its predecessor's hash into its own `prev_hash` field, creating a tamper-evident chain. A single `verify_chain` call detects any alteration instantly.
  </Step>

  <Step title="Ingest financial events">
    Stripe and QuickBooks webhooks automatically create **Financial Events** when payments clear, refunds fire, or disputes open. You can also POST events directly from your own billing system.
  </Step>

  <Step title="Link and measure">
    The attribution engine connects decisions to events. Your **AI P\&L** dashboard shows live revenue, cost, and open liability attributed per agent — and threshold alerts fire when exposure spikes.
  </Step>
</Steps>

## Why teams choose Precipiq

<CardGroup cols={2}>
  <Card title="Forensic auditability" icon="shield-check">
    Export a cryptographically signed evidence bundle for regulators, auditors, or post-incident review — without depending on production logs.
  </Card>

  <Card title="AI P&L visibility" icon="chart-line">
    Answer "is this AI making or losing money?" with a live dashboard that attributes dollars to specific agents and action types.
  </Card>

  <Card title="Compliance-ready records" icon="scale-balanced">
    Decision records map directly onto EU AI Act Article 12 fields and support U.S. discovery with per-decision queryability and hash-chain integrity proofs.
  </Card>

  <Card title="Drop-in integration" icon="bolt">
    Wrap a function with `@pq.track` or attach a LangChain callback — the SDK handles batching, retries, and fallback logging without touching your transport layer.
  </Card>
</CardGroup>
