Skip to main content
The @prflght/sak-plugin package adds Prflght transaction firewall protection to any agent built with Solana Agent Kit. After a one-line setup call, every SAK action that produces a transaction is automatically intercepted and checked against your Prflght policy before it reaches the chain.

What the plugin does

SAK actions — swaps, transfers, liquidity provision, and anything else in the SAK toolkit — all go through a shared transaction submission path. The PrfghtPlugin hooks into that path at the SAK level, so you get full firewall coverage across every action without touching individual action code.

Installation

Setup

1

Install the package

Run the installation command above in your agent project directory.
2

Create your SolanaAgentKit instance

Set up SolanaAgentKit as you normally would, providing your private key, RPC URL, and any required API keys:
3

Register the Prflght plugin

Call agent.use() with a new PrfghtPlugin instance, passing your Prflght API URL:
4

Run your agent normally

All subsequent transactions produced by any SAK action are now automatically protected by Prflght. No changes to action code required.

Full example

No other code changes are required. The plugin intercepts at the SAK level, so every action — including ones you add later — is covered automatically.

Comparing the plugin to the raw SDK

Use the raw SDK when you need fine-grained control over how transactions are built, serialized, or retried. Use the SAK plugin when you want complete coverage with minimal code.