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

# Building a Personal Assistant Bot

> Create an advanced AI assistant with multiple MCP servers for complex workflows

Build a sophisticated personal assistant that can manage your schedule, search the web, send reminders, look up locations, and execute complex multi-step workflows. This advanced guide demonstrates how to combine multiple MCP servers to create a truly autonomous AI assistant.

## What You'll Learn

By the end of this guide, you'll have:

* A personal assistant bot with multiple capabilities
* Understanding of how to orchestrate multiple MCP servers
* Knowledge of building complex agentic workflows
* Real-world examples of autonomous task execution
* Best practices for advanced bot configuration

## Prerequisites

This is an advanced guide. You should have:

* Completed the [Basic Support Bot](https://docs.chatbotplatform.io/guides/support-bot-basics.md) and [Grounded Support Bot](https://docs.chatbotplatform.io/guides/grounded-support-bot.md) guides
* Understanding of Agentic Loops and MCP servers
* Experience with API integrations
* Familiarity with webhook callbacks
* 30-45 minutes for setup and testing

## What Makes a Personal Assistant Different?

Unlike support bots that answer questions, personal assistants:

* **Take Actions**: Not just responding, but doing things on your behalf
* **Multiple Tools**: Use 3+ MCP servers simultaneously
* **Complex Workflows**: Chain multiple steps together
* **Proactive**: Can run scheduled tasks without user prompting
* **Contextual**: Remember preferences and past interactions

### Example Capabilities

**Schedule Management**

* "Remind me to call John at 3 PM tomorrow"
* "What's on my calendar for next week?"

**Information Lookup**

* "What's the weather in San Francisco?"
* "Find coffee shops near Times Square"
* "Search for the latest news on AI"

**Task Automation**

* "Every Monday at 9 AM, send me a summary of my week"
* "When I arrive at the office, remind me to check with the team"

**Data Processing**

* "Analyze my conversation history and find common questions"
* "Summarize the key points from my last 10 conversations"

## Step 1: Create the Personal Assistant Bot

**1. Create a New Bot**

Create a bot specifically for personal assistant tasks:

* **Name**: "Personal Assistant"
* **Description**: "AI assistant for scheduling, reminders, and information lookup"

**2. Connect to Slack**

For a personal assistant, Slack works well:

1. Go to [api.slack.com/apps](https://api.slack.com/apps)
2. Create a new Slack app
3. Configure OAuth scopes: `chat:write`, `chat:read`, `im:history`, `im:write`
4. Install to your workspace
5. Copy Bot Token and Signing Secret
6. Add Slack channel in Chatbot Platform

![Slack configuration](https://mintlify.s3.us-west-1.amazonaws.com/chatbotplatform/images/screenshots/03-channels/02_slack_form.png)

Slack channel setup

**3. Configure Behavior**

Set bot behaviors for natural interaction:

* **Typing Indicators**: Enabled
* **Reply Detection**: Thread-based (for Slack)
* **Context Window**: 20 messages (longer for assistants)
* **Response Timeout**: 60 seconds (complex tasks take time)

## Step 2: Create the Agentic Loop

**1. Create Advanced Loop**

Create a new agentic loop with these settings:

* **Name**: "Personal Assistant Loop"
* **Description**: "Multi-tool autonomous assistant"
* **Max Iterations**: 20 (allow complex multi-step workflows)
* **Model**: Claude 3.5 Sonnet or GPT-4 (required for complex reasoning)

**2. Write Comprehensive System Prompt**

Define the assistant's capabilities and personality:

```
You are a helpful personal AI assistant with access to multiple
tools to help with scheduling, reminders, information lookup,
and task automation.

Available capabilities:
- Time: Check current date/time, convert timezones
- Conversation Context: Set reminders and search past conversations
- HTTP: Search web, call APIs, fetch information
- Google Maps: Find locations, get directions, search places

When a user makes a request:
1. Break it down into steps
2. Determine which tools you need
3. Execute tool calls in the right order
4. Combine results into a helpful response
5. Confirm completion of the task

Personality:
- Professional but friendly
- Proactive in suggesting next steps
- Clear about what you can and cannot do
- Ask clarifying questions when needed

Examples:

Request: "Remind me to call John tomorrow at 3 PM"
Steps:
1. Use time tool to get current date
2. Calculate timestamp for tomorrow 3 PM
3. Use reminder tool to create reminder
4. Confirm: "I'll remind you to call John tomorrow at 3:00 PM"

Request: "Find me a coffee shop near Central Park"
Steps:
1. Use Google Maps to search "coffee shop near Central Park, NYC"
2. Get top results with ratings
3. Format as list with names, ratings, addresses
4. Ask if user wants directions to any of them

Request: "What did I talk about with Sarah last week?"
Steps:
1. Use conversation archive tool to search for "Sarah"
2. Filter by last 7 days
3. Summarize key discussion points
4. Provide specific quotes if relevant
```

## Step 3: Add Multiple MCP Servers

Connect all the tools your assistant needs.

**1. Add Time Server**

For date/time awareness:

1. Add MCP Server → **Time**
2. Timezone: Your timezone (e.g., `America/New_York`)
3. Save

The assistant can now:

* Get current date and time
* Convert between timezones
* Calculate time differences

**2. Add Conversation Context Server**

For reminders and conversation history:

1. Add MCP Server → **Conversation Context**
2. Configure webhook URL to receive reminder notifications
3. Save

The assistant can now:

* Create one-time and recurring reminders
* List and manage upcoming reminders
* Access archived conversation summaries
* Search past conversations

**3. Add HTTP Client Server**

For web searches and API calls:

1. Add MCP Server → **HTTP Client**
2. Allow all domains or specify trusted domains
3. Save

The assistant can now:

* Search the web
* Fetch data from APIs
* Call your custom services

**4. Add Google Maps Server**

For location-based queries:

1. Add MCP Server → **Google Maps**
2. Enter your Google Maps API key
3. Save

The assistant can now:

* Search for places
* Get directions
* Find nearby businesses
* Geocode addresses

**5. Add OpenRouter Server (Optional)**

For advanced AI model switching:

1. Add MCP Server → **OpenRouter**
2. Enter your OpenRouter API key
3. Save

The assistant can now:

* Switch between AI models mid-conversation
* Use specialized models for specific tasks
* Compare outputs from different models

The AI will automatically see all available tools and decide which ones to use based on the user's request. You don't need to explicitly tell it which tool to use for each task.

## Step 4: Set Up Reminder Callbacks

Configure callbacks so your assistant can send reminders when they're due.

**1. Create Callback Endpoint**

Create a webhook that receives reminder notifications:

```javascript theme={null}
// Your callback endpoint
app.post('/reminder-callback', async (req, res) => {
  const { reminder, user_id, original_message } = req.body;

  // Send reminder via Chatbot Platform API
  await fetch('https://api.chatbotplatform.io/v1/messages', {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      bot_id: 'bot_123',
      channel_type: 'slack',
      user_id: user_id,
      message: `⏰ Reminder: ${reminder.message}`
    })
  });

  res.json({ success: true });
});
```

**2. Configure Callback in Agentic Loop**

Add the callback URL to your agentic loop:

1. Go to loop settings → **Callbacks**
2. Add webhook URL: `https://yourapi.com/reminder-callback`
3. Add authentication headers if needed
4. Save

**3. Test Reminders**

Test by asking the assistant:

```
"Remind me to test the system in 2 minutes"
```

After 2 minutes, you should receive the reminder message.

## Step 5: Connect Loop to Bot

**1. Create Integration**

In your bot's Integrations tab:

* **Name**: "Personal Assistant Loop"
* **Webhook URL**: Your agentic loop webhook URL
* **Headers**: Include API authentication
* **Timeout**: 60 seconds
* **Weight**: 100

**2. Test the Integration**

Use the built-in test feature:

```
Test message: "What time is it in Tokyo?"
```

The agent should:

1. Use the time tool to get current UTC time
2. Convert to Tokyo timezone
3. Return the current time in Tokyo

## Advanced Workflows

### Multi-Step Planning

The assistant can break down complex requests:

```
User: "Find a good Italian restaurant near me, check the weather,
      and if it's nice out, book a table for 7 PM tonight"

Agent workflow:
1. Use Google Maps to find Italian restaurants nearby
2. Rank by rating and get top 3 options
3. Use HTTP to check weather forecast
4. Evaluate if weather is "nice" (sunny, no rain, temp > 60°F)
5. If nice, use HTTP to call restaurant booking API
6. Confirm booking with user
7. Set reminder 1 hour before reservation
```

### Scheduled Reports

Create recurring tasks that run automatically:

```
User: "Every Monday at 9 AM, analyze my conversations from
      last week and send me a summary"

Agent setup:
1. Create recurring schedule in loop settings
2. Agent automatically runs every Monday at 9 AM
3. Uses conversation archive tool to fetch last 7 days
4. Analyzes common topics and questions
5. Formats as executive summary
6. Sends via callback to user's Slack
```

### Contextual Actions

Use conversation history for smarter responses:

```
User: "Book a table at that restaurant we talked about yesterday"

Agent workflow:
1. Use conversation archive tool to search yesterday's messages
2. Find mention of restaurant name and location
3. Call restaurant booking API with details
4. Confirm booking
5. Set reminder 1 hour before reservation
```

## Example Conversations

### Example 1: Complex Scheduling

```
User: What's on my calendar tomorrow?

Bot: [Uses time tool to get tomorrow's date]
     [Uses HTTP to call calendar API]

     Here's your schedule for tomorrow, January 16:

     9:00 AM - Team standup
     11:00 AM - Client call with Acme Corp
     2:00 PM - Product review meeting
     4:30 PM - 1:1 with Sarah

     You have 4 events scheduled. Would you like me to set any
     reminders for these?

User: Yes, remind me 15 minutes before the client call

Bot: [Uses reminder tool to create reminder]
     [Calculates time: tomorrow 10:45 AM]

     Done! I'll remind you at 10:45 AM tomorrow, 15 minutes
     before your call with Acme Corp.
```

### Example 2: Location-Based Search

```
User: I'm in Seattle. Find me a co-working space with good coffee

Bot: [Uses Google Maps to search "coworking space Seattle"]
     [Filters for high ratings]
     [Checks reviews for coffee mentions]

     I found 3 great options for you:

     1. **WeWork Pacific Tower** ⭐ 4.5/5
        1200 12th Ave S
        Known for: Premium espresso bar, quiet work areas
        0.8 miles from your location

     2. **Spacious** ⭐ 4.7/5
        505 Union Station
        Known for: Café-style workspace, great lattes
        1.2 miles from your location

     3. **Office Nomads** ⭐ 4.6/5
        1617 Boylston Ave
        Known for: Community vibe, excellent coffee bar
        1.5 miles from your location

     Would you like directions to any of these?

User: Get me directions to Office Nomads

Bot: [Uses Google Maps directions API]

     Here are directions to Office Nomads:

     📍 From your current location: 1.5 miles, 8 min drive
     Route: Head north on Pike St, turn right on Boylston Ave

     [Link to Google Maps]

     Safe travels!
```

### Example 3: Information Synthesis

```
User: What's the weather like in Paris? I'm thinking of
      visiting next month.

Bot: [Uses HTTP to call weather API for Paris]
     [Uses time tool to get next month's date]

     Current weather in Paris: 45°F, partly cloudy

     For next month (February), Paris typically sees:
     - Average temp: 43°F (6°C)
     - Rainfall: Moderate, 12 days of rain
     - Daylight: ~10 hours per day

     February can be chilly but it's a great time to visit -
     fewer tourists and museums are less crowded. Would you
     like me to find flight options or hotel recommendations?

User: Yes, find flights from NYC

Bot: [Uses HTTP to search flight APIs]

     I found several options for NYC to Paris in February:

     • Feb 5-12: $450 round-trip (Air France, 1 stop)
     • Feb 12-19: $520 round-trip (Delta, direct)
     • Feb 19-26: $380 round-trip (Norwegian, 1 stop)

     Would you like me to set a reminder to book one of these?
```

## API Examples

> [accordion] Trigger assistant with scheduled task
>
> > [tab] cURL
> >
> > ```bash theme={null}
> > curl -X POST https://api.chatbotplatform.io/v1/agentic-loops/loop_123/schedule \
> >   -H "Authorization: Bearer YOUR_API_KEY" \
> >   -H "Content-Type: application/json" \
> >   -d '{
> >     "cron": "0 9 * * MON",
> >     "user_message": "Analyze my conversations from last week and send summary",
> >     "callback_url": "https://your-api.com/schedule-callback"
> >   }'
> > ```
>
> > [tab] JavaScript
> >
> > ```javascript theme={null}
> > const response = await fetch(
> >   'https://api.chatbotplatform.io/v1/agentic-loops/loop_123/schedule',
> >   {
> >     method: 'POST',
> >     headers: {
> >       'Authorization': 'Bearer YOUR_API_KEY',
> >       'Content-Type': 'application/json'
> >     },
> >     body: JSON.stringify({
> >       cron: '0 9 * * MON',
> >       user_message: 'Analyze my conversations from last week and send summary',
> >       callback_url: 'https://your-api.com/schedule-callback'
> >     })
> >   }
> > );
> >
> > const schedule = await response.json();
> > console.log('Scheduled task:', schedule.id);
> > ```
>
> > [tab] PHP
> >
> > ```php theme={null}
> > $schedule = Http::withToken('YOUR_API_KEY')
> >     ->post('https://api.chatbotplatform.io/v1/agentic-loops/loop_123/schedule', [
> >         'cron' => '0 9 * * MON',
> >         'user_message' => 'Analyze my conversations from last week and send summary',
> >         'callback_url' => 'https://your-api.com/schedule-callback'
> >     ]);
> > ```
>
> > [tab] Python
> >
> > ```python theme={null}
> > response = requests.post(
> >     'https://api.chatbotplatform.io/v1/agentic-loops/loop_123/schedule',
> >     headers={'Authorization': 'Bearer YOUR_API_KEY'},
> >     json={
> >         'cron': '0 9 * * MON',
> >         'user_message': 'Analyze my conversations from last week and send summary',
> >         'callback_url': 'https://your-api.com/schedule-callback'
> >     }
> > )
> >
> > schedule = response.json()
> > ```

> [accordion] Send proactive message
>
> > [tab] cURL
> >
> > ```bash theme={null}
> > curl -X POST https://api.chatbotplatform.io/v1/messages \
> >   -H "Authorization: Bearer YOUR_API_KEY" \
> >   -H "Content-Type: application/json" \
> >   -d '{
> >     "bot_id": "bot_123",
> >     "channel_type": "slack",
> >     "user_id": "U123456",
> >     "message": "⏰ Your reminder: Call John at 3 PM"
> >   }'
> > ```
>
> > [tab] JavaScript
> >
> > ```javascript theme={null}
> > await fetch('https://api.chatbotplatform.io/v1/messages', {
> >   method: 'POST',
> >   headers: {
> >     'Authorization': 'Bearer YOUR_API_KEY',
> >     'Content-Type': 'application/json'
> >   },
> >   body: JSON.stringify({
> >     bot_id: 'bot_123',
> >     channel_type: 'slack',
> >     user_id: 'U123456',
> >     message: '⏰ Your reminder: Call John at 3 PM'
> >   })
> > });
> > ```
>
> > [tab] PHP
> >
> > ```php theme={null}
> > Http::withToken('YOUR_API_KEY')
> >     ->post('https://api.chatbotplatform.io/v1/messages', [
> >         'bot_id' => 'bot_123',
> >         'channel_type' => 'slack',
> >         'user_id' => 'U123456',
> >         'message' => '⏰ Your reminder: Call John at 3 PM'
> >     ]);
> > ```
>
> > [tab] Python
> >
> > ```python theme={null}
> > requests.post(
> >     'https://api.chatbotplatform.io/v1/messages',
> >     headers={'Authorization': 'Bearer YOUR_API_KEY'},
> >     json={
> >         'bot_id': 'bot_123',
> >         'channel_type': 'slack',
> >         'user_id': 'U123456',
> >         'message': '⏰ Your reminder: Call John at 3 PM'
> >     }
> > )
> > ```

For complete API documentation, see the [OpenAPI specification](https://app.chatbotplatform.io/openapi).

## Best Practices

> [card] Clear Capabilities
>
> Tell users what the assistant can and cannot do

> [card] Confirm Actions
>
> Always confirm before taking actions with consequences

> [card] Graceful Degradation
>
> Handle tool failures without breaking the conversation

> [card] Privacy Aware
>
> Be careful with sensitive data in conversation archives

### System Prompt Guidelines

**List Available Tools:**

```
Available tools:
- time: Get current date/time, convert timezones
- reminders: Set, list, cancel reminders
- http: Search web, call APIs
- google_maps: Find places, get directions
- conversation_archives: Search past conversations
```

**Define Clear Workflows:**

```
For scheduling tasks:
1. Use time tool to understand current date/time
2. Calculate target timestamp
3. Create reminder with clear description
4. Confirm to user with formatted time
```

**Handle Failures:**

```
If a tool call fails:
1. Try alternative approach if possible
2. If no alternative, explain what went wrong
3. Offer to try again or suggest manual action
4. Never leave user hanging
```

## Troubleshooting

### Assistant doesn't use the right tool

**Cause:** Tool selection logic needs guidance

**Solution:** Add explicit instructions in system prompt:

```
For location queries (addresses, places, directions):
→ Use google_maps tool

For time-related queries (current time, timezones, date calculations):
→ Use time tool

For reminders and future tasks:
→ Use reminder tool
```

### Tool calls fail silently

**Cause:** MCP server configuration issues

**Solution:**

* Check MCP server logs for errors
* Verify API keys and credentials
* Test each tool individually
* Add error handling in system prompt

### Assistant is too verbose

**Cause:** No output format guidelines

**Solution:** Add response format rules:

```
Response format:
- Keep answers concise (2-3 sentences)
- Use bullet points for lists
- Only provide details if asked
- End with a question or next step suggestion
```

### Scheduled tasks don't trigger

**Cause:** Cron expression or callback issues

**Solution:**

* Verify cron expression is valid
* Test callback URL manually
* Check scheduler logs
* Ensure timezone is correct

## Advanced Customization

### Add Custom Tools

Build your own MCP server for specialized functionality:

```javascript theme={null}
// Example: Custom calendar MCP server
const mcpServer = {
  name: 'calendar',
  version: '1.0.0',
  tools: [
    {
      name: 'list_events',
      description: 'List calendar events for a date range',
      parameters: {
        start_date: 'ISO date string',
        end_date: 'ISO date string'
      },
      handler: async (params) => {
        // Your calendar API integration
        const events = await fetchCalendarEvents(params);
        return { events };
      }
    }
  ]
};
```

See [Building Custom MCP Servers](https://docs.chatbotplatform.io/mcp-servers/building-servers.md) for details.

### Personality Customization

Adjust the assistant's personality in the system prompt:

```
Personality traits:
- Tone: [Professional | Casual | Humorous | Formal]
- Verbosity: [Concise | Detailed | Balanced]
- Proactiveness: [Suggestive | Reactive | Anticipatory]
- Formality: [Use first names | Formal titles | Friendly]
```

### Multi-Language Support

Handle multiple languages:

```
Language support:
- Detect user's language from first message
- Respond in the same language
- For time-related queries, use user's timezone
- Format dates according to locale (MM/DD vs DD/MM)
```

## Next Steps

> [card] [Multi-Channel Deployment](https://docs.chatbotplatform.io/guides/multi-channel-deployment.md)
>
> Deploy your assistant to multiple platforms

> [card] [Build Custom MCP Servers](https://docs.chatbotplatform.io/mcp-servers/building-servers.md)
>
> Create your own specialized tools

> [card] [Manage Conversation Context](https://docs.chatbotplatform.io/guides/conversation-context.md)
>
> Advanced context management techniques

> [card] [API Reference](https://app.chatbotplatform.io/openapi)
>
> Complete API documentation

## Related Documentation

* [Agentic Loops Overview](https://docs.chatbotplatform.io/agentic-loops/overview.md) - Core concepts
* [MCP Servers](https://docs.chatbotplatform.io/mcp-servers/overview.md) - Available tools
* [Conversation Context MCP Server](https://docs.chatbotplatform.io/mcp-servers/conversation-context.md) - Reminders and history
* [Google Maps MCP Server](https://docs.chatbotplatform.io/mcp-servers/google-maps.md) - Location services


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