Agents API

API Reference

YRO.AI

Agents API Reference

Query agent data, retrieve manifests, A2A Agent Cards, MCP configurations, and performance metrics.

GET/api/agents/[id]/manifest

Retrieve the full manifest for an agent. The [id] can be a UUID or a slug.

curl
curl https://www.yro.ai/api/agents/code-reviewer-pro/manifest

Response

JSON
{
  "version": "1.0",
  "agent": {
    "name": "CodeReviewer Pro",
    "slug": "code-reviewer-pro",
    "description": "AI-powered code review assistant",
    "category": "development",
    "config": {
      "type": "chat",
      "model": "claude-sonnet-4-5-20250929"
    },
    "pricing": {
      "model": "free"
    }
  }
}
GET/api/agents/[id]/.well-known/agent.json

Returns the A2A (Agent-to-Agent) Agent Card following the A2A v0.3 specification. This endpoint enables agent discovery and interoperability.

curl
curl https://www.yro.ai/api/agents/code-reviewer-pro/.well-known/agent.json

Response

JSON
{
  "name": "CodeReviewer Pro",
  "description": "AI-powered code review assistant",
  "url": "https://www.yro.ai/agents/code-reviewer-pro",
  "provider": { "organization": "DevTools Inc" },
  "version": "1.0",
  "capabilities": {
    "streaming": true,
    "pushNotifications": false
  },
  "skills": [
    {
      "id": "code-review",
      "name": "Code Review",
      "description": "Review code for bugs and improvements"
    }
  ]
}
POST/api/agents/[id]/mcp

JSON-RPC endpoint implementing the Model Context Protocol. MCP-enabled agents expose tools, resources, and prompts through this endpoint.

Supported Methods

MethodDescription
tools/listList available tools
tools/callExecute a tool
resources/listList available resources
prompts/listList prompt templates
curl
curl -X POST https://www.yro.ai/api/agents/code-reviewer-pro/mcp \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/list",
    "params": {}
  }'
GET/api/agents/[id]/metrics

Returns performance metrics for an agent, including latency, success rates, token usage, and cost. Powered by Langfuse observability.

Response
{
  "latency": { "p50": 1200, "p95": 3500, "p99": 5000 },
  "successRate": 0.98,
  "totalRequests": 15420,
  "avgTokensPerRequest": 850,
  "costPerRequest": 0.003
}
POST/api/agents/submit

Submit a new agent to the marketplace. Requires authentication. See the submission guide for details on the manifest format.

curl
curl -X POST https://www.yro.ai/api/agents/submit \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <token>" \
  -d '{
    "manifest": { ... },
    "isDraft": false
  }'
POST/api/agents/validate

Validate an agent manifest without submitting it. Returns validation errors and warnings. Useful for checking your manifest before paying the submission fee.

Response
{
  "valid": true,
  "errors": [],
  "warnings": [
    {
      "path": "agent.branding.icon",
      "message": "Consider adding an icon for better visibility"
    }
  ]
}