waitForRun family: agent, action or format for a run id?
In @sume-com/sdk, waitForRun needs family: format, action or agent because a run id does not say which surface it belongs to. Use agent for Agent Completions.

Pass family: "agent" for an Agent Completion run id, "action" for a schedule run and "format" for a Format run. The SDK docs say family is required and cannot be inferred, because the three families live behind different URL prefixes.
Everything here is from Waiting for runs and jobs and Agent Completions, read 2026-09-30.
Which family reads which URL?
| `family` | URL prefix | Run source |
|---|---|---|
"format" | /v1/format-runs/... | Format runs |
"action" | /v1/action-runs/... | Scheduled runs |
"agent" | /v1/agent-runs/... | Agent Completions |
What does a wrong family do?
The Agent Completions docs say an Action or Format run id will not resolve on the agent route: it returns 404 agent_run_not_found. The family also types the return value, so family: "format" resolves as PublicFormatRun.
What does the call look like?
Pass the client you created, because the module default client has no key. The default timeout is 10 minutes and it throws SumeRunTimeoutError when it elapses, without canceling the run.
import { createSumeClient, waitForRun } from "@sume-com/sdk";
const client = createSumeClient({ apiKey: process.env.SUME_API_KEY! });
const run = await waitForRun("agrun_demo", {
client,
family: "agent",
onStatus: (status, snapshot) => console.log(status, snapshot.next_action),
});
console.log(run.status);What if I would rather not poll?
Pass communication.webhook_url when you create the completion and take the signed agent.run.terminal event instead. Keep the poll as a fallback.
What does the receipt hold when it finishes?
A completed run fills output, by default the sume/action-run-output/v1 shape, with the agent's closing text in output.text and any generated media in output.images, output.videos, output.audio and output.files, plus artifacts and the spend in usage. The helpers resolve for any terminal status, so read status and error on the receipt rather than expecting a throw for a failed run.
Sources
Related posts
More in Developers
- Webhook rate limits: Zapier, Airtable, Pipedream vs a bulk of 100
Zapier, Airtable and Pipedream each publish a webhook intake limit. Compare them with a Sume bulk queue of up to 100 items and pick a receiver that fits.
- What not to log from an AI API: keys, signed URLs, private media
Safe to log: request ids, job ids, status and sanitized media metadata. Unsafe: API keys, signed URLs, raw private media URLs and excess user content.
- Zapier Catch Hook test trigger with Sume Send test
Zapier lists the three most recent webhooks from the past hour. Use Sume's Send test to put a signed webhook.test sample there before a real run exists.
- Will a 100-item Sume bulk run hit Zapier's webhook rate limit?
A Sume bulk queue holds up to 100 items, each with its own webhook. Compare that with Zapier's per-Zap webhook limit and know what Sume does on a 429.
Written by Sume