AgentDyneAgentDyne
MarketplaceIntegrationsBuildDocsBlogPricing

Documentation

Quick StartAuthenticationExecute AgentAgents APIPipelines APIRAG & KnowledgeAgent RegistryCredits APIMCP IntegrationsWebhooksRate LimitsError Codes

Resources

API Status GitHub Discord
API v1 · April 2026

AgentDyne Docs

Complete reference for the AgentDyne API — execute agents, build pipelines, manage RAG knowledge bases, and integrate 40+ MCP tools.

Quick Start

Your first agent call in under 2 minutes.

Get your API key from the API Keys dashboard, then:

bash
curl -X POST https://agentdyne.com/api/agents/AGENT_ID/execute \
  -H "Authorization: Bearer agd_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"input": "Summarise this: Q3 revenue grew 40% YoY…"}'
json
{
  "executionId": "exec_abc123",
  "output": {
    "summary": "Q3 revenue increased 40% year-over-year.",
    "keyPoints": ["Revenue up 40%", "Strong Q4 outlook"]
  },
  "latencyMs": 842,
  "tokens": { "input": 124, "output": 87 },
  "cost": 0.00312
}

Authentication

All API requests require a valid API key in the Authorization header.

http
Authorization: Bearer agd_YourApiKeyHere
# Also accepted:
X-API-Key: agd_YourApiKeyHere

Secure

Keys are hashed SHA-256. AgentDyne never stores the raw key.

Rotatable

Create and revoke keys anytime from your API Keys dashboard.

Trackable

Each key tracks total calls, last used timestamp, and rate limits.

Rate-limited

Default 60 req/min. Quota enforced per plan. Headers: X-RateLimit-*.

Execute Agent

Run any active agent — synchronously or token-by-token streaming. Enforces quota, credits, and injection filter automatically.

POST
/api/agents/{id}/execute

Body: { input, stream? }. stream:true returns Server-Sent Events. Input can be string or JSON object.

typescript
// TypeScript — synchronous
const res = await fetch("https://agentdyne.com/api/agents/AGENT_ID/execute", {
  method: "POST",
  headers: {
    "Authorization": "Bearer " + process.env.AGENTDYNE_API_KEY,
    "Content-Type":  "application/json",
  },
  body: JSON.stringify({ input: "Summarise this email thread…" }),
})
const { executionId, output, latencyMs, tokens, cost } = await res.json()
typescript
// Streaming (server-sent events)
const res = await fetch("https://agentdyne.com/api/agents/AGENT_ID/execute", {
  method: "POST",
  headers: { "Authorization": "Bearer " + key, "Content-Type": "application/json" },
  body:   JSON.stringify({ input: "Write a blog post about AI agents", stream: true }),
})
const reader = res.body.getReader()
const dec    = new TextDecoder()
while (true) {
  const { done, value } = await reader.read()
  if (done) break
  const lines = dec.decode(value).split("\n")
  for (const line of lines) {
    if (!line.startsWith("data:")) continue
    const data = JSON.parse(line.slice(5))
    if (data.type === "delta") process.stdout.write(data.delta)
    if (data.type === "done")  console.log("\nDone in", data.latencyMs, "ms")
  }
}

Agents API

Create, list, search, and manage agents via REST.

GET
/api/agents

List active agents. Params: q, category, pricing_model, sort (popular|rating|newest), page, limit.

GET
/api/agents/{id}

Single agent detail with full seller profile and version history.

POST
/api/agents/create

Create a new agent (server-validated). Returns { id, name, slug, status: 'draft' }.

PATCH
/api/agents/{id}

Update agent fields: system_prompt, model_name, pricing, capability_tags, knowledge_base_id.

POST
/api/agents/{id}/execute

Execute agent. Enforces quota, credits, injection filter, streaming (stream: true).

GET
/api/agents/{id}/reviews

List approved reviews. Params: page, limit.

POST
/api/agents/{id}/reviews

Post a review (1–5 stars). Requires prior successful execution.

bash
# List active agents in the "coding" category, sorted by rating
curl "https://agentdyne.com/api/agents?category=coding&sort=rating&limit=10" \
  -H "Authorization: Bearer agd_your_key"

# Response
{
  "data": [{ "id": "…", "name": "…", "description": "…", "pricing_model": "free" }],
  "pagination": { "total": 284, "page": 1, "limit": 10, "pages": 29 }
}
bash
curl -X POST https://agentdyne.com/api/agents/create \
  -H "Authorization: Bearer agd_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "name":          "Email Classifier",
    "description":   "Classifies support emails into categories",
    "category":      "customer_support",
    "pricing_model": "free",
    "system_prompt": "You are an email classifier. Return JSON: { category, priority }",
    "model_name":    "claude-sonnet-4-20250514",
    "temperature":   0.3,
    "max_tokens":    1024
  }'

Pipelines API

Chain multiple agents into a DAG workflow. Each node is an agent — output of node N feeds node N+1. The topological sort engine handles dependencies automatically.

How pipelines work: Create a pipeline with a DAG (directed acyclic graph) of agent nodes. When you run it, each agent is called in topological order — the text/JSON output of one agent is automatically stringified and passed as the input to the next agent. All nodes run the same execution pipeline as direct agent calls (quota, credits, injection filter).
GET
/api/pipelines

List your pipelines. Params: public=true for public ones, limit, page.

POST
/api/pipelines

Create pipeline. Body: { name, description, dag: { nodes, edges }, timeout_seconds }.

GET
/api/pipelines/{id}

Single pipeline with full DAG definition.

PATCH
/api/pipelines/{id}

Update DAG, name, timeout, visibility.

DELETE
/api/pipelines/{id}

Delete pipeline and all execution history.

POST
/api/pipelines/{id}/execute

Run pipeline DAG. Returns per-node traces, final output, total cost + latency.

bash
# 1. Create a pipeline
curl -X POST https://agentdyne.com/api/pipelines \
  -H "Authorization: Bearer agd_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Research → Summarise → Email",
    "description": "Full research pipeline",
    "dag": {
      "nodes": [
        { "id": "n1", "agent_id": "RESEARCHER_AGENT_ID", "label": "Research" },
        { "id": "n2", "agent_id": "SUMMARISER_AGENT_ID", "label": "Summarise" },
        { "id": "n3", "agent_id": "EMAIL_DRAFT_AGENT_ID",  "label": "Email Draft" }
      ],
      "edges": [
        { "from": "n1", "to": "n2" },
        { "from": "n2", "to": "n3" }
      ]
    },
    "timeout_seconds": 120
  }'
bash
# 2. Execute the pipeline
curl -X POST https://agentdyne.com/api/pipelines/PIPELINE_ID/execute \
  -H "Authorization: Bearer agd_your_key" \
  -H "Content-Type: application/json" \
  -d '{ "input": "Research recent AI breakthroughs in robotics" }'

# Response — per-node traces + final output
{
  "executionId":  "pex_abc",
  "status":       "success",
  "output":       "Dear team, here is the latest on robotics AI…",
  "node_results": [
    { "node_id": "n1", "status": "success", "latency_ms": 1240, "cost": 0.003 },
    { "node_id": "n2", "status": "success", "latency_ms": 820,  "cost": 0.002 },
    { "node_id": "n3", "status": "success", "latency_ms": 640,  "cost": 0.001 }
  ],
  "summary": { "total_latency_ms": 2700, "total_cost_usd": "0.006000" }
}

RAG & Knowledge Base

Augment agents with custom documents. Upload text, code, or data — it's chunked, embedded (OpenAI text-embedding-3-small), and stored in pgvector. Agents retrieve relevant context at runtime via cosine similarity search.

Standard RAG

Documents ingest → chunked → embedded → stored in pgvector. Agent retrieves top-k chunks at execution time via semantic search.

Agentic RAG

Agent decides when to search using a tool call pattern. More accurate for multi-step questions. Configure via system prompt.

GET
/api/rag/knowledge-bases

List knowledge bases you own.

POST
/api/rag/knowledge-bases

Create knowledge base. Body: { name, description, is_public }. Max 10 per account.

POST
/api/rag/ingest

Ingest document. Body: { knowledge_base_id, content, title, chunk_size, chunk_overlap }. Max 100KB.

GET
/api/rag/ingest?knowledge_base_id=

List documents in a knowledge base.

DELETE
/api/rag/ingest?document_id=

Delete a document and all its chunks.

POST
/api/rag/query

Semantic search. Body: { knowledge_base_id, query, top_k, threshold }. Returns context_string.

bash
# 1. Create a knowledge base
curl -X POST https://agentdyne.com/api/rag/knowledge-bases \
  -H "Authorization: Bearer agd_your_key" \
  -d '{ "name": "Product Docs", "description": "Internal product documentation" }'
# => { "id": "kb_abc123", "name": "Product Docs", "doc_count": 0 }

# 2. Ingest a document (up to 100KB per request, 1000 docs per KB)
curl -X POST https://agentdyne.com/api/rag/ingest \
  -H "Authorization: Bearer agd_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "knowledge_base_id": "kb_abc123",
    "title":   "Getting Started Guide",
    "content": "## Installation\n\nnpm install @agentdyne/sdk…",
    "chunk_size": 1200,
    "chunk_overlap": 200
  }'
# => { "document_id": "doc_xyz", "chunks_indexed": 8, "status": "indexed" }

# 3. Attach knowledge base to your agent (via Builder Studio or API)
curl -X PATCH https://agentdyne.com/api/agents/AGENT_ID \
  -d '{ "knowledge_base_id": "kb_abc123" }'
bash
# Semantic retrieval — called by the execute route automatically when
# the agent has a knowledge_base_id attached. You can also call it directly:
curl -X POST https://agentdyne.com/api/rag/query \
  -H "Authorization: Bearer agd_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "knowledge_base_id": "kb_abc123",
    "query":    "How do I install the SDK?",
    "top_k":    5,
    "threshold": 0.65
  }'
# Returns: { results: [{ content, document_title, similarity }], context_string }
# The context_string can be injected into an agent system prompt directly.
typescript
// Agentic RAG — agent decides when to retrieve via tool calls
// Add this to your agent's system prompt:
const AGENTIC_SYSTEM_PROMPT = `
You are a knowledgeable assistant with access to a knowledge base tool.

When asked a question that requires specific factual information:
1. Call search_knowledge_base(query) to retrieve relevant context
2. Use the returned context to formulate an accurate answer
3. Cite the source document when referencing specific facts
4. If no relevant context is found, clearly state the knowledge base
   does not contain information on this topic

Always prefer retrieved context over your training data for domain-specific questions.
`
External vector stores: For enterprise-scale RAG (100M+ vectors), use Pinecone or Qdrant via their MCP integrations. Add the Pinecone MCP server to your agent in Builder Studio → MCP Tools, then call upsert_vectors and query from your system prompt. The built-in RAG API (pgvector) handles up to ~10M vectors efficiently.

Agent Registry

Machine-readable agent discovery API — the 'DNS for agents'. Used by pipelines, orchestrators, and developer tooling to find the right agent by capability, cost, and quality.

GET
/api/registry

Capability-based agent discovery. Params: capabilities, category, input_type, output_type, max_cost, min_score, prefer (accuracy|speed|cost|balanced), limit.

GET
/api/registry/{id}

Full machine-readable agent schema: input_schema, output_schema, capability_tags, version history, seller.

bash
# Machine-readable agent discovery — "DNS for agents"
# Find all agents that can summarise text in under $0.01/call
curl "https://agentdyne.com/api/registry?capabilities=summarize&max_cost=0.01&prefer=cost" \
  -H "Authorization: Bearer agd_your_key"

# Response — machine-optimised (no UI cruft)
{
  "agents": [
    {
      "id":       "agent_abc",
      "endpoint": "https://agentdyne.com/api/agents/agent_abc/execute",
      "capability_tags": ["summarize","extract","classify"],
      "pricing":  { "model": "per_call", "price_per_call": 0.005 },
      "quality":  { "composite_score": 91.2, "accuracy_score": 94.1 }
    }
  ],
  "capability_graph": { "summarize": ["agent_abc", "agent_def"] },
  "composition_hints": [
    { "chain": ["agent_abc","agent_def"], "compatible_on": ["text"] }
  ]
}

# Full schema for a specific agent (input/output schemas, versions, seller)
curl "https://agentdyne.com/api/registry/AGENT_ID"

Credits API

Per-call and freemium agents deduct from your credit balance. Free agents and subscription agents do not use credits. Top up via Stripe Checkout.

GET
/api/credits

Balance, hard_limit, alert_threshold, transaction history. Params: page, limit.

POST
/api/credits

Create Stripe Checkout session to top up. Body: { package_id }. Returns { url }.

bash
# Get current credit balance
curl https://agentdyne.com/api/credits \
  -H "Authorization: Bearer agd_your_key"
# => { "balance": 12.50, "hard_limit": 50, "low_balance": false }

# Purchase credits (creates Stripe Checkout session)
curl -X POST https://agentdyne.com/api/credits \
  -H "Authorization: Bearer agd_your_key" \
  -d '{ "package_id": "credits_20" }'
# packages: credits_5 ($5), credits_20 ($22), credits_50 ($57), credits_100 ($120)
# => { "url": "https://checkout.stripe.com/…" }

MCP Integrations

40+ verified MCP (Model Context Protocol) servers. Attach tools to any agent in Builder Studio → MCP Tools tab. Tools appear in the agent's execution context — reference them in your system prompt.

typescript
// Attach MCP tools to an agent via the Builder Studio or API:
// PUT /api/agents/AGENT_ID (PATCH the mcp_servers field)

// In your system prompt, reference the tools by name:
const SYSTEM_PROMPT = `
You have access to the following tools:
- GitHub: read repositories, create pull requests, manage issues
- Supabase: query tables, run SQL, fetch records
- Slack: send messages, read channels

When the user asks you to perform an action that requires one of these tools,
use the tool explicitly before responding. Always confirm the action was
completed successfully before reporting to the user.
`

// Available MCP servers in Builder Studio:
// databases: supabase, postgres, mysql, mongodb, redis
// communication: gmail, slack, twilio, discord
// productivity: google-calendar, notion, google-drive, linear, asana
// development: github, filesystem, browserbase, puppeteer
// cloud: aws, gcp, cloudflare, vercel
// ai: anthropic, openai, pinecone, qdrant
// finance: stripe, plaid
// marketing: hubspot, salesforce
Browse all integrations

Webhooks

Real-time events pushed to your HTTPS endpoint. Register URLs in Settings → Webhooks. All events are HMAC-SHA256 signed.

typescript
// Register a webhook URL in Settings → Webhooks
// Every event is signed with HMAC-SHA256 in X-AgentDyne-Signature

// Next.js App Router handler:
export async function POST(req: Request) {
  const sig  = req.headers.get("x-agentdyne-signature") ?? ""
  const body = await req.text()

  // Verify signature (prevents spoofed events)
  const expected = await computeHmac(process.env.AGENTDYNE_WEBHOOK_SECRET!, body)
  if (sig !== expected) return new Response("Unauthorized", { status: 401 })

  const event = JSON.parse(body)
  switch (event.type) {
    case "execution.completed":  await onExecutionDone(event.data);  break
    case "execution.failed":     await onExecutionFailed(event.data); break
    case "agent.approved":       await onAgentApproved(event.data);  break
    case "payout.processed":     await recordPayout(event.data);     break
  }
  return Response.json({ received: true })
}

// Event types:
// execution.completed | execution.failed
// agent.approved | agent.rejected
// subscription.created | subscription.updated | subscription.canceled
// payout.processed | review.posted | credits.low

Rate Limits

Limits apply per API key and scale with your plan.

PlanCalls/monthReq/minConcurrency
Free50 lifetime31
Starter500103
Pro5,0003010
EnterpriseUnlimited20050

Error Codes

Standard HTTP codes plus AgentDyne machine-readable codes.

400

Bad Request

ValidationError

Missing or invalid parameters. Check agentId format and body JSON.

401

Unauthorized

AuthenticationError

Missing, invalid, or revoked API key.

402

Payment Required

InsufficientCreditsError

Credit balance below agent price (INSUFFICIENT_CREDITS).

403

Forbidden

SubscriptionRequiredError

Agent requires subscription (SUBSCRIPTION_REQUIRED) or PLAN_RESTRICTION.

403

Email Not Verified

EMAIL_NOT_VERIFIED

Verify your email before running agents.

403

Account Banned

AccountBanned

Account suspended — contact support@agentdyne.com.

404

Not Found

NotFoundError

Agent, pipeline, or resource does not exist.

413

Payload Too Large

InputTooLarge

Input exceeds 32KB limit for your plan.

422

Content Policy

CONTENT_POLICY

Input blocked by safety guardrails. See blocked_by field.

429

Quota Exceeded

QUOTA_EXCEEDED

Monthly execution quota reached. Upgrade or wait for next billing cycle.

429

Lifetime Limit

LIFETIME_QUOTA_EXCEEDED

Free plan 50-execution lifetime limit reached. Upgrade to Starter.

429

Compute Cap

COMPUTE_CAP_EXCEEDED

Monthly USD compute cap reached ($10 Starter / $50 Pro). Upgrade for higher cap.

429

Concurrency Limit

CONCURRENCY_LIMIT

Too many simultaneous executions. Free=1, Starter=3, Pro=10.

429

Rate Limit

RateLimitError

Too many requests per minute. Retry-After header contains wait seconds.

500

Server Error

InternalServerError

AgentDyne error. Retry with exponential back-off. ExecutionId is preserved for retry.

json
// Every error response has this shape:
{
  "error": "Human-readable message",
  "code":  "MACHINE_READABLE_CODE",   // e.g. QUOTA_EXCEEDED, INSUFFICIENT_CREDITS
  "retryAfter": 60                    // only on 429
}

// Common codes:
// QUOTA_EXCEEDED          — monthly call limit reached; upgrade plan
// INSUFFICIENT_CREDITS    — balance < agent price; top up at /billing
// SUBSCRIPTION_REQUIRED   — agent requires active subscription
// INJECTION_BLOCKED       — input rejected by security filter
// AGENT_NOT_CONFIGURED    — system prompt missing or too short

Need help?

We respond within 4 hours on Pro and Enterprise plans.

AgentDyne

Build once. Sell everywhere. The execution-grade marketplace where AI microagents go to production.

Product

  • Marketplace
  • Integrations
  • Builder Studio
  • Pricing
  • Changelog

Developers

  • Documentation
  • API Reference
  • SDKs
  • MCP Servers
  • Status

Company

  • About
  • Blog
  • Careers
  • Contact

Legal

  • Privacy Policy
  • Terms of Service
  • Security

© 2026 AgentDyne, Inc. All rights reserved.

All systems operational
v2.0.0Changelog