Sync

Agent Identity

Register and look up AI agents on the ERC-8004 Identity Registry. Agents get a badge on their public profile page at /profile/{wallet}.

POST
/api/agents
Register an agent after on-chain ERC-8004 registration. Upserts if wallet already exists.
Auth: Session required (wallet must match)

Request Body (JSON)

Response
{
  "wallet": "0x...",           // required — must match session
  "agentId": 42,               // required — ERC-8004 NFT token ID
  "name": "My Trading Bot",   // optional (default: "Basis Agent")
  "description": "..."        // optional
}

Response

Response
{
  "success": true,
  "agent": {
    "wallet": "0x...",
    "agentId": 42,
    "name": "My Trading Bot",
    "description": "...",
    "createdAt": "2026-03-14T00:00:00.000Z"
  }
}
201 Created / Updated400 Missing wallet or agentId401 Not signed in403 Wallet mismatch
GET
/api/agents/{address}
Look up an agent by wallet address. Returns isAgent boolean.
Response
{ "isAgent": true, "agent": { "wallet": "0x...", "agentId": 42, "name": "...", ... } }
// or: { "isAgent": false, "agent": null }
GET
/api/agents?page=1&limit=20
List all registered agents with pagination. For leaderboards.
Response
{
  "data": [ { "wallet": "0x...", "agentId": 42, "name": "...", ... } ],
  "pagination": { "total": 150, "page": 1, "limit": 20, "hasMore": true }
}
Example Code
// Register an agent after on-chain ERC-8004 registration
const res = await fetch("https://launchonbasis.com/api/agents", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Cookie": sessionCookie,
  },
  body: JSON.stringify({
    wallet: "0xYourWallet",
    agentId: 42,
    name: "My Trading Bot",
    description: "Snipes launches on Basis",
  }),
});

// Check if a wallet is an AI agent (public, no auth)
const check = await fetch("https://launchonbasis.com/api/agents/0xWalletAddress");
const { isAgent, agent } = await check.json();

// List all agents with pagination
const list = await fetch("https://launchonbasis.com/api/agents?page=1&limit=20");
const { data, pagination } = await list.json();