# Pass information to the agent (/en/ai/build/shape-the-conversation/custom-information)

> For AI agents: see the complete documentation index at [llms.txt](/llms.txt).

When interacting with a conversational AI agent, you can transmit custom context information from the client, such as the user's speaking status, selected text, personal signature, or score, enabling the agent to generate responses tailored to the user's needs.

This document explains how to use the capabilities of the [Signaling SDK](/en/realtime-media/rtm) to include custom information in interactions with the conversational AI agent.

## Understand the tech [#understand-the-tech]

[Agora Signaling SDK](/en/realtime-media/rtm) allows users in a channel to set custom temporary status information and notifies other online users in the channel through event notifications.

If your app integrates both the Voice SDK and Signaling services, you can leverage Signaling features when creating a conversational AI agent. This allows the agent to retrieve temporary status information from the Signaling channel before invoking the LLM. The information is used as context to guide the agent in generating responses that better align with user needs.

## Prerequisites [#prerequisites]

* Implemented the basic logic for interacting with a conversational AI agent by following the [Quickstart](../../get-started/quickstart).
* Integrated the Signaling SDK into your app and implemented basic messaging functionality by following the [Signaling SDK Quickstart](/en/realtime-media/rtm/quickstart).

## Implementation [#implementation]

Take the following steps to transmit custom context information from the client to the LLM.

### Enable Signaling [#enable-signaling]

To enable Signaling integration, set `advanced_features.enable_rtm` to `true` in the [POST request](/en/api-reference/api-ref/conversational-ai/join) when creating a conversational AI agent. Refer to the following sample request:

<Tabs defaultValue="python" groupId="ai-sdk-language">
  <TabsList>
    <TabsTrigger value="python">
      Python SDK
    </TabsTrigger>

    <TabsTrigger value="typescript">
      TypeScript SDK
    </TabsTrigger>

    <TabsTrigger value="go">
      Go SDK
    </TabsTrigger>

    <TabsTrigger value="rest-api">
      REST API
    </TabsTrigger>
  </TabsList>

  <TabsContent value="python">
    ```python
    # ... other agent configuration ...
    .with_advanced_features({'enable_rtm': True})
    # ... continue with .create_session() ...
    ```
  </TabsContent>

  <TabsContent value="typescript">
    ```typescript
    // ... other agent configuration ...
    .withAdvancedFeatures({ enable_rtm: true })
    // ... continue with .createSession() ...
    ```
  </TabsContent>

  <TabsContent value="go">
    ```go
    // ... other agent configuration ...
    .WithAdvancedFeatures(&agentkit.AdvancedFeatures{
        EnableRtm: agora.Bool(true),
    })
    // ... continue with .CreateSession() ...
    ```
  </TabsContent>

  <TabsContent value="rest-api">
    ```bash
    curl --request post \
      --url https://api.agora.io/api/conversational-ai-agent/v2/projects/<your_app_id>/join \
      --header 'Authorization: Basic <credentials>' \
      --data '
    {
      "name": "unique_name",
      "properties": {
        "channel": "channel_name",
        "token": "token",
        "agent_rtc_uid": "friday",
        "advanced_features": {
          "enable_rtm": true
        },
        "remote_rtc_uids": [
          "*"
        ],
        "enable_string_uid": true,
        "llm": {
          "url": "https://api.openai.com/v1/chat/completions",
          "api_key": "<your_llm_key>",
          "params": {
            "model": "gpt-4o-mini"
          }
        },
        "tts": {
          "vendor": "microsoft",
          "params": {
            "key": "<your_tts_api_key>",
            "voice_id": "en-US-AndrewMultilingualNeural"
          }
        }
      }
    }'
    ```
  </TabsContent>
</Tabs>

### Set Custom Information [#set-custom-information]

Refer to Signaling [User status management](/en/realtime-media/rtm/build/manage-presence-and-metadata/presence#user-status-management) to set status information for users in the channel.

### Transmit Custom Information [#transmit-custom-information]

Before invoking the LLM, the agent automatically retrieves the active user's temporary status information and transmits it as context to the model. This temporary status information is stored in the `context.presence` field.

The following example illustrates a scenario where UserA selects the text "Pythagorean theorem" in the app and asks the agent, "What does this mean?". The JSON example shows how the agent retrieves a temporary status field named `selection` from Signaling before calling the LLM. The request structure is as follows:

```json
{
  "messages": [
    {
      "role": "user",
      "content": "What does this mean?"
    }
  ],
  "context": {
    "presence": {
      "userA": {
        "selection": "Pythagorean Theorem"
      }
    }
  },
  "model": "openai"
}
```

### LLM Adaptation [#llm-adaptation]

Adapt the LLM to process the temporary status information in the `context.presence` field and generate content that better meets user needs. For implementation details, refer to the [Custom LLM](../custom-model-integration/custom-llm) documentation.
