AI Agent Payment Platform on Tempo blockchain. Give AI agents autonomous spending power with on-chain limits, real-time monitoring, and instant revocation.
TempoKey lets developers create delegated P256 access keys for AI agents with built-in spending limits and expiry. Agents can make payments using a single API call from any language: Python, JavaScript, cURL.
Key features:
- P256 access keys with on-chain spending limits
- Gasless transactions (fees sponsored by the owner)
- Sub-second finality on Tempo
- Instant one-tx revocation
- Token swaps and batch payments
- Agent templates for quick setup
- REST API with Bearer token auth
- Real-time activity monitoring
Frontend: React 18, TypeScript, Vite, Tailwind CSS, shadcn/ui, wagmi/viem
SDK: @tempokey/sdk - TypeScript SDK for agent payments (docs)
API Server: Hono, Node.js, viem, Zod validation
Blockchain: Tempo Network (testnet), PathUSD stablecoin
- Node.js 18+
- npm
git clone https://github.com/vizzzix/tempokey.git
cd tempokey
npm install
npm run devcd api
npm install
# Configure environment
cp .env.example .env
# Edit .env - set KEY_SECRET to a random string
npm run devAPI runs on http://localhost:3001
src/
components/
dashboard/ # Agent cards, detail view, modals, playground
landing/ # Landing page sections
ui/ # shadcn/ui components
hooks/ # React hooks (agents, transactions, balances)
lib/ # Storage, keychain, transfer watcher, utilities
config/ # Tempo chain and token configuration
pages/ # Dashboard, Landing
api/
src/
routes/ # API endpoints
services/ # Crypto, blockchain interactions
middleware/ # Auth, rate limiting
storage/ # Agent data store
tests/ # Unit & integration tests
sdk/ # @tempokey/sdk - TypeScript SDK
src/ # SDK source (TempoKey class, operations, tokens)
tests/ # SDK tests
- Connect Wallet - Owner connects via MetaMask or any EVM wallet
- Create Agent - Pick a template or configure manually (name, limit, expiry)
- On-Chain Auth -
authorizeKeyregisters the P256 key in Tempo's Keychain precompile - Use Agent - Send payments, swap tokens, batch pay via dashboard or API
- Monitor - Track spending, limits, and transaction history in real time
- Revoke - Instantly freeze any agent with one transaction
| Concept | Description |
|---|---|
| Keychain Precompile | Tempo's native precompile (0xaAAAaaAA...) for access key management |
| P256 Keys | ECDSA keys on the P-256 curve, generated client-side |
| Spending Limits | Per-token allowances enforced on-chain (6 decimal precision for pathUSD) |
| Expiry | Unix timestamp-based key expiration (supports "no limit" mode) |
| Command | Description |
|---|---|
npm run dev |
Start frontend dev server |
npm run build |
Production build |
npm run preview |
Preview production build |
npm run lint |
Run ESLint |
npm test |
Run frontend tests |
| Command | Description |
|---|---|
npm run dev |
Start API with hot reload |
npm run build |
Compile TypeScript |
npm test |
Run tests |
npm run test:coverage |
Run tests with coverage |
| Command | Description |
|---|---|
npm run build |
Build SDK |
npm test |
Run SDK tests |
npm run typecheck |
Type check |
| Variable | Description | Required |
|---|---|---|
KEY_SECRET |
Encryption key for agent private keys | Yes |
PORT |
API server port (default: 3001) | No |
CORS_ORIGIN |
Allowed CORS origin (default: http://localhost:5173) | No |
- Testnet: Tempo Moderato (Chain ID: 42431)
- RPC: https://rpc.moderato.tempo.xyz
- Explorer: https://explore.tempo.xyz
MIT
