Prerequisites
Use an application you can write. The workflow must use only task types admitted for application workspaces.
Upload one workflow
curl -X PUT https://api.agent.mq/v1/applications/app_<32-lowercase-hex>/flows \
-H "Authorization: Bearer $AGENTMQ_TOKEN" \
-H "Content-Type: text/plain" \
--data-binary @workflow.yamlThe YAML is limited to 512,000 characters. Its tenant ID must equal the application ID, and it needs an id and namespace.
Publish the workflow as an operation
PUT /v1/applications/{appId}/workflow-operations/{id} pins the current workflow revision and records its name and whether it requires an end user.
Discover it with an Agent key
The published operation appears in GET /v1/agent/applications/{appId}/operations with a generated input schema.
Verify
GET /v1/applications/{appId}/workflow-operations returns the published revision. Withdrawing it prevents new Agent calls without changing historical receipts.