> ## Documentation Index
> Fetch the complete documentation index at: https://cometchat-22654f5b-docs-angular-v5-docs-update.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# AI User Copilot

> AI-powered smart replies, conversation starters, and summaries using the CometChat Android SDK.

<Accordion title="AI Integration Quick Reference">
  ```kotlin theme={null}
  // Smart Replies
  CometChat.getSmartReplies("UID", CometChatConstants.RECEIVER_TYPE_USER,
      object : CometChat.CallbackListener<HashMap<String, String>>() {
          override fun onSuccess(replies: HashMap<String, String>) { }
          override fun onError(e: CometChatException) { }
      })

  // Conversation Starter
  CometChat.getConversationStarter("UID", CometChatConstants.RECEIVER_TYPE_USER,
      object : CometChat.CallbackListener<List<String>>() {
          override fun onSuccess(starters: List<String>) { }
          override fun onError(e: CometChatException) { }
      })

  // Conversation Summary
  CometChat.getConversationSummary("UID", CometChatConstants.RECEIVER_TYPE_USER,
      object : CometChat.CallbackListener<String>() {
          override fun onSuccess(summary: String) { }
          override fun onError(e: CometChatException) { }
      })
  ```

  **Requires:** AI features enabled in [CometChat Dashboard](https://app.cometchat.com)
</Accordion>

AI User Copilot provides AI-powered assistance to users during conversations. For a broader introduction and Dashboard configuration, see the [AI User Copilot Overview](/fundamentals/ai-user-copilot/overview).

## Smart Replies

Use `getSmartReplies()` to get AI-suggested replies for the current conversation context.

<Tabs>
  <Tab title="Kotlin">
    ```kotlin theme={null}
    val receiverId = "UID"
    val receiverType = CometChatConstants.RECEIVER_TYPE_USER

    CometChat.getSmartReplies(receiverId, receiverType,
        object : CometChat.CallbackListener<HashMap<String, String>>() {
            override fun onSuccess(replies: HashMap<String, String>) {
                Log.d(TAG, "Smart replies: $replies")
                // Display reply suggestions to the user
            }

            override fun onError(e: CometChatException) {
                Log.e(TAG, "Error: ${e.message}")
            }
        })
    ```
  </Tab>

  <Tab title="Java">
    ```java theme={null}
    String receiverId = "UID";
    String receiverType = CometChatConstants.RECEIVER_TYPE_USER;

    CometChat.getSmartReplies(receiverId, receiverType,
        new CometChat.CallbackListener<HashMap<String, String>>() {
            @Override
            public void onSuccess(HashMap<String, String> replies) {
                Log.d(TAG, "Smart replies: " + replies);
                // Display reply suggestions to the user
            }

            @Override
            public void onError(CometChatException e) {
                Log.e(TAG, "Error: " + e.getMessage());
            }
        });
    ```
  </Tab>
</Tabs>

| Parameter      | Description                                                      |
| -------------- | ---------------------------------------------------------------- |
| `receiverId`   | UID of the user or GUID of the group                             |
| `receiverType` | `CometChatConstants.RECEIVER_TYPE_USER` or `RECEIVER_TYPE_GROUP` |

Returns a `HashMap<String, String>` of suggested reply options.

## Conversation Starter

Use `getConversationStarter()` to get AI-suggested opening messages for a new conversation.

<Tabs>
  <Tab title="Kotlin">
    ```kotlin theme={null}
    val receiverId = "UID"
    val receiverType = CometChatConstants.RECEIVER_TYPE_USER

    CometChat.getConversationStarter(receiverId, receiverType,
        object : CometChat.CallbackListener<List<String>>() {
            override fun onSuccess(starters: List<String>) {
                Log.d(TAG, "Conversation starters: $starters")
                // Display starter suggestions to the user
            }

            override fun onError(e: CometChatException) {
                Log.e(TAG, "Error: ${e.message}")
            }
        })
    ```
  </Tab>

  <Tab title="Java">
    ```java theme={null}
    String receiverId = "UID";
    String receiverType = CometChatConstants.RECEIVER_TYPE_USER;

    CometChat.getConversationStarter(receiverId, receiverType,
        new CometChat.CallbackListener<List<String>>() {
            @Override
            public void onSuccess(List<String> starters) {
                Log.d(TAG, "Conversation starters: " + starters);
                // Display starter suggestions to the user
            }

            @Override
            public void onError(CometChatException e) {
                Log.e(TAG, "Error: " + e.getMessage());
            }
        });
    ```
  </Tab>
</Tabs>

| Parameter      | Description                                                      |
| -------------- | ---------------------------------------------------------------- |
| `receiverId`   | UID of the user or GUID of the group                             |
| `receiverType` | `CometChatConstants.RECEIVER_TYPE_USER` or `RECEIVER_TYPE_GROUP` |

Returns a `List<String>` of suggested conversation openers.

## Conversation Summary

Use `getConversationSummary()` to get an AI-generated summary of the conversation history.

<Tabs>
  <Tab title="Kotlin">
    ```kotlin theme={null}
    val receiverId = "UID"
    val receiverType = CometChatConstants.RECEIVER_TYPE_USER

    CometChat.getConversationSummary(receiverId, receiverType,
        object : CometChat.CallbackListener<String>() {
            override fun onSuccess(summary: String) {
                Log.d(TAG, "Summary: $summary")
                // Display summary to the user
            }

            override fun onError(e: CometChatException) {
                Log.e(TAG, "Error: ${e.message}")
            }
        })
    ```
  </Tab>

  <Tab title="Java">
    ```java theme={null}
    String receiverId = "UID";
    String receiverType = CometChatConstants.RECEIVER_TYPE_USER;

    CometChat.getConversationSummary(receiverId, receiverType,
        new CometChat.CallbackListener<String>() {
            @Override
            public void onSuccess(String summary) {
                Log.d(TAG, "Summary: " + summary);
                // Display summary to the user
            }

            @Override
            public void onError(CometChatException e) {
                Log.e(TAG, "Error: " + e.getMessage());
            }
        });
    ```
  </Tab>
</Tabs>

| Parameter      | Description                                                      |
| -------------- | ---------------------------------------------------------------- |
| `receiverId`   | UID of the user or GUID of the group                             |
| `receiverType` | `CometChatConstants.RECEIVER_TYPE_USER` or `RECEIVER_TYPE_GROUP` |

Returns a `String` containing the AI-generated conversation summary.

***

## Next Steps

<CardGroup cols={2}>
  <Card title="AI Agents" icon="robot" href="/sdk/android/ai-agents">
    Integrate AI-powered agents for automated interactions
  </Card>

  <Card title="AI Moderation" icon="shield" href="/sdk/android/ai-moderation">
    Automatically review messages for inappropriate content
  </Card>

  <Card title="AI User Copilot Overview" icon="wand-magic-sparkles" href="/fundamentals/ai-user-copilot/overview">
    Configure AI Copilot features in the Dashboard
  </Card>

  <Card title="Send Messages" icon="paper-plane" href="/sdk/android/send-message">
    Send messages in conversations
  </Card>
</CardGroup>
