Skip to main content
An Agent Card is a public JSON document that describes your agent’s identity, capabilities, and communication endpoints. Anima serves it at a well-known URL so any agent or service can find and interact with your agent without prior coordination.

What an Agent Card contains

Agent Cards follow the Agent Card specification and are served at:
https://<domain>/.well-known/agent.json
The document includes everything a caller needs to understand who your agent is and how to reach it:
{
  "name": "Acme Purchasing Agent",
  "description": "Handles procurement and vendor payments for Acme Corp.",
  "url": "https://purchasing.acme.com",
  "did": "did:anima:ag_8f3k2m9x1n4p7q6r",
  "version": "1.0.0",
  "capabilities": [
    {
      "name": "purchase-order",
      "description": "Create and manage purchase orders",
      "inputSchema": {
        "type": "object",
        "properties": {
          "vendor": { "type": "string" },
          "items": { "type": "array" },
          "budget": { "type": "number" }
        }
      }
    },
    {
      "name": "invoice-processing",
      "description": "Process and approve vendor invoices"
    }
  ],
  "endpoints": {
    "a2a": "https://api.useanima.sh/a2a/ag_8f3k2m9x1n4p7q6r",
    "email": "purchasing@acme.com"
  },
  "authentication": {
    "schemes": ["did-auth", "bearer"]
  },
  "provider": {
    "organization": "Acme Corp",
    "url": "https://acme.com"
  }
}

Key fields

name
string
required
Human-readable name for the agent.
description
string
Brief summary of what the agent does.
did
string
required
The agent’s decentralized identifier (e.g. did:anima:ag_...). Used for cryptographic verification.
capabilities
array
List of actions the agent can perform. Each capability has a name, optional description, and optional inputSchema.
endpoints
object
Communication channels. Supports a2a (agent-to-agent API URL) and email.
authentication.schemes
array
Authentication methods the agent accepts. Common values: did-auth, bearer.

Publish an Agent Card

Call agentCards.publish with your agent ID and the domain where the card should be served. Anima handles hosting the card at /.well-known/agent.json on that domain.
import { Anima } from "@anima-labs/sdk";

const anima = new Anima({ apiKey: "ak_..." });

const card = await anima.identity.agentCards.publish({
  agentId: "ag_8f3k2m9x1n4p7q6r",
  domain: "purchasing.acme.com",
  capabilities: [
    {
      name: "purchase-order",
      description: "Create and manage purchase orders",
      inputSchema: {
        type: "object",
        properties: {
          vendor: { type: "string" },
          items: { type: "array" },
          budget: { type: "number" },
        },
      },
    },
  ],
});

console.log(`Published at: ${card.url}`);
// => https://purchasing.acme.com/.well-known/agent.json
By default, Anima automatically publishes an Agent Card whenever you create a new agent. You can disable auto-publish from your organization settings in the dashboard.

Discover another agent’s card

Resolve a card from any domain to inspect its capabilities and endpoints before initiating communication:
const card = await anima.identity.agentCards.resolve("purchasing.acme.com");

console.log(card.name);          // "Acme Purchasing Agent"
console.log(card.capabilities);  // [{ name: "purchase-order", ... }]
console.log(card.endpoints.a2a); // A2A endpoint URL
Resolved cards are cached to reduce latency on repeated lookups. If you update a card and need the change visible immediately, call agentCards.publish again — the cache will be invalidated on the next resolution.

API reference

EndpointMethodDescription
/api/identity/agent-cardsPOSTPublish an Agent Card
/api/identity/agent-cards/:agentIdGETGet an agent’s card
/api/identity/agent-cards/:agentIdPUTUpdate an Agent Card
/api/identity/agent-cards/:agentIdDELETEUnpublish an Agent Card
/api/identity/agent-cards/resolveGETResolve a card by domain