Autonomous AI Agent & Blinks Security Runtime Protocol for Solana
Built for the Colosseum Hackathon β Crypto World's Fair (Fall 2026)
π Live Production URL: https://solagent-sentinel.vercel.app
π GitHub Repository: https://github.com/camesenin/solagent-sentinel
β‘ The Alpenglow Paradigm Shift (~150ms Finality):
With Solana's activation of Alpenglow, transaction confirmation and consensus finality drop from ~12.8s to 150 milliseconds. In a sub-second finality world, post-execution reactive monitoring is dead: once an autonomous agent executes a malicious instruction or signs a poisoned payload, funds are permanently and irreversibly drained in a fraction of a heartbeat. Security must be strictly pre-action, pre-signature, and sub-30ms deterministic.
As AI Agents (via Solana Agent Kit, Eliza, LangChain) and Solana Actions & Blinks gain explosive adoption, they introduce the most dangerous attack vector in Web3:
- Rogue AI Delegations: If an autonomous trading agent consumes a poisoned prompt or untrusted state, it can blindly sign malicious drainer instructions.
- Hidden CPI Drainers: Ordinary users click an innocent Blink button ("Claim Free Airdrop"), while an obfuscated Cross-Program Invocation triggers
SetAuthorityor unlimitedApproveChecked, granting attackers permanent ownership of their token accounts. - Cryptic Wallet Warnings: Standard wallets display unreadable hexadecimal parameters (
Program: TokenkegQfe... Instruction 6), forcing users to sign in the dark.
SolAgent Sentinel is an open-source, deterministic pre-action security shield and attestation protocol that:
-
Sub-30ms Wire Buffer Decompilation: Evaluates raw transaction buffers in under 30msβwell within Solana's block processing envelopeβintercepting SetAuthority hijacking, unlimited allowances, and domain spoofing before private keys are ever commanded to sign.
-
Solana Mobile & Seeker Ready: Engineered for mobile-first agent authorization via Seeker Connect, enabling seamless one-tap cryptographic approvals and physical hardware enclave oversight without generic MWA friction.
-
Default-Deny Fail-Safe Engine: Operates under strict zero-trust parametersβif an RPC simulation times out or unknown instructions fail invariant checks, the transaction is rejected off-chain with zero state mutation.
-
Deconstructs Transaction Wire Buffers: Intercepts instructions before signing to detect
SetAuthorityhijacking, unlimited allowances, and domain spoofing directly from serialized payload opcodes. -
Provides a 360Β° Dual Perspective:
- Modo Usuario ComΓΊn: Human-readable translation with a traffic-light security badge (π’ Safe / π‘ Warning / π΄ Blocked) and visual balance simulation.
- Modo Auditor / Ingeniero: Deep instruction hierarchy, raw accounts, writable/signer privilege maps, and Anchor IDL signatures.
-
On-Chain Attestation Registry: An Anchor smart contract architecture designed for Solana (Devnet/Mainnet) to record security audit hashes and blacklist malicious threat signatures via Program Derived Addresses (PDAs).
flowchart TD
subgraph Input["1. Input Source"]
B1["Solana Blink / Action URL"]
A1["Autonomous AI Agent Payload"]
T1["Raw Transaction (Base64)"]
end
subgraph Sentinel["2. SolAgent Sentinel Engine"]
P1["Wire-Format Instruction Decompiler"]
R1["Anti-Drainer Rules Engine (SetAuthority / Approve)"]
S1["Simulated Balance State Evaluator"]
K1["Risk Scorer (0 - 100)"]
end
subgraph Perspectives["3. 360Β° Output Interfaces"]
U1["π€ Modo Usuario ComΓΊn<br/>(SemΓ‘foro, Lenguaje Natural, +/- Balances)"]
D1["π¬ Modo Auditor<br/>(Instrucciones, Permisos, Hex/JSON)"]
API["π€ Agent Guard API<br/>(Pre-flight Middleware)"]
end
subgraph OnChain["4. Solana Architecture"]
REG["Anchor Sentinel Registry<br/>(PDA Attestations & Blacklist)"]
end
Input --> Sentinel
Sentinel --> Perspectives
Sentinel --> REG
- Node.js >= 18.x
- Rust & Cargo (for Anchor smart contract)
- Solana CLI (optional, for devnet deployment)
git clone https://github.com/camesenin/solagent-sentinel.git
cd solagent-sentinel
npm installnpm run devOpen http://localhost:3000 to view the live dashboard, test case simulator, and dual-perspective inspector.
npm run build
npm run startsolagent-sentinel/
βββ src/
β βββ app/ # Next.js 14 App Router (Pages & Metadata)
β βββ components/ # Dual-perspective UI components
β β βββ SecurityShieldBadge.tsx # Color-coded traffic light shield
β β βββ UserViewCard.tsx # Plain-language explanation for everyday users
β β βββ AuditorViewCard.tsx # Deep AST & instruction inspector for auditors
β β βββ BalanceSimulationWidget.tsx # Live visual incoming/outgoing delta
β β βββ LiveInspector.tsx # Interactive scanner for Blinks & Payloads
β β βββ AttackSimulator.tsx # Step-by-step AI Agent firewall simulation
β βββ lib/
β βββ sentinel-core/ # Core deterministic cryptographic engine
β βββ types.ts # Security audit report interfaces
β βββ drainerRules.ts # SetAuthority and CPI drainer detection
β βββ instructionParser.ts # Transaction AST deconstruction
β βββ riskScorer.ts # Multi-factor score calculator (0-100)
β βββ humanTranslator.ts # Plain language narrative generator
β βββ mockTransactions.ts # Authentic battle-tested test scenarios
βββ anchor/
βββ Anchor.toml # Anchor configuration (Devnet)
βββ programs/
βββ sentinel_registry/ # Smart contract in Rust
βββ src/lib.rs # Global registry & attestation recorder
Reproduce all deterministic heuristic and cybersecurity penetration tests locally:
# 1. Run Functional E2E Scenario Suite (Jupiter swap, Drainers, Token-2022)
node sentinel_audit_suite.js
# 2. Run Dedicated Anti-Exploit Suite (SSRF Firewall, DoS payload limits, Math guards)
node sentinel_security_vulnerability_audit.js
# 3. Run Micro-Benchmark Suite (<0.05ms deterministic instruction evaluation)
node autonomous_agent_integration_benchmark.jsSee BENCHMARK.md for detailed performance methodology, hardware specifications, and reproducible stress metrics.
Integrate SolAgent Sentinel into any autonomous AI agent before broadcasting transactions:
import { SentinelGuard } from '@/lib/sdk/sentinelGuard';
const guard = new SentinelGuard({
rpcUrl: 'https://api.devnet.solana.com',
policy: {
autoAbortCritical: true, // Block malicious drainers in <35ms
maxAllowedRiskScore: 60,
}
});
// Middleware interceptor before agent signing
const audit = await guard.verifyTransaction(serializedAgentTx);
if (!audit.verdict.isApproved) {
console.error(`π Transaction Aborted: ${audit.verdict.actionNotice}`);
throw new Error(`Sentinel Security Firewall: ${audit.humanSummary.actionHeadline}`);
}
// Proceed safely with wallet signing
await agentWallet.signAndSendTransaction(tx);- Hackathon: Cypherpunk / Crypto World's Fair (Fall 2026)
- Organized by: Colosseum & Solana Foundation
- Track: AI Agents & Infrastructure / Blinks
- Lead Builder: Carlos Mesen (@camesenin)
- Production Deployment ($0): https://solagent-sentinel.vercel.app
- Pitch Video (1080p MP4): Available in
docs/solagent_sentinel_pitch.mp4
MIT License. Open source and freely extensible by the Solana community.