Agents & revisions
Create a role, edit its draft and publish a version you can inspect.
Draft, live and paused
Creating an agent creates its starting draft. It does not start a runtime. Saving a draft does not publish it. Validation checks the configured gates; publication creates an immutable revision and makes it the live revision.
Read draft_version before editing or publishing. A stale version conflicts instead of overwriting someone else’s work. Pause and resume control the agent lifecycle; they do not erase its revision history.
Endpoints
| Method | Path | Scope |
|---|---|---|
| GET | /v1/agents | read |
| POST | /v1/agents | write |
| GET | /v1/agents/{id} | read |
| GET | /v1/agents/{id}/draft | read |
| PATCH | /v1/agents/{id}/draft | write |
| POST | /v1/agents/{id}/draft/validate | read |
| POST | /v1/agents/{id}/publish | write |
| GET | /v1/agents/{id}/revisions | read |
| POST | /v1/agents/{id}/pause | write |
| POST | /v1/agents/{id}/resume | write |
Create a named draft
Creating an agent returns 201 and an editable starting draft. It does not start a runtime. Choose a name that describes its job, then configure the draft in your workspace.
curl -X POST "$MUWKL_BASE_URL/v1/agents" \
-H "Authorization: Bearer $MUWKL_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $AGENT_REQUEST_ID" \
-d '{"name":"Customer care"}'Validate before publishing
POST to draft/validate with read scope and an empty JSON object. This is a read operation: it does not need an Idempotency-Key. A 200 can contain valid: false. Inspect failures and validation_scope; passing the implemented checks does not enable a runtime or channel.
curl -X POST "$MUWKL_BASE_URL/v1/agents/$AGENT_ID/draft/validate" \
-H "Authorization: Bearer $MUWKL_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'Read the current draft
Read before editing. The configuration object is the saved draft, which may not yet pass publication validation. Use the returned version for the next edit.
curl "$MUWKL_BASE_URL/v1/agents/$AGENT_ID/draft" \
-H "Authorization: Bearer $MUWKL_API_KEY"Inspect revision history
Revisions are listed by descending revision number. The limit defaults to 25 and accepts 1–100. Pass before as an exclusive revision-number cursor; next_cursor is null for a short page. Configuration history and runtime outcomes are different records.
Need a hand? Get in touch