The triggerSchedule
mutation allows you to manually trigger an existing agent to run immediately.
Refer to the Agents documentation to learn more about how to configure and use them.
Signature
triggerSchedule(id: String!): Boolean!
This mutation can only be executed if you have view access for the agent.
Arguments
The unique identifier of the agent to trigger. You can find it in the URL of the agent edit page.
Response
Returns a Boolean
indicating whether the trigger was successful.
Usage Example
Trigger an existing agent schedule:
mutation TriggerAgent($scheduleId: String!) {
success: triggerSchedule(id: $scheduleId)
}
curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer your_api_key" \
-d '{
"query": "mutation TriggerAgent($scheduleId: String!) { success: triggerSchedule(id: $scheduleId) }",
"variables": {
"scheduleId": "schedule_987654321"
}
}' \
https://{ACCOUNT}.askwisdom.ai/graphql
{
"data": {
"triggerSchedule": true
}
}