Skip to main content

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.

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

npm install @prflght/sak-plugin

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:
import { SolanaAgentKit } from 'solana-agent-kit'
import { PrfghtPlugin } from '@prflght/sak-plugin'

const agent = new SolanaAgentKit(privateKey, rpcUrl, { OPENAI_API_KEY })
3

Register the Prflght plugin

Call agent.use() with a new PrfghtPlugin instance, passing your Prflght API URL:
agent.use(new PrfghtPlugin({ apiUrl: 'https://api.prflght.xyz' }))
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

import { SolanaAgentKit } from 'solana-agent-kit'
import { PrfghtPlugin } from '@prflght/sak-plugin'

const agent = new SolanaAgentKit(privateKey, rpcUrl, { OPENAI_API_KEY })
agent.use(new PrfghtPlugin({ apiUrl: 'https://api.prflght.xyz' }))

// All transactions through any SAK action are now intercepted automatically.
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

@prflght/sak-plugin@prflght/sdk
SetupOne agent.use() callManual firewall.check() before each transaction
CoverageAll SAK actions automaticallyOnly where you explicitly call check()
ControlZero-configFull control over serialization, error handling, and instruction placement
Best forSAK-based agents where you want drop-in protectionCustom agents or non-SAK frameworks
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.