Skip to main content
Use the developer AOP API to run saved Agent Operating Procedures from an external system. For a known operation on a large product ID list, run a Windmill script directly. Direct script execution does not require an AOP and keeps the ID list out of model context. OmniCommerce’s script routes require an app session; they do not use this guide’s developer bearer-token authentication. Interactive playground: API reference · Spec: openapi.json

Authentication

API keys created from organization settings receive all developer scopes by default. Existing keys created before this API shipped need aops:read / aops:write added in organization settings.
OAuth clients must include the scope on the client. Session-authenticated calls must include organizationId in the query (GET) or JSON body (writes). Do not send organizationId for API-key requests. aopId in the path (and aop_id in JSON responses) is the OmniCommerce AOP id from /app/{organizationId}/aops.

Execute an AOP

1

Start the run

The AOP id is in the path. Optional user_inputs go in the JSON body. The response returns immediately with a thread_id.
2

Poll until terminal

Status values: running, completed, failed. Terminal responses include conversation messages by default. Pass include_messages=true to force messages while the run is still in progress.

Request body

user_inputs values are strings (up to 8,000 characters each), numbers, or booleans. Objects and arrays are not accepted directly.

Response

trigger_type is always api for this endpoint.

Poll status

conversation_asset includes linked_aops, last_message, and metadata.run_status (including awaiting_approval).

Retry a failed run

Only failed AOP runs can be retried. Optional user_inputs replace the original values; omit them to reuse the failed run’s inputs. Response:

Create an AOP

Use [[ placeholder ]] in the prompt for execution-time inputs. Omni validates a name of at least 2 characters and a prompt of at least 10 characters. Response includes aop_id, title, status: "created", and parent_folder_id. Tool and toolkit selections combine with structured @mention links in the prompt to form the AOP run’s allowed tools. When neither is specified, the run inherits its assigned agent’s tools. Plan mode and result submission remain available as run controls. Model selection follows AOP override, Project model (for Project sessions), assigned agent model, then organization default.

Read and overwrite config

GET returns prompt, agentId, structured_inputs (computed from placeholders), structured_output, and notification settings. PUT updates provided fields only. Omitted fields keep their current values. Send user_notification_configs: null to clear notification overrides.

Errors

Field notes