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

# Actions and Integrations

> Learn how to empower your agents to perform actions on your or your users' behalf

## Prerequisites

* Basic understanding of REST APIs. If you're new to APIs, check out [this video](https://www.youtube.com/watch?v=Yzx7ihtCGBs).

## What is an Action?

An action is a task that your agent can execute that involves interfacing with the outside world. For example:

* Calling the Google Calendar API to book an appointment for a user.
* Fetching a funny quote from a public API and reciting it to a user.

Fundamentally, actions are flexible and discrete pieces of functionality that you can build into any agent — and unlock limitless utility!

## Creating an Action

<Steps>
  <Step title="Navigate to Actions Page">
    Go to our [Actions page](https://play.ai/integrations) where you'll find the action creation form

    <img height="200" src="https://framerusercontent.com/images/mammpETxoaWagG2qV5gaYkvtOM.png" />
  </Step>

  <Step title="Describe Your Action">
    Create a clear description that agents will use to determine when to invoke the action. For example:

    * "Get a funny quote" will work when users ask for funny quotes
    * "fry me a hot dog" won't work as the agent won't understand the action

    <img height="150" src="https://framerusercontent.com/images/lHD3aeZFVVaQSUMOKWtJKuReapk.png" />
  </Step>

  <Step title="Configure Endpoint and Method">
    Enter the URL for your API endpoint and choose the appropriate request method. This can be:

    * A public API
    * An API you built yourself
    * Any other accessible API endpoint

    <img height="150" src="https://framerusercontent.com/images/kaPvyWwOC691hQBVZJ3XQ9XGOXc.png" />
  </Step>

  <Step title="Set Up Parameters">
    Configure your parameters in two ways:

    **Static Parameters:**

    * Parameters that remain the same for every action invocation
    * Useful for API keys and constant values
    * Uncheck "Conversation time parameter" checkbox

    <img height="150" src="https://framerusercontent.com/images/azmsZBUCkJDXe0MR3UuR1G50.png" />

    **Dynamic Parameters:**

    * Parameters determined from the conversation
    * Examples: user's name or email address
    * Check "Conversation time parameter" checkbox

    <img height="150" src="https://framerusercontent.com/images/2SQgef6hWYYHxwnpR3znxVIAkY.png" />
  </Step>

  <Step title="Enable Your Action">
    Enable your action by either:

    * [Editing an existing agent](https://play.ai/my-agents)
    * [Creating a new agent](https://play.ai/create-agent)

    Check the box for your action at the bottom of the composition form

    <img height="150" src="https://framerusercontent.com/images/7RhIhSK0V4zh827BYtbQi5pWB2g.png" />
  </Step>

  <Step title="Test Your Action">
    1. Navigate to [your agents](https://play.ai/my-agents)
    2. Start a conversation
    3. Ask the agent to perform your action
    4. If it fails, debug using the [conversations page](https://play.ai/conversations)

    <img height="300" src="https://framerusercontent.com/images/eNawEi6tLf7eaE8Dgkmk8FS10rQ.png" />

    Note: A conversation ID will be included in the request body to help identify requests from the same conversation.
  </Step>
</Steps>
