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

# Sending a agent

> Learn how to send AI agents to meetings through the Meeting agent API, with options for immediate or scheduled joining and customizable settings.

## 1. Send a agent to the meeting

You can dispatch an agent to a meeting either:

1. Immediately, provided there are available agents in your pool.
2. With a reservation, scheduling an agent to join 5 minutes before a meeting.

To send an agent to a meeting, use the following example POST request to [http://your-hosted-ip/api/v1/agent/join](http://your-hosted-ip/api/v1/agent/join)

<Tip>
  Note: The response will include an Agent ID. Be sure to save this ID
  for use in further steps.
</Tip>

<Tabs>
  <Tab label="cURL" title="Bash">
    ```bash theme={null}
    curl --location 'http://your-hosted-ip/api/v1/agent/join' \
    --header 'Authorization: Token YOUR-API-KEY' \
    --header 'Content-Type: application/json' \
    --data '{
      "meetingUrl": "YOUR-MEETING-URL",
      "agentName": "Agent X",
      "adhoc": false,
      "automaticLeave": {
          "EveryoneLeftTimeout": 2,
          "NoOneJoinedTimeout": 900,
          "WaitingRoomTimeout": 900
      },
      "webhookUrl": "YOUR-WEBHOOK-URL",
      "agentVideoOutput": {
          "base64Data": "/9j/4AAQSkZJRgABAQAAAQABAAD...."
      },
      "transcriptionProvider": {
          "name": "meeting_captions"
      }
    }'
    ```
  </Tab>

  <Tab label="JavaScript" title="JavaScript">
    ```javascript theme={null}
    fetch("http://your-hosted-ip/api/v1/agent/join", {
    method: "POST",
    headers: {
      "Authorization": "Token YOUR-API-KEY",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      meetingUrl: "YOUR-MEETING-URL",
      agentName: "Agent X",
      adhoc: false,
      automaticLeave: {
        EveryoneLeftTimeout: 2,
        NoOneJoinedTimeout: 900,
        WaitingRoomTimeout: 900
      },
      webhookUrl: "YOUR-WEBHOOK-URL",
      agentVideoOutput: {
        base64Data: "/9j/4AAQSkZJRgABAQAAAQABAAD...."
      },
      transcriptionProvider: {
        name: "meeting_captions"
      }
    })
    })
    .then(res => res.text())
    .then(console.log)
    .catch(console.error);

    ```
  </Tab>

  <Tab label="Python" title="Python">
    ```python theme={null}
    import requests
    import json

    url = "http://your-hosted-ip/api/v1/agent/join"

    payload = json.dumps({
    "meetingUrl": "YOUR-MEETING-URL",
    "agentName": "Agent X",
    "adhoc": False,
    "automaticLeave": {
      "EveryoneLeftTimeout": 2,
      "NoOneJoinedTimeout": 900,
      "WaitingRoomTimeout": 900
    },
    "webhookUrl": "YOUR-WEBHOOK-URL",
    "agentVideoOutput": {
      "base64Data": "/9j/4AAQSkZJRgABAQAAAQABAAD...."
    },
    "transcriptionProvider": {
      "name": "meeting_captions"
    }
    })
    headers = {
    'Authorization': 'Token YOUR-API-KEY',
    'Content-Type': 'application/json'
    }

    response = requests.request("POST", url, headers=headers, data=payload)

    print(response.text)

    ```
  </Tab>
</Tabs>

### Breaking It Down:

<ResponseField name="meetingUrl" type="string" required>
  **Description**: The URL of the meeting the agent should join.\
  **Supported Platforms**: Google Meet, Microsoft Teams, Zoom.
</ResponseField>

<ResponseField name="agentName" type="string" required>
  **Description**: The display name for the agent in the meeting.
  **Max Length**: 50 characters
</ResponseField>

<ResponseField name="adhoc" type="boolean" required>
  **Description**: Determines whether to dispatch an agent immediately or reserve it in advance.

  * **`true`**: Dispatches an agent immediately from the pool of always-ready agents.\
    *Note*: During high demand, there may be a delay.

  * **`false`**: Reserves an agent in advance, ensuring it joins exactly 5 minutes before a scheduled meeting.\
    *Ideal for planned calendar events to guarantee agent availability.*
</ResponseField>

<ResponseField name="transcriptionProvider" type="object" optional>
  **Description**: Configuration for meeting transcription services.\
  **Optional**: Yes

  **Properties**:

  * **name**:
    * `"meeting_captions"`: Standard transcription (default, no API key needed)
  * **streaming**: Object with:
    * **websocketUrl**: Required WebSocket URL for real-time transcription streaming
</ResponseField>

<ResponseField name="automaticLeave" type="object" optional>
  **Description**: Controls the agent's automatic leaving behavior.\
  **Optional**: Yes

  **Properties**:

  * **EveryoneLeftTimeout**: Time (seconds) to wait after everyone leaves (default: 60)
  * **NoOneJoinedTimeout**: Time (seconds) to wait if no one joins (default: 900)
  * **WaitingRoomTimeout**: Time (seconds) in waiting room (default: 900)
  * **CallEndTimeout**: Time (seconds) to stay in the call before leaving automatically (default: 10800 - 3 hours)
</ResponseField>

<ResponseField name="webhookUrl" type="string" optional>
  **Description**: URL to receive meeting events and updates.\
  **Optional**: Yes
  **Max Length**: 200 characters
</ResponseField>

<ResponseField name="metadata" type="object" optional>
  **Description**: Custom key-value pairs attached to the agent.\
  **Optional**: Yes
  **Default**: `{"additionalKey": "value"}`

  *Usage*: Useful for custom logic or tracking, as this data can be retrieved later.
</ResponseField>

<ResponseField name="agentVideoOutput" type="object" optional>
  **Description**: Customize the agent's video feed during the meeting.\
  **Optional**: Yes
  **Requirements**:

  * Must provide either `url` OR `base64Data` (but not both)
  * The image should be in jpeg format.
  * The image should have a 16:9 aspect ratio
  * Most platforms support resolutions up to 1020x720. Higher-resolution images are automatically scaled down.

  **Properties**:

  * **url**: URL of the video source
  * **base64Data**: Base64 encoded image data
</ResponseField>

<ResponseField name="mediaStreaming" type="object" optional>
  **Description**: Configuration for streaming meeting audio.\
  **Optional**: Yes

  **Properties**:

  * **audio**: Required object with:
    * **outputFormat**: One of `pcm_16000`, `pcm_24000`, or `pcm_48000`
    * **websocketUrl**: Required WebSocket URL for audio streaming
</ResponseField>

<ResponseField name="chat" type="object" optional>
  **Description**: Configure chat messages the agent will send (Only supported for Zoom & Teams).\
  **Optional**: Yes

  **Properties**:

  * **message**: Required chat message content
</ResponseField>

<ResponseField name="recordingSettings" type="object" optional>
  **Description**: Configure meeting recording options.\
  **Optional**: Yes

  **Properties**:

  * **mode**: Required - `"audioOnly"` or `"fullStream"`
  * **quality**: Optional - `"high"` or `"low"`
</ResponseField>

<ResponseField name="deduplicationKey" type="string" optional>
  **Description**: A unique identifier to prevent duplicate agents from joining the same meeting.\
  **Optional**: Yes\
  **Max Length**: 50 characters\
  **Default Behavior**: Rejects multiple agents in the same meeting to avoid spamming.
</ResponseField>

## 4. Interact During the Meeting

While the agent is in the meeting, ensure there is meaningful interaction, such as turning on your video or speaking. This ensures the recording contains relevant content.

## 5. End the Meeting

Once you have sufficient content, end the meeting. The agent will leave automatically.
