Prflght protects your AI agent’s transactions through a four-stage pipeline: simulation, policy evaluation, protocol health check, and on-chain attestation. This guide walks you through every step — from creating your account to sending your first protected transaction.Documentation Index
Fetch the complete documentation index at: https://docs.prflght.xyz/llms.txt
Use this file to discover all available pages before exploring further.
Connect your wallet
Go to app.prflght.xyz and connect your Solana wallet. Prflght supports Phantom and Solflare. Once connected, sign the authentication message in your wallet. No password is required — your signature proves ownership of the wallet.
Copy your API key
After authenticating, open the API Keys section of the dashboard and copy your API key. Keep this value secure — it authorizes all firewall checks made on behalf of your agent.
Set your agent policy
Open the Policy editor on the dashboard and configure the rules for your agent:
- Max notional — the maximum USD value of a single transaction
- Allowed programs — a list of Solana program IDs your agent may interact with
- Slippage limit — the maximum acceptable slippage percentage
- Daily transfer limit — the cumulative USD value allowed per day
Initialize the Firewall client
Import
Firewall and construct a client with your API URL and agent ID. The agentId is your agent’s wallet public key as a base58 string.Check your transaction
Before you send a transaction, pass its base64-encoded bytes to If the transaction passes all checks,
firewall.check(). Prflght simulates the transaction, evaluates it against your policy, and checks protocol health.result.instructions contains the attestation instructions you must prepend to your transaction.You must prepend
result.instructions to your transaction’s instruction list. The on-chain program rejects any transaction that does not include a valid attestation.Prepend attestation instructions and send
Build the final transaction with the attestation instructions first, then your own instructions, and submit it.
FirewallDenyError is thrown when Prflght blocks the transaction. The err.reason field explains which check failed — use it to adjust your policy or debug your agent’s behavior.