API Documentation

Everything you need to integrate AgentSource skills into your AI agent.

Base URL: https://api.agentsource.co

Quick Start

Get from zero to calling a skill in 3 steps:

1Get an API Key

Sign up at agentsource.co/auth/signup, then go to your Dashboard → API Keys to create one.

2Find a Skill

bash
curl https://api.agentsource.co/v1/skills/search?q=scrape+web \
  -H "Authorization: Bearer YOUR_API_KEY"

3Call the Skill via MCP

bash
curl -X POST https://proxy.agentsource.co/v1/mcp/web-scraper \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "scrape_url",
      "arguments": { "url": "https://example.com" }
    }
  }'

Authentication

AgentSource uses API keys for agent-to-proxy authentication and JWT tokens for the human dashboard.

Sign Up

bash
curl -X POST https://api.agentsource.co/v1/auth/signup \
  -H "Content-Type: application/json" \
  -d '{"email": "agent@example.com", "password": "secure123", "name": "My Agent"}'

Returns a JWT token. Use it to create API keys via the dashboard API.

Create API Key

bash
curl -X POST https://api.agentsource.co/v1/dashboard/api-keys \
  -H "Authorization: Bearer JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name": "production-agent"}'

The API key is returned once — store it securely. Use it as X-API-Key header for MCP proxy calls.

Connect to a Skill

Before calling a skill through the proxy, register a connection. This enables metering and quota tracking.

bash
curl -X POST https://api.agentsource.co/v1/agent/connect \
  -H "Authorization: Bearer JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"skill_id": "abc-123"}'

# Response:
{
  "data": {
    "connection_id": "conn-456",
    "proxy_endpoint": "https://proxy.agentsource.co/v1/mcp/markdown-converter"
  }
}

MCP Proxy

The proxy gateway handles auth, rate limiting, metering, and forwards MCP JSON-RPC requests to skill servers.

Endpoint: POST https://proxy.agentsource.co/v1/mcp/:skillSlug

List Available Tools

json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/list",
  "params": {}
}

Call a Tool

json
{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tools/call",
  "params": {
    "name": "scrape_url",
    "arguments": {
      "url": "https://httpbin.org/html",
      "format": "markdown"
    }
  }
}

Required Headers

HeaderValue
Content-Typeapplication/json
Acceptapplication/json, text/event-stream
X-API-KeyYour API key

All Endpoints

MethodPathDescription
POST/v1/auth/signupCreate account
POST/v1/auth/loginGet JWT token
GET/v1/skillsList skills with filters
GET/v1/skills/searchVector search skills
GET/v1/skills/:idSkill detail
GET/v1/categoriesList categories
POST/v1/agent/connectConnect to a skill
GET/v1/dashboard/usageUsage metrics
GET/v1/dashboard/api-keysList API keys
POST/v1/dashboard/api-keysCreate API key
DELETE/v1/dashboard/api-keys/:idRevoke API key
POST/v1/creator/skillsSubmit a skill
GET/v1/creator/skillsList your skills
POST/v1/mcp/:slugMCP proxy (on proxy subdomain)

Error Handling

All API errors follow a consistent format:

json
{
  "error": {
    "code": "not_found",
    "message": "Skill 'invalid-slug' not found"
  },
  "data": null,
  "meta": null
}

Common Error Codes

HTTPCodeMeaning
400validation_errorInvalid request body
401unauthorizedMissing or invalid auth
403forbiddenNo access to resource
404not_foundResource doesn't exist
409already_connectedAlready connected to skill
429rate_limitedToo many requests
502upstream_unavailableSkill server unreachable
Need help? Email support@agentsource.co