Create AOP

Beta

Create a new AOP (Agent Operating Procedure) asset with the given configuration. The created AOP can then be executed via /aop/execute-async, inspected via /aop/{asset_id}/config, and updated via PUT /aop/{asset_id}/config. Use [[ placeholder ]] syntax in the prompt for user inputs supplied at execution time.

Authentication

X-API-KEYstring
API Key authentication via header
OR
AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

This endpoint expects an object.
agentIdstring or nullOptional
ID of the agent to use for execution
agent_configmap from strings to any or nullOptional
Full agent configuration override for this AOP
descriptionstring or nullOptional

Human-readable description of what the AOP does

iconstring or nullOptional
Icon identifier for UI display
parent_folder_idstring or nullOptional

ID of the folder to create the AOP in (workspace root if omitted)

promptstring or nullOptional

The main prompt/instructions for the AOP. Use [[ placeholder ]] syntax for user inputs supplied at execution time

sectionstring or nullOptional

Section/category for organization

structured_outputmap from strings to any or nullOptional
JSON schema for structured output
titlestring or nullOptional

Title of the AOP (defaults to ‘Untitled AOP’)

user_notification_configsmap from strings to maps from strings to any or nullOptional

Per-user notification preferences. Map of user_id -> notification config controlling who receives AOP result notifications

workspace_idstring or nullOptional

ID of the workspace to create the AOP in. If not provided, the parent folder’s workspace is used when parent_folder_id is provided; otherwise the AOP is created in the user’s current workspace. The user must be a member of the specified workspace.

Response

AOP created successfully
asset_idstring
ID of the newly created AOP asset
titlestring
Title of the created AOP
messagestringDefaults to AOP created successfully

Human-readable status message

parent_folder_idstring or null
ID of the parent folder
statusstringDefaults to created
Status of the operation
workspace_idstring or null
ID of the workspace that owns the created AOP

Errors

400
Bad Request Error
401
Unauthorized Error
404
Not Found Error
422
Unprocessable Entity Error
500
Internal Server Error