Skip to main content
Run AI agent
import requests
import json

url = 'https://api.simplex.sh/agentic'
headers = {
    'X-API-Key': 'your_api_key_here'
}
data = {
    'task': 'Find and click the login button',
    'max_steps': 10,
    'session_id': 'your_session_id',
    'variables': json.dumps({'username': 'user@example.com'})  # Optional JSON string
}

response = requests.post(url, headers=headers, data=data)
print(response.json())
{
  "succeeded": true,
  "result": {},
  "error": "<string>"
}
This is an agent you can run “on the fly” without needing to first define it in the Simplex dashboard. Useful when you’re whitelabeling Simplex to allow your customers to type their own prompts.

Authorizations

X-API-Key
string
header
required

Simplex API Key

Body

application/json
task
string
required

The task for the agent to perform.

session_id
string<uuid>
required

ID of the session to connect to.

max_steps
integer
default:10

Maximum number of steps the agent can take.

actions_to_exclude
string[]

List of actions to exclude.

variables
string

JSON string of variables to use in the task.

Response

Agentic response

succeeded
boolean
required

Whether the agent task succeeded.

result
object

The result of the agent task.

error
string

Error message if the task failed.

I