> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wisdom.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Trigger Agent

The `triggerSchedule` mutation allows you to manually trigger an existing agent to run immediately.

Refer to the [Agents documentation](https://docs.askwisdom.ai/advanced-features/agents/agents) to learn more about how to configure and use them.

## Signature

```graphql theme={null}
triggerSchedule(id: String!): Boolean!
```

<Note>
  This mutation can only be executed if you have view access for the agent.
</Note>

## Arguments

<ParamField path="id" type="String!" required>
  The unique identifier of the agent to trigger. You can find it in the URL of the agent edit page.
</ParamField>

## Response

Returns a `Boolean` indicating whether the trigger was successful.

## Usage example

Trigger an existing agent schedule:

```graphql theme={null}
mutation TriggerAgent($scheduleId: String!) {
  success: triggerSchedule(id: $scheduleId)
}
```

<RequestExample>
  ```bash Request theme={null}
  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
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "data": {
      "triggerSchedule": true
    }
  }
  ```
</ResponseExample>

## Related operation

<CardGroup cols={2}>
  <Card title="Send User Message" icon="message" href="/integrations/graphql-api/mutations/chat/send-user-message">
    Send a message to the conversation
  </Card>
</CardGroup>
