Agents¶
Agents are automated tasks that run against your datasources to generate insights, perform analysis, and execute workflows.
Overview¶
Agents allow you to:
- Define reusable analysis tasks
- Run tasks on demand
- Schedule tasks to run automatically
- Track execution history and results
Key concepts¶
Task¶
An agent task includes:
namedatasourcesprompt- execution settings (thinking, mode)
- automation configuration
Execution¶
Tasks can be:
- run manually
- triggered automatically on a schedule
Status¶
Common task states:
readyrunningerror
GET /api/v1/secure/agent/tasks¶
List all agent tasks.
Authentication required¶
Bearer JWT
Response¶
Notes¶
- Pagination exists internally but is not exposed
- Default page size is 20
GET /api/v1/secure/agent/task/:task_id¶
Retrieve a single agent task.
Path params¶
task_id(required)
Response¶
{
"error": false,
"message": "agent task retrieved",
"task": {
"id": "string",
"name": "string",
"prompt": "string",
"datasources": ["string"],
"status": "string",
"steps": [],
"answer": "string",
"created_at": "string",
"updated_at": "string",
"last_run_at": "string | null",
"automation_enabled": "boolean",
"automation_interval": "integer"
}
}
POST /api/v1/secure/agent/task¶
Create a new agent task.
Body¶
Response¶
{
"error": false,
"message": "agent task created",
"task": {
"id": "string",
"name": "string",
"status": "ready"
}
}
Notes¶
name,datasources, andpromptare required- Default values:
mode:solvestatus:readyautomation_enabled: falseautomation_interval: 15
GET /api/v1/secure/agent/task/run/:task_id¶
Run an agent task manually.
Path params¶
task_id
Response¶
Notes¶
- Task transitions to
runningstate - Execution happens asynchronously
POST /api/v1/secure/agent/task/schedule¶
Enable or update task automation.
Body¶
Response¶
Validation rules¶
task_idandautomation_intervalare required
Interval rules¶
If thinking = true, allowed values:
- 15
- 30
- 60
- 120
- 1440
If thinking = false:
- range: 1 to 1440 minutes
Notes¶
- Interval is defined in minutes
- Scheduling runs in background
DELETE /api/v1/secure/agent/task/delete/:task_id¶
Delete an agent task.
Response¶
Validation rules¶
Task can be deleted only if:
- status is
readyorerror - OR
runningbut last run was more than 10 minutes ago
GET /api/v1/secure/agent/taskhistory/:task_id¶
Retrieve execution history for a task.
Response¶
Notes¶
- History includes steps and outputs
- Pagination exists internally but not exposed
totalmay not strictly match filtered task results
Lifecycle¶
- Create task
- Run manually or schedule
- Task executes
- Results stored in history
Best practices¶
- Keep prompts clear and focused
- Use specific datasources
- Validate scheduling intervals
- Monitor task status and history
- Avoid running overlapping long tasks