Developers - Pocodot

Build on Pocodot

Extend the platform with custom agents, integrate via API, and distribute through the marketplace - all with token-based, pay-as-you-go billing.

We're building the SDK and API. Join the waitlist to get early access.

Token-based billing

Pay only for what your agents consume. No seat fees, no minimums.

SSE streaming

Real-time streamed responses via Server-Sent Events. Sub-second first tokens.

Marketplace distribution

List your agent in the marketplace and reach thousands of teams instantly.

Get running in minutes

Install the SDK, authenticate, and run your first agent in under 10 lines of code.

Preview - SDK not yet released. Code snippets show the planned interface.

1 · Install

npm install @pocodot/sdk

2 · Authenticate

import { Pocodot } from "@pocodot/sdk";

const client = new Pocodot({
  apiKey: process.env.POCODOT_API_KEY,
});

3 · Run an agent

const stream = await client.agents.run("inbox-triage", {
  context: "Summarise my unread emails",
});

for await (const chunk of stream) {
  process.stdout.write(chunk.content);
}

4 · Handle SSE stream (low-level)

const res = await fetch(
  "https://api.pocodot.ai/api/poco/edge/run-agent",
  {
    method: "POST",
    headers: {
      Authorization: "Bearer YOUR_JWT",
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      agentId: "inbox-triage",
      config: { context: "..." },
    }),
  }
);

const reader = res.body.getReader();
const decoder = new TextDecoder();
let buffer = "";

while (true) {
  const { done, value } = await reader.read();
  if (done) break;
  buffer += decoder.decode(value, { stream: true });

let idx;
  while ((idx = buffer.indexOf("\n")) !== -1) {
    const line = buffer.slice(0, idx).trim();
    buffer = buffer.slice(idx + 1);
    if (!line.startsWith("data: ")) continue;
    const payload = line.slice(6);
    if (payload === "[DONE]") break;
    const json = JSON.parse(payload);
    process.stdout.write(
      json.choices?.[0]?.delta?.content ?? ""
    );
  }
}

REST endpoints

All endpoints accept JSON and return JSON (or SSE for streaming). Authenticate with a Bearer JWT.

Preview - API endpoints are in development. Documentation shown is a preview of the planned interface.

POST

/api/poco/edge/submit-agent

Submit an agent for marketplace review.

Request body

{
  "name": "My Agent",
  "tagline": "Does amazing things",
  "description": "Detailed description…",
  "category": "productivity",
  "complexity": "beginner",
  "setup_time": "5 min",
  "connections": ["Slack", "Gmail"],
  "tags": ["automation", "ai"],
  "example_input": "Sample input",
  "example_output": "Expected output",
  "author_name": "Jane Doe",
  "author_email": "jane@example.com"
}

Response · 200

{ "success": true, "submissionId": "uuid-here" }

POST

/api/poco/edge/run-agent

Execute an agent and stream the response via SSE.

Request body

{
  "agentId": "inbox-triage",
  "config": { "context": "Your input data here" }
}

Response · SSE stream

data: {"choices":[{"delta":{"content":"Hello"}}]}

data: {"choices":[{"delta":{"content":" world"}}]}

data: [DONE]

POST

/api/poco/edge/execute-action

Trigger a post-run action (Slack, webhook, email).

Request body

{
  "actionType": "webhook-trigger",
  "payload": {
    "webhookUrl": "https://your-api.com/hook",
    "agentName": "inbox-triage",
    "output": "Agent result text…"
  }
}

Response · 200

{ "success": true, "result": { … } }

Receive real-time events

Get notified when agent runs complete, errors occur, or submissions change status.

Create an endpoint

Stand up an HTTPS endpoint on your server that accepts POST requests with a JSON body.

Register in Pocodot

Go to your developer settings and paste your endpoint URL. Choose which events to subscribe to.

Handle payloads

Parse the incoming JSON. Each event includes the agent ID, run ID, output, and a timestamp.

Verify signatures

Validate the X-Pocodot-Signature header using HMAC-SHA256 with your webhook secret.

Example payload

{
  "event": "agent.run.completed",
  "agent_id": "inbox-triage",
  "run_id": "run_abc123",
  "output": "Here are the key takeaways…",
  "timestamp": "2026-03-04T12:00:00Z",
  "signature": "sha256=…"
}