How to build a calendar concierge agent

Blog article hero image
Keanan Koppenhaver
Keanan Koppenhaver
Technical PMM @ Retool

There is a tremendous amount of excitement about AI agents revolutionizing entire industries, automating complex workflows, and transforming how businesses operate at scale.

Retool Agents is designed to let you build exactly that. One of the best ways to get comfortable with building agents is to identify simple use cases first. One of the most annoying things most of us deal with is scheduling meetings, handling conflicts, and coordinating across time zones. An agent takes the pain out of this everyday task.

In this guide, we’ll walk you through how to build a calendar concierge agent using Agents that automatically finds the right time for everyone.

How the calendar agent works

A calendar helper may seem simple, but the AI needs to understand everyone’s calendar, identify gaps, prioritize rescheduling events, and accommodate different time zones. Then, it can update calendars and email all the participants, taking on all the heavy lifting of meeting organization.

Here’s a run-through of how it works:

First, you’ll ask a natural language question about setting up a meeting:

Can you find time for me to meet with John and Jane sometime next week regarding the Agents launch? Specifically, we need to discuss the use cases were showcasing on the landing page.

The agent uses this as the starting point for a thinking-action loop using the LLM and the ‘tools’ it has at its disposal.

An AI executive assistant schedules a meeting, showing steps from identifying attendees and checking availability to sending calendar invites, even when some calendars are inaccessible.

Here are the tools you’ll need to build this agent:

  • Get Company Directory to find the email addresses of John and Jane
  • Get Open Time Slots to find availability within Google Calendar
  • Create Calendar Event to generate the meeting in the calendars
  • Send Email to update the invitees about the meeting

The tools are pre-built (one custom, the others integrated into Retool), but the agent will decide how to use them. Once everything is scheduled, the agent sends this confirmation email to everybody on the list, including a relevant subject line and description of the meeting in the email body:

A sent email scheduling an "Agents Launch Use Case Sync" meeting for June 2, 2025, to john.smith@retool.com and jane.doe@retool.com.

From start to finish, it takes the agent just a few seconds to check the who, the when, and the what, and set everything up.

Behind the scenes, three components work together to make this happen:

  • The prompt you use to tell the agent what to do
  • The tools the agent has access to, so it can act on the prompt and message
  • Agents allows you to access LLMs and tools in a secure, production-ready environment.

Let’s step through how this works behind the scenes.

What you’ll need

Before you start building, make sure you have these essentials in place:

  • Access to Agents: If you haven’t already got a Retool account, head straight here to sign up. If you have, you can start using Agents from your dashboard.
  • Connected Google Calendar: The agent needs to read and write calendar events, so you’ll need to connect your Google Calendar to Retool. This takes just a few clicks through Retool’s Integrations page.
  • Employee directory or database: For the custom “Get Company Directory” tool, you’ll need access to an employee database with names, emails, roles, and teams. If you don’t have one, you can:
    • Create a simple Retool database table
    • Use a Google Sheet with sample employee data.
    • Mock the data when creating the tool. You can add this simple JavaScript that includes Name, Email, and the person’s Role at the company:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
const people = [
	{
		name: "John Smith",
		email: "john.smith@retool.com",
		role: "Head of Product"
},
{
		name: "Jane Doe",
		email: "jane.doe@retool.com",
		role: "Lead Engineer"
},
]

return people

With that all good, we can get started.

Setting up your Agent in Retool

Agents enable builders to easily connect their prompts to their tools and data, all within the secure environment of the Retool platform.

Add triggers

You’re building this within the “Configuration” pane of the platform, starting with the triggers “Chat” and “Email”:

Agent configuration screen with "Chat" and "Email" triggers enabled and an agent email address visible.

In the demo, the agent is triggered by a chat. But within a working environment, you might not want a chat window open just to talk to your calendar concierge (especially if you have several other concierge agents). So, you can also email the agent. Just send the same message to the email address, and the entire workflow will be triggered.

A bonus of this feature is that, when you CC the agent on an email thread, it gets the full context of the entire thread, not just the latest message.

Add prompt-based instructions

After that, you can add the prompt (more on this in a moment) in the instructions box. In this example, we’re instructing the agent to take actions like receive email and sender data, reference prior email messages, generate and send a relevant response, and limit invitations to only the relevant group of attendees.

Text document outlining instructions and system prompt for an Executive Assistant Agent GPT, detailing its email interaction rules and role in scheduling meetings and managing tasks.

This is where the agent will begin to understand the context of the user’s query.

Select a model for the agent

Then you have the LLM settings to select a model, which includes options like GPT-5, Claude Sonnet 4.5, and Gemini 2.5 Pro:

Model configuration showing gpt-4.1 selected with temperature slider at 0.00 and max iterations set to 10

Here, you’re choosing the GPT-4.1 model, but you can use any provider or open-source model that suits your needs.

Set Temperature and Max iterations

You also have settings for temperature and max iterations:

  • Temperature: A sliding scale from 0 (more predictable) to 1.00 (more random) that controls the randomness or creativity of the agent’s output. For a calendar agent, you want lower temperatures (around 0.1-0.3) to ensure consistent and reliable scheduling behavior, rather than creative interpretations.
  • Max iterations: The total number of cycles in the agentic loop. If the agent reaches the maximum number of iterations allowed (50), it will terminate the execution. This helps identify situations where the agent becomes stuck, is missing context, or encounters unexpected behavior. Most calendar tasks should complete in just a few cycles, so 50 provides plenty of headroom while preventing runaway loops.

Add the agent’s tools

Finally, you have our tools list. In this example, we’re using tools like Get and Create Calendar Events, Get Open Time Slots, and Delete Calendar Event:

List of calendar tools: Get Calendar Events, Create Calendar Event (Approval required), Get Open Time Slots, Delete Calendar Event.

You can also add new tools to use (that you would then include in our prompt to notify the agent). These might be a brand new custom tool, a tool imported from another agent, another agent acting as a tool, and more:

Add tool menu showing options: Create new custom tool, Import from other agent, Use workflow, Use agent, and Connect to MCP Server, plus Core tools section

Power up your agent with advanced tools

You can extend your agent’s capabilities in several ways:

  • Creating a new custom tool lets you write JavaScript or Python functions for domain-specific logic.
  • Using a workflow allows you to wrap existing Retool workflows as callable tools, perfect for complex multi-step processes you’ve already built.
  • Using an agent enables agent composition, where one agent can call another as a tool, creating modular AI systems.
  • Connecting to an MCP Server integrates with the Model Context Protocol, allowing your agent to interact with any MCP-compatible server for accessing external systems and data sources. Each new tool you add expands what your agent can accomplish autonomously.

Let’s now look at the prompt that underpins this entire agent.

How to write the agent instructions

Prompts are simply the instructions you give to an LLM. However, if you want an LLM to behave in a more sophisticated manner, you’ll need to provide it with a more advanced prompt.

Write step-by-step, simple instructions

An extensive prompt is built into our calendar concierge agent. The prompt starts with some simple instructions:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
You are “Executive Assistant Agent GPT” at Retool, a developer-focused low-code platform. Your role is to autonomously schedule internal and external meetings for executives and stakeholders by interpreting unstructured requests, resolving ambiguity, and completing tasks end-to-end using the tools available.

---

## Mission

Given a message from a Retool team member (e.g. Kent), you must:

1. Identify who the meeting is between, what it’s about, when it should happen, and any relevant constraints.
2. Disambiguate any incomplete names using internal context.
3. Use company directory and topic context to ensure you are including the correct people.
4. Find open timeslots and attempt to schedule the meeting.
5. If no common time exists, choose the least-disruptive time and override an existing event.
6. Send a confirmation message if appropriate.
7. Return a single final response after all steps are completed.

Define the agent’s role and mission

Then it has a system prompt, which sets the role the agent will take, along with its mission:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
You are “Executive Assistant Agent GPT” at Retool, a developer-focused low-code platform. Your role is to autonomously schedule internal and external meetings for executives and stakeholders by interpreting unstructured requests, resolving ambiguity, and completing tasks end-to-end using the tools available.

---

## Mission

Given a message from a Retool team member (e.g. Kent), you must:

1. Identify who the meeting is between, what it’s about, when it should happen, and any relevant constraints.
2. Disambiguate any incomplete names using internal context.
3. Use company directory and topic context to ensure you are including the correct people.
4. Find open timeslots and attempt to schedule the meeting.
5. If no common time exists, choose the least-disruptive time and override an existing event.
6. Send a confirmation message if appropriate.
7. Return a single final response after all steps are completed.

This is one of the key instruction sets for the LLM. It’s the canonical source of truth that tells the agent who it is and what it should do.

Inform the agent about available tools

Then, you tell the agent the tools it has access to:

1
2
3
4
5
6
7
8
9
10
11
12
## Available Tools

| Tool | Purpose |
|------|---------|
| **Get Company Directory** | Return a list of employees with their names, emails, roles, and teams. Use this to resolve names like “Jen” or “Derek” to their canonical identity. |
| **Return Open Time Slots** | Given a list of attendees and a time range, return mutual availability from their calendars. |
| **Get Calendar Events** | Retrieve a user’s full calendar to inspect conflicts, context, and meeting types. |
| **Create Calendar Event** | Schedule a meeting across multiple calendars. |
| **Delete Calendar Event** | Cancel an existing event (only used for rescheduling). |
| **Retool Email** | Send a message to confirm or communicate meeting details. |
| **Web Search** | Use only when a meeting topic is ambiguous (e.g. "MCP") and you need to infer its nature (technical, sales, etc.). Just google for the topic, exclude any company-specific terms |
| **Execute Code** | Run logic to score slots, filter conflicts, select fallback times, or format values. |

This tools table acts as the agent’s capability map. Without this explicit listing, the agent would either hallucinate capabilities it doesn't have or fail to use tools that could solve the problem.

Why extensive agent instructions are critical

Each tool description is deliberately concise but specific. Take Get Company Directory: the prompt doesn’t just say “find people,” it explicitly states this tool resolves partial names to their canonical identity. This primes the LLM to use it for disambiguation rather than trying to guess email formats or make assumptions.

The prompt within this agent is over 5,000 characters long, and goes on to provide critical guidance on how it should manage conflicts, communicate with human users effectively, and problem solve proactively with guardrails:

  • Establish behavioral rules for common scenarios: How to resolve partial names (“Jen” becomes the right Jennifer based on context), when to search the web for project context, and default meeting durations.
  • Include fallback logic for conflicts: When no open slots exist, the agent should identify the least disruptive meeting to override, such as 1:1s or buffer time between meetings.
  • Set the tone and approach: The agent optimizes for momentum over politeness, taking decisive action rather than deferring to the user.
  • Specify exact output formatting: Clear markdown summaries with emojis showing what was scheduled, who's attending, and any conflicts that were overridden.
  • Define hard constraints: Never guess email addresses, stay focused on calendar tasks only, and work silently until the task is complete.

You can also make your prompt dynamic by passing in context variables like {{current_user.fullName}} or {{new Date()}}, so the agent knows who’s making the request and what the current date is, enabling personalized responses like ‘I’ll schedule this for Keanan’ instead of generic messages.

Prompts should be extensive. They are the complete operating manual for your agent, encoding the task at hand into explicit rules the AI can follow autonomously.

Selecting & connecting calendar and email tools

The agent will take the prompt, along with the user input (in this case, requesting to find Jane and John and organize a meeting), and use the available tools to complete the task. The tools an agent can use can be any or all of the following:

Agent tool sources in Retool

  • Built-in Retool tool. These are native capabilities that work out of the box, from PostgreSQL queries to REST API calls, giving your agent immediate access to your internal systems without additional setup.
  • Tool integration. Retool maintains pre-built connectors to dozens of services, including Slack, Jira, Salesforce, and Google, so your agent can interact with your existing tech stack through authenticated, managed connections.
  • Custom tool. When you need domain-specific logic, like checking your company’s unique scheduling policies or calculating custom availability scores, you can build JavaScript or Python functions that become callable tools for the agent.

In our calendar concierge, you’re using two Google Calendar integrations, a built-in Retool tool, and a custom tool.

Get Company Directory

Let’s start at the start, with our Get Company Directory tool. This is a custom tool you’ve built to, unsurprisingly, get company information from the directory. It searches through employee records to find matching names, returning their full names, email addresses, roles, and team information. It does this using some simple JavaScript, SQL, and access to an internal database.

Get Open Time Slots

The Get Open Time Slots tool is a Google Calendar integration that finds mutual availability across multiple calendars. It takes a comma-separated list of email addresses, a time range, and a time zone, and then returns all the slots where everyone is free within that window.

Get Open Time Slots tool configuration with parameters: email_addresses, time_min, time_max, and time_zone, all string type

Create Calendar Event

The other Google Calendar tool, the Create Calendar Event tool, books the actual meeting once a time is found. It takes all the meeting details (title, description, location), the start and end times with their timezones, and an array of attendee objects, then creates the event across all invited calendars. In the example image below, notice the “Approval required” flag. This means it needs human approval, as an added safety check before modifying calendars.

A "Create Calendar Event" interface displaying fields like email, event name, description, location, date/time, and attendees, with an "Approval required" banner.

Send Email

Finally, the built-in tool you use is the Send Email tool. This takes standard email fields (to, cc, subject) and a Markdown-formatted body, allowing the agent to send rich confirmation emails with formatted meeting details, links, and even attachments if needed.

Send Email tool configuration displaying parameters: to, reply_to, subject, cc, bcc, body (supporting Markdown formatting), and attachment fields

Testing and deploying your Agent

You’ve built a calendar concierge that can parse natural language requests, disambiguate names, find available time slots, and book meetings autonomously. But getting an agent working is just the beginning.

The real challenge arises in production when you require consistent and reliable performance. This is where evaluation and observability become critical. You need baseline metrics for what makes a “good” result: perhaps scheduling 95% of requests without human intervention, or correctly identifying the right attendees 99% of the time.

Agents offers built-in evaluation capabilities, including test cases and automated review. The platform tracks every tool call and decision in detailed logs, showing not only when something fails but also why. This creates a powerful feedback loop. When you discover patterns that work better, you incorporate them back into your prompt.

What to build next

This calendar concierge is just the start. With Agents, you can build agents that handle expense approvals, customer support escalations, data analysis requests, or any workflow that currently eats up your team's time. The same platform that schedules your meetings can orchestrate your entire operational stack.

The future isn’t just about having an AI assistant; it’s about building an entire workforce of specialized agents, each handling their domain with reliability and intelligence. Check out more agent use cases and examples here.

Reader

Keanan Koppenhaver
Keanan Koppenhaver
Technical PMM @ Retool
Keanan educates the community about how they can use low- and no- code tools to transform their day-to-day work, even if they wouldn’t consider themselves a “developer.” He writes about AI and LLMs.
Related Articles
Copied