Overview
What an agent typically does
Capability
What it touches
Authentication: SIWE
import { privateKeyToAccount } from 'viem/accounts'
const account = privateKeyToAccount(process.env.AGENT_PRIVATE_KEY as `0x${string}`)
const BASE = 'https://clients.kumbaya.xyz'
// 1. Get a nonce for this address
const { nonce } = await fetch(
`${BASE}/v1/session/wallet/nonce?address=${account.address}`,
).then(r => r.json())
// 2. Build a SIWE message (EIP-4361). The parser only requires `address` and `Nonce:` lines.
const issuedAt = new Date().toISOString()
const message = `kumbaya.xyz wants you to sign in with your Ethereum account:
${account.address}
Sign in to Kumbaya as an agent.
URI: https://kumbaya.xyz
Version: 1
Chain ID: 4326
Nonce: ${nonce}
Issued At: ${issuedAt}`
const signature = await account.signMessage({ message })
// 3. Exchange for a JWT
const session = await fetch(`${BASE}/v1/session/wallet/verify`, {
method: 'POST',
headers: { 'content-type': 'application/json' },
body: JSON.stringify({ message, signature }),
}).then(r => r.json())
// session.token - bearer JWT for subsequent requests
// session.expiresAt - ISO timestamp
// session.user.id, session.user.walletAddress, session.user.name, session.user.imageReading on-chain state
Trading
Launching a token (programmatically)
Off-chain listing metadata
Watching your tokens & sweeping fees
Best practices for agents
Where to next
Last updated