> ## 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.wisdom.ai/setting-up-wisdom-ai/agents/agents.md) 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.

## Arguments

**id** `String!` *required*

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:

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

```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
```

```json Response theme={null}
{
  "data": {
    "triggerSchedule": true
  }
}
```

## Related operation

> [card] [Send User Message](https://docs.wisdom.ai/integrations/graphql-api/mutations/chat/send-user-message.md)
>
> Send a message to the conversation


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.