pip install to a decision visible on the dashboard. Pick the SDK you prefer; the REST API is the same underneath.
The tokens used below (
pq_test_demo_key_REPLACE_ME, agent_1, customer
IDs) are placeholders. Replace them with values from your Precipiq
dashboard before copy-pasting into real code.Prerequisites
- A Precipiq API key — grab one from the dashboard.
Keys look like
pq_live_...(production) orpq_test_...(sandbox). - Python 3.12+ or Node 18+.
- 30 seconds of network access to
api.precipiq.dev.
Steps
Log your first decision
Create a client and call Run the script. You should see a UUID and a 64-character SHA-256 hash
printed to stdout within ~200 ms.
log_decision / logDecision. The call returns a
receipt containing the decision’s UUID and its position on the hash chain.See it in the dashboard
Open dashboard.precipiq.dev, sign in with
the same API key, and the decision appears at the top of the Decisions
timeline — usually within one second of the SDK call, thanks to the
dashboard’s WebSocket stream.You should see a row whose timestamp matches the
receipt.timestamp your
SDK call just returned, with the pricing-bot agent label and a confidence
badge at 82%.Wrap a function with track
In production you rarely call
log_decision directly. Instead, wrap the
function that makes the decision — the SDK captures inputs, outputs, and
any exception automatically.Link the decision to a financial outcome
When the customer gets charged — via a Stripe webhook, an internal event,
or any other billing system — link the decision to the resulting financial
event so the AI P&L can attribute dollars.For events that come from Stripe, the built-in webhook receiver auto-creates
the financial event and the attribution engine proposes the link — see the
Stripe integration guide.
Next: understand the data model
Concepts — the six record types and how they compose.