@agentsentry/atsp
v1.0.0
Published
Agentic Transaction Security Protocol — open standard for AI agent on-chain governance
Downloads
17
Maintainers
Readme
Agentic Transaction Security Protocol (ATSP)
The open standard for how AI agents declare intent, validate context, and produce immutable decision traces before executing any on-chain transaction.
Published by AgentSentry · Houston, TX · Bayou City Blockchain
What Is ATSP?
ATSP (Agentic Transaction Security Protocol) defines a standard interface that any AI agent framework (elizaOS, Coinbase AgentKit, OpenAI Agents SDK) must implement before executing on-chain transactions.
The problem it solves: AI agents managing real capital (Solana treasuries, DeFi positions, DAO vaults) have no standard for declaring why they want to execute a transaction before they do it. Without this, a single LLM hallucination can drain a treasury in seconds.
ATSP is the fix. It forces agents to:
- Declare intent with a cryptographic hash before any on-chain action
- Pass through a security middleware (like AgentSentry) that validates the intent
- Produce an immutable decision trace that survives the transaction
Quick Install
Pre-release: npm package publishes with v1.0.0 GA. Install directly from GitHub until then:
npm install github:LCTXTECH/atspOnce published (coming soon):
npm install @agentsentry/atsp
# or
pnpm add @agentsentry/atspCore Usage
import { createIntentDeclaration, validateDeclaration, ATSPVersion } from '@agentsentry/atsp'
// Step 1: Agent declares its intent BEFORE executing
const declaration = await createIntentDeclaration({
agentId: 'eliza-agent-001',
proposerPubKey: 'YOUR_PROPOSER_PUBLIC_KEY',
action: 'SWAP',
amount: 10.5,
tokenMint: 'So11111111111111111111111111111111111111112',
slippage: 1.5,
reasoning: 'Rebalancing portfolio: SOL/USDC ratio exceeded 60% threshold',
ipiCleared: true,
})
// Step 2: Validate the declaration
const result = validateDeclaration(declaration)
if (!result.valid) {
throw new Error(`ATSP validation failed: ${result.errors.join(', ')}`)
}
// Step 3: Send to AgentSentry (or any ATSP-compliant middleware)
const verdict = await fetch('https://agentsentry.net/api/sentry/check-in', {
method: 'POST',
headers: { 'Content-Type': 'application/json', 'Authorization': 'Bearer YOUR_API_KEY' },
body: JSON.stringify(declaration),
})
const { sentryVerdict } = await verdict.json()
// Step 4: Only execute if ALLOW
if (sentryVerdict === 'ALLOW') {
// proceed with transaction
}Core Interfaces
interface ATSPIntentDeclaration {
version: '1.0'
agentId: string // NHI-scoped principal identifier
proposerPubKey: string // Squads V4 proposer key
intentHash: string // SHA-256 of (agentId + action + amount + tokenMint + timestamp)
timestamp: number // Unix ms — declarations expire after 60 seconds
action: ATSPAction // 'SWAP' | 'TRANSFER' | 'LP' | 'STAKE' | 'UNSTAKE' | 'VOTE'
amount: number // In native token units
tokenMint: string // Solana token mint address
slippage?: number // Max acceptable slippage %
reasoning: string // Human-readable agent reasoning (min 10 chars)
ipiCleared: boolean // Confirms IPI scan was performed on input context
decisionTrace: {
input: Record // The raw data the agent acted on
reasoning: string // Step-by-step decision logic
confidence: number // 0.0 – 1.0
}
sentryVerdict?: ATSPVerdict // Set by middleware after validation
sentryLogId?: string // Audit log reference
}
type ATSPVerdict = 'ALLOW' | 'BLOCK' | 'ESCALATE_TO_HUMAN'
type ATSPAction = 'SWAP' | 'TRANSFER' | 'LP' | 'STAKE' | 'UNSTAKE' | 'VOTE'ATSP Compliance Badge
Add this to your project's README to signal ATSP compliance:
[](https://agentsentry.net/protocol/atsp)Key Concepts
| Concept | Definition | |---|---| | Agentic Slippage Event (ASE) | When an agent perceives a non-existent arbitrage opportunity and executes at catastrophic slippage | | Indirect Prompt Injection (IPI) | Adversarial data in agent input context that hijacks transaction decisions | | Hot-Wallet Parity | Dangerous state where agent has same permissions as a human multisig owner | | Runaway Agent Loop | Agent caught in logic loop executing hundreds of transactions before circuit trips | | Non-Human Identity (NHI) Scoping | Assigning unique, time-limited cryptographic identities to agents via Squads Proposer roles |
Links
- 📄 Full Protocol Spec: agentsentry.net/protocol/atsp
- 🛡️ AgentSentry Dashboard: agentsentry.net/dashboard
- 📦 elizaOS Plugin: npmjs.com/@agentsentry/eliza-plugin
- 📚 Docs: agentsentry.net/docs
- 💬 Discord: discord.gg/aBX7vbzd
License
MIT © 2026 AgentSentry / Bayou City Blockchain · Houston, TX
