SIMA

Example

Agent Authentication Example

AI agent authentication uses the same wallet-first model as human wallet authentication, which keeps machine-to-machine access accountable.

Example Scenario

When this pattern applies.

An AI agent runtime controls or is delegated to a wallet. It authenticates by wallet, then calls quote, certificate, evidence, and claim status APIs within its authorization boundary.

Request

Example request shape.

POST /agent/wallet/verify
Content-Type: application/json

{
  "chain": "SOLANA",
  "walletAddress": "AGENT_WALLET_ADDRESS",
  "signature": "SIGNED_NONCE_FROM_AGENT_WALLET"
}

Response

Example response shape.

{
  "accessToken": "ACCESS_TOKEN",
  "refreshToken": "REFRESH_TOKEN",
  "wallet": {
    "chain": "SOLANA",
    "address": "AGENT_WALLET_ADDRESS"
  }
}

TypeScript

Copy-paste friendly example.

async function authenticateAgentWallet(input: {
  walletAddress: string;
  signature: string;
}) {
  const response = await fetch("https://api.sima-prime.com/agent/wallet/verify", {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({
      chain: "SOLANA",
      walletAddress: input.walletAddress,
      signature: input.signature,
    }),
  });

  if (!response.ok) throw new Error("SIMA agent authentication failed");
  return response.json();
}

// Use the returned token for read/write APIs the agent is allowed to call.
// The agent cannot approve claims, approve payouts, or move treasury funds.

Architecture Flow

  • Agent framework receives wallet authentication task.
  • Agent requests and signs wallet challenge outside SIMA.
  • SIMA verifies wallet control.
  • Agent stores token according to its own secure runtime policy.
  • Agent calls SIMA APIs without browser extension dependency.

Safety Boundary

  • No private keys or seed phrases are sent to SIMA.
  • Examples do not execute payments or blockchain transfers.
  • Quotes do not issue certificates.
  • Evidence does not approve claims or authorize payout.
  • FULL_PAYMENT still requires treasury review before execution.