Skip to main content
GET
/
agent
/
{agentId}
Get Agent
curl --request GET \
  --url http://sandbox.mintlify.com/agent/{agentId} \
  --header 'Authorization: Bearer <token>'
{
  "agentId": "<string>",
  "metadata": {
    "name": "<string>",
    "tags": [
      "<string>"
    ],
    "dateCreated": "2023-11-07T05:31:56Z"
  },
  "plans": [
    {
      "planId": "<string>",
      "metadata": {
        "name": "<string>",
        "description": "<string>"
      },
      "price": {
        "priceType": "<string>",
        "tokenAddress": "<string>",
        "amounts": [
          123
        ],
        "receivers": [
          "<string>"
        ]
      },
      "credits": {
        "creditsType": "<string>",
        "amount": 123,
        "durationOfThePlan": 123
      },
      "nftAddress": "<string>"
    }
  ]
}
Retrieves information about a registered AI agent, including metadata and associated payment plans.

Path Parameters

NameTypeRequiredDescription
agentIdstringYesThe unique identifier of the agent to retrieve

Example Request

const agent: Agent = await payments.getAgent(agentId)

Response Structure

interface Agent {
  agentId: string
  metadata: AgentMetadata
  plans: PaymentPlan[]
}

interface AgentMetadata {
  name: string
  tags: string[]
  dateCreated: string
}

interface PaymentPlan {
  planId: string
  metadata: PlanMetadata
  price: PriceConfig
  credits: CreditsConfig
  nftAddress: string
}

Example Response

{
  "agentId": "0xabc123...",
  "metadata": {
    "name": "Legal Assistant",
    "tags": ["legal", "ai"],
    "dateCreated": "2024-01-10T00:00:00Z"
  },
  "plans": [
    {
      "planId": "0xdef456...",
      "metadata": {
        "name": "Premium Legal Plan",
        "description": "Monthly subscription for legal assistance"
      },
      "price": {
        "priceType": "FIXED_PRICE",
        "tokenAddress": "0xUSDC...",
        "amounts": [10000000],
        "receivers": ["0xbuilderAddress"]
      },
      "credits": {
        "creditsType": "EXPIRABLE",
        "amount": 1,
        "durationOfThePlan": 2592000
      },
      "nftAddress": "0x..."
    }
  ]
}

Notes

  • You must initialize the Payments client with a valid nvmApiKey before calling getAgent.
  • The returned object includes all plans currently associated with the agent.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

agentId
string
required

The unique identifier of the agent to retrieve

Response

Agent information response

agentId
string
metadata
object
plans
object[]