@sentinelhq/agent-kit
v1.0.1
Published
Sentinel security middleware for Solana Agent Kit
Maintainers
Readme
@sentinelhq/agent-kit
Sentinel security middleware for Solana Agent Kit.
Install
npm install @sentinelhq/agent-kitRequires Node.js 20+
Usage
import { sentinelMiddleware } from '@sentinelhq/agent-kit';
const middleware = await sentinelMiddleware({
policy: {
spendingLimits: {
maxPerTx: 1_000_000_000, // 1 SOL
},
},
});
agentKit.use(middleware);The middleware wraps executeAction() — if a prompt-injection threat is detected or a policy is violated, it throws a SentinelBlockedError with details about what was blocked and why.
try {
await agentKit.executeAction('transfer', { to: '...', amount: 0.1 });
} catch (err) {
if (err instanceof SentinelBlockedError) {
console.log(err.blockedBy); // 'prompt_guard' | 'execution_sandbox'
console.log(err.reason); // human-readable explanation
}
}Configuration
The middleware accepts the same configuration object as @sentinelhq/core — prompt guard mode, execution sandbox policy, and attestation settings are all supported.
Related Packages
| Package | Description |
|----------|-------------|
| @sentinelhq/core | Core SDK — Prompt Guard, Execution Sandbox, Memo Attestation |
| @sentinelhq/cli | CLI — sentinel scan, simulate, attest, verify |
| @sentinelhq/eliza | elizaOS plugin |
| @sentinelhq/openclaw | OpenClaw agent hook |
License
MIT
