1
Get your agent's key
In the console, open API and copy the Agent key. It belongs to one agent, so every call made with it is recorded as that agent’s.
2
Install the SDK
3
Make one call
stripe.charge_customer runs on Invoke’s Stripe simulator.4
Send the same call again
Run it a second time. It resolves with
status: "duplicate" and the same receipt number, because the same idempotencyKey is the same action. Nothing ran twice.5
Read the run
What just happened
- Safe. Before the charge ran, Invoke checked the agent’s identity and permissions, your workspace policies and the budget. It reserved the cost, ran the tool once, then settled.
- Attributable. The charge is recorded as your agent’s. The key proves it, not a name anyone could type.
- Observable.
invoke.trace()returns each stage of the run, read back from Invoke’s ledger. - Verifiable. The receipt was signed when the action committed.
done.receipt.verifiedtells you the ledger still matches what was signed.
call() throws, and the error says why: refused, waiting for approval, failed, or unknown. See Errors.
Prefer the terminal?
The CLI signs you in, scaffolds projects, and makes governed calls without writing code:Next steps
- TypeScript SDK: the full reference, including errors, approvals and idempotency
- How It Works: what Invoke checks before an action runs
- Payments: charges that can’t happen twice