AI Function Tool
The Reminder plugin can be exposed to your agent's AI as a callable function. When enabled, the AI can schedule reminders autonomously during a conversation — for example, when a user asks to be reminded about an appointment or a follow-up.
How It Works
- The AI receives the function definition describing how to create a reminder.
- When the user's intent requires a reminder, the AI calls the function with the recipient's details and the desired send time.
- The plugin validates the call against the configuration's secret and creates the reminder item automatically.
- The AI receives a confirmation response and continues the conversation.
Getting the Function Definition
Retrieve the AI-readable function schema for a specific configuration:
GET /api/reminder/ai/function-definition?agentId={agentId}&configurationId={configurationId}&secret={secret}
The response contains the JSON schema the AI uses to understand the function's parameters, including field names, types, and descriptions. Register this definition with your agent's function tool settings in the CMS.
AI Create Reminder Endpoint
When the AI decides to create a reminder, it calls:
POST /api/reminder/ai/create-reminder?secret={secret}&configurationId={configurationId}
Request body:
| Field | Type | Description |
|---|---|---|
userId | string | The recipient's phone number (without country code). The plugin maps this to the reminder's phoneNumber field. |
message | string | The reminder message content. Stored as the first template parameter. |
sendTime | datetime | The exact date and time to deliver the reminder. Must be in the future. |
context | string | Optional. Additional context from the conversation for logging. |
Example request:
{
"userId": "81234567890",
"message": "Don't forget your appointment with Dr. Sari tomorrow at 09:00.",
"sendTime": "2025-06-01T08:00:00",
"context": "User asked for a reminder during appointment booking flow"
}
Authentication
The AI must pass the configuration's Secret in the secret query parameter. This is the same secret generated when the configuration was created. The Dialog service holds this secret and passes it automatically when invoking the function on behalf of an agent.
Never expose the secret in client-facing code or logs.
Validation Rules
The plugin enforces the following on AI-created reminders:
sendTimemust be in the future. Reminders scheduled in the past are rejected.userIdmust be a non-empty string.messagemust be a non-empty string.- The configuration's
serverStatemust berunning. If paused, the call is rejected.
Function Name Generation
You can use the AI to generate a descriptive function name based on your plugin's purpose. This makes the function identifiable to the agent's AI model.
POST /api/reminder/configuration/generate-function-name
Request body:
{
"description": "Schedule follow-up reminders for insurance renewal conversations"
}
Response:
{
"functionName": "schedule_insurance_renewal_reminder"
}
Use this name when registering the function in your agent's tool settings.
Related Pages
- Plugin Setup — where the Secret credential is generated.
- Create Reminder Items — manual reminder creation.
- Processing and Delivery — how AI-created reminders are delivered.
- Reminder Overview