Examples & Patterns
Learn ATP through real-world examples, integration patterns, and best practices for quantum-safe AI agent security.
Code Examples
Best Practices
Real-World Patterns
5-Minute Quick Start
Get your first quantum-safe agent running in minutes
1
Install ATP SDK
# Choose your preferred package manager
npm install atp-sdk
# or
yarn add atp-sdk
# or
pnpm add atp-sdk
2
Initialize Client
// src/index.ts
import { ATPClient } from 'atp-sdk'
const atp = new ATPClient({
baseUrl: 'https://api.atp.dev',
apiKey: process.env.ATP_API_KEY
})
baseUrl: 'https://api.atp.dev',
apiKey: process.env.ATP_API_KEY
})
3
Register Your Agent
// Create quantum-safe agent in 1 line
const agent = await Agent.quickstart('CustomerServiceBot')
// Agent is now quantum-safe!
console.log(`DID: ${agent.getDID()}`)
console.log(`Standalone: ${agent.isStandalone()}`)
4
Start Secure Interactions
// Secure agent communication
const response = await atp.agents.interact({
agentId: agent.id,
message: 'Process customer request',
context: { customerId: '123' }
})
agentId: agent.id,
message: 'Process customer request',
context: { customerId: '123' }
})
// All communications are quantum-safe
console.log(response)
Complete Example
Full working example with error handling
Live Demo
Try the example in your browser
Starter Template
Ready-to-use project template
Start Building Today
Explore ATP's quantum-safe examples and build the future of AI security