Skip to main content
POST
/
agents
/
{agentId}
/
execute
Execute an agent
curl --request POST \
  --url https://odyssey.asteroid.ai/agents/v2/agents/{agentId}/execute \
  --header 'Content-Type: application/json' \
  --header 'X-Asteroid-Agents-Api-Key: <api-key>' \
  --data '{
  "agentProfileId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "dynamicData": {},
  "metadata": {},
  "tempFiles": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "name": "<string>"
    }
  ],
  "version": 123
}'
{
  "executionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}

Authorizations

X-Asteroid-Agents-Api-Key
string
header
required

Path Parameters

agentId
string<uuid>
required

The ID of the agent to execute

Body

application/json

Execution request parameters

agentProfileId
string<uuid>

The ID of the agent profile to use. Note this is not the agent ID

dynamicData
object

Dynamic data to be merged into the placeholders defined in prompts

metadata
object

Optional metadata key-value pairs (string keys and string values) for organizing and filtering executions

tempFiles
object[]

Array of temporary files to attach to the execution. Must have been pre-uploaded using the stage file endpoint

version
integer

The version of the agent to execute. If not provided, the latest version will be used.

Response

The request has been accepted for processing, but processing has not yet completed.

executionId
string<uuid>
required

The ID of the newly created execution