Invoke Skill Workstream Draft
post
/api/v1/skills/workstream.draft/invokeDraft a new workstream conversationally β describe what you want and Archie produces a structured, reviewable workstream definition with typed steps, dependencies, and validation. Produces unified drafts targeting either inline or containerized execution mode. The canonical drafting entry; the legacy `playbook.creator` slug is retained only for API back-compat.
Describe the workstream you want in the `description` input and Archie drafts a structured, reviewable definition with typed steps, dependencies and validation. The reply gives the draft id, name, step count, validation warning count and version, or the one question to answer next. Drafting never activates a workstream; workstream.commit does that.
Request bodyapplication/json
| Field | Type | Description |
|---|---|---|
descriptionrequired | string | Natural-language description of the workstream to draft. |
topic_id | string | null | Topic to anchor the draft to β permakey (preferred) or UUID. |
prior_draft_id | string (uuid) | null | Optional prior draft to iterate on instead of creating a new one. |
name | string | null | Optional working name; context for the authoring agent, not a constraint. |
file_ids | string (uuid)[] | Source documents the authoring agent must read completely before drafting. |
thread | object[] | Prior authoring frames/messages for one-question-at-a-time refinement.item shapeEmpty object. |
draft_key | string | null | Stable caller identity for this conversational draft. |
target_execution_mode | "inline" | "containerized" | Canonical authoring creates inline WorkStreams. The legacy containerized authoring destination is refused; bounded agentic work uses agent_run steps.inlinecontainerized |
idempotency_key | string | null | Caller-supplied stable token. Replaying within 24h returns the previously-created draft id rather than generating a duplicate. |
Responses
200Skill executed successfully
| Field | Type | Description | |||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
skillrequired | string | β | |||||||||||||||||||||||||||||||||||||||||||||
outputrequired | object | Visible draft identity or the next single material clarification.show nested
| |||||||||||||||||||||||||||||||||||||||||||||
correlation_idrequired | string | β |
401Authentication required
| Field | Type | Description | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errorrequired | object | βshow nested
|
403Insufficient permissions
| Field | Type | Description | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errorrequired | object | βshow nested
|
404Skill not found
| Field | Type | Description | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errorrequired | object | βshow nested
|
429Rate limit exceeded
| Field | Type | Description | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errorrequired | object | βshow nested
|
5XXInternal server error
| Field | Type | Description | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errorrequired | object | βshow nested
|
curl https://api.dev.arch.ie/api/v1/skills/workstream.draft/invoke \
-X POST \
-H "Authorization: Bearer sk_..." \
-H "Content-Type: application/json" \
-d '{
"description": "string",
"topic_id": null,
"prior_draft_id": null,
"name": null,
"file_ids": [
"00000000-0000-0000-0000-000000000000"
],
"thread": [
{}
],
"draft_key": null,
"target_execution_mode": "inline",
"idempotency_key": null
}'