Adding tools to your meeting agents

Let your agent send chat messages, share webpages, and leave the meeting in response to participant requests.

A tool is a function an AI agent can call. Based on the conversation, the agent chooses a tool and provides the information the tool needs, such as a message or URL. The function runs in your application. The tools in this guide call Recall.ai's API to make a meeting bot perform an action.

📘

Speaking back into the meeting

Spoken replies flow through the agent's existing Output Media connection. No separate tool call or Recall.ai request is needed for each reply.

Generate audio with your speech model or text-to-speech provider:

  • Third party integration: Publish the audio through your agent's audio output. Recall.ai plays it into the meeting.
  • Custom webpage: Play the generated audio on the page. Recall.ai streams it into the meeting.

How a tool call works

For example, a participant asks the agent to share the Recall.ai homepage:

  1. The agent selects your screenshare tool and supplies https://www.recall.ai/ as the URL.
  2. Your application's server runs the tool function.
  3. The function calls Recall.ai's Output Media API with the bot ID and URL. Recall.ai tells the bot to load and share the page.
  4. The function returns the API result to the agent, so it can confirm the request or report an error.

Connect agent tools to the bot

  1. Connect your agent. Follow an implementation guide, then wait for the bot to join the meeting.
  2. Save the bot ID. Create Bot returns an id. Store it on your application's server. Each API request uses this ID to identify which bot to control.
  3. Write your tool functions. Use the API examples below. Each function takes the inputs it needs, such as a message or URL, calls Recall.ai for the saved bot ID, and returns success or an error.
  4. Make the tools available to the agent. Your agent framework - the software you use to run the agent - provides a way to register tools. Give each tool a name, a description of when to use it, and its inputs. A screenshare tool, for example, needs a URL.

Send requests to the same Recall region where you created the bot. Include your Recall API key in the Authorization header and keep it on your server. Replace {bot_id} below with the saved bot ID.

Send a chat message

Call Send Chat Message:

POST /api/v1/bot/{bot_id}/send_chat_message/

{
  "to": "everyone",
  "message": "Here is the page: https://www.recall.ai/"
}

Use the same endpoint to send a link or acknowledge a tool call. Chat availability and message limits depend on the meeting platform; see Sending Chat Messages.

Start a screenshare

Call Output Media with the URL of a webpage the bot can access:

POST /api/v1/bot/{bot_id}/output_media/

{
  "screenshare": {
    "kind": "webpage",
    "config": {
      "url": "https://www.recall.ai/"
    }
  }
}

The bot shares the webpage's rendered content. This does not share a participant's desktop. Loading can take a few seconds; your application can post a chat acknowledgement such as "Starting the screenshare. It will load in a few seconds."

📘

Control the shared content

To change the shared content during the meeting, host your own webpage and update it from your application. See Share and control a webpage for how to build an interactive webpage.

Stop the screenshare

Call Stop Output Media:

DELETE /api/v1/bot/{bot_id}/output_media/

{
  "screenshare": true
}

Explicitly target screenshare so the bot's camera output can continue.

Leave the meeting

Call Remove Bot From Call with no request body:

POST /api/v1/bot/{bot_id}/leave_call/

Send any final chat acknowledgement before leaving.

Try it

Ask your agent to post a message, share a webpage, stop sharing, and leave. Check the chat and meeting view for each result. Your application should report failures to the agent; an accepted screenshare request does not mean the page has finished loading.

For a working implementation, see the implementation guides.


Did this page help you?