CreateRunBody

Request body for `POST /api/runs` — the single endpoint to execute any entity. `id` is a prefixed entity ID (agt_, fun_, swm_, wfl_) — the handler detects the entity type from the prefix. `input` defaults to `{ text: string }` but accepts any JSON object when the entity defines a custom input schema.

Definition

TypeScript
interface CreateRunBody {
  id: string;
  input: Record<string, unknown>;
  mode?: "sync" | "async" | undefined;
}

Fields

FieldTypeNotes
idstringreadonly required — Prefixed ID of the entity to run. Entity type is derived from the prefix.
inputRecord<string, unknown>required — Input payload; defaults to { text: string } when the entity has no custom input schema.
mode"sync" | "async" | undefinedoptional — Execution mode; defaults to the entity's configured mode.