Skip to main content
POST
/
run_agent
cURL
curl --request POST \
  --url https://backend.trykura.com/run_agent \
  --header 'Content-Type: application/json' \
  --data '{
  "agent_id": "<string>",
  "parameters": {},
  "api_key": "<string>",
  "auth_token": "<string>",
  "run_async": true
}'
{
  "agent_run_url": "https://app.trykura.com/public-session-viewer/250ba43a-9597-486a-b718-aa61280fdd65",
  "session_id": "250ba43a-9597-486a-b718-aa61280fdd65",
  "agent_output": "<any>",
  "error_message": "<string>"
}

Body

application/json
agent_id
string
required

Unique identifier for the agent

api_key
string
required

API key for authentication

parameters
object

Key-value pairs of parameters for the agent run

auth_token
string | null

Optional token obtained from the /api/create_agent_auth_profile endpoint that allows the agent to access encrypted authentication data. This token can only be used with the specific agent_id it was generated for.

run_async
boolean
default:true

Controls whether the agent runs asynchronously. When set to false, the request will block until the agent completes execution.

Response

Agent run initiated successfully

Response schema for agent run

agent_run_url
string
required

URL to view the agent running in the web interface

Example:

"https://app.trykura.com/public-session-viewer/250ba43a-9597-486a-b718-aa61280fdd65"

session_id
string
required

Unique identifier for the created session

Example:

"250ba43a-9597-486a-b718-aa61280fdd65"

agent_output
any

Output from the agent execution. Only included when run_async is set to false.

error_message
string | null

Error message if the agent execution failed. Only included when run_async is set to false.

I