Run your assistants
from code.
Everything you can do in the dashboard, you can do from code with a clean REST API and a typed SDK. Set up assistants, give them work, follow their activity as it happens, and connect events — all from the tools you already use.
Install the SDK. Add a key.
One package, one bearer token. The SDK is a thin, fully-typed wrapper over the same endpoints you can hit with curl.
# install the typed client
$ npm i @servemy/sdk
# or pin it in your agent service
$ pnpm add @servemy/sdk# every request carries a bearer token
curl https://api.servemy.ai/v1/agents \
-H "Authorization: Bearer $SERVEMY_KEY" \
-H "Idempotency-Key: deploy-2026-05-30"Deploy, then
watch it work.
Set up an assistant, give it work, and read its actions back as an async stream. No polling, no plumbing — it's live the moment the promise resolves.
- Fully typed — autocomplete every field
- Async iterators over the live action log
- Same surface in CI, edge or a backend
import { ServeMy } from "@servemy/sdk";
const sm = new ServeMy({ apiKey: process.env.SERVEMY_KEY });
// provision an OpenClaude unit in us-east
const agent = await sm.agents.deploy({
blueprint: "openclaude",
name: "Goose",
region: "us-east",
inference: "managed-frontier",
});
// hand it the mission
await sm.agents.task(agent.id, {
goal: "Triage new issues and open fix PRs",
schedule: "every 30m",
});
// stream every action as it happens
for await (const ev of sm.agents.logs(agent.id)) {
console.log(ev.at, ev.action);
}Five endpoints. Whole lifecycle.
Deploy, inspect, task, observe, tear down. Every call is JSON over HTTPS against api.servemy.ai.
/v1/agentsSet up a new assistant/v1/agents/:idCheck its status, region and activity/v1/agents/:id/tasksGive the assistant work to do/v1/agents/:id/logsFollow its activity as it happens/v1/agents/:idShut it down when you're doneSafe to put in a pipeline.
Idempotent deploys
Pass an Idempotency-Key and retry safely. The same key never spins up a second runtime — ship from CI without fear of duplicates.
Webhooks & events
Subscribe to agent.deployed, task.completed and incident.raised. Signed payloads land on your endpoint the moment something happens.
Scoped API keys
Mint keys per environment with read, deploy or admin scopes. Rotate or revoke any key instantly — nothing else has to change.
Bearer tokens,
scoped to the job.
Authenticate with a single bearer token in the Authorization header. Mint a key per environment, give it only the scope it needs, and rotate it anytime — old keys revoke the instant you roll a new one.
- read
- Inspect agents, metrics and logs
- deploy
- Create, task and tear down agents
- admin
- Manage keys, webhooks and billing
# mint a deploy-scoped key for CI
curl -X POST https://api.servemy.ai/v1/keys \
-H "Authorization: Bearer $ADMIN_KEY" \
-d '{ "scope": "deploy", "label": "ci" }'
# → { id: "key_4f2a", token: "sk_live_…" }
# rotate it whenever — old token dies at once
curl -X POST https://api.servemy.ai/v1/keys/key_4f2a/rotate \
-H "Authorization: Bearer $ADMIN_KEY"Put assistants behind your code
Set up your first assistant in the dashboard, then move to the API once you're ready to automate.