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

# Perception

> Configure Raven for live camera, screen, and audio understanding, and request a separate post-call perception report.

The **Perception Layer** gives your PAL real-time understanding of what participants show and how they sound. [Raven](https://docs.tavus.io/sections/models.md#raven%3A-perception-model) supplies this context to the conversational LLM and can trigger tools from camera, shared-screen, or audio cues.

Choose configuration based on when you need the result:

* **[During the call](#during-call-perception):** Use awareness queries to focus the PAL's live observations and registry tools to act on detected cues.
* **[After the call](#post-call-perception-analysis):** Use `perception_analysis_queries` to shape the report delivered to your conversation callback.

## Configuring the Perception Layer

Set these options in the PAL's `layers.perception` object when you [create](https://docs.tavus.io/api-reference/pals/create-pal.md) or [patch](https://docs.tavus.io/api-reference/pals/patch-pal.md) it.

### `perception_model`

* **`raven-2`:** Real-time emotional understanding from user audio, with improved camera and screen understanding for more context-aware responses. Raven-2 also introduces visual history within a conversation, dedicated screen-awareness queries and tools, and proactive callouts, which are on by default.
* **`raven-1` (default):** Real-time audio and visual perception, with limited screen understanding.
* **`off`:** Disables the perception layer.

## Raven-2

Raven-2 helps your PAL follow what is happening now and refer back to what was shown earlier in the same call:

* **Live understanding:** Camera and screen observations distinguish the latest visible state from recent changes. Audio perception supplies tone and emotional cues when enabled.
* **Visual history:** Camera and screen timelines let the PAL answer questions such as "What was the previous error?" or "Which object did I hold up first?"
* **Dedicated screen perception:** `screen_awareness_queries` focus on shared-screen content, while tools with `origin: "screen"` act on screen-specific cues.
* **Callouts:** By default, the PAL can speak up about camera observations while the user is quiet. See [Callouts](#callouts-raven-2).

Select Raven-2 explicitly; omitting `perception_model` still selects Raven-1:

```json theme={null}
{
  "layers": {
    "perception": {
      "perception_model": "raven-2"
    }
  }
}
```

Visual history is built automatically from observations during the conversation.

To upgrade an existing PAL, [patch the PAL](https://docs.tavus.io/api-reference/pals/patch-pal.md) to set `layers.perception.perception_model` to `"raven-2"`, then start a new conversation.

## During-call perception

Raven provides live perception without custom queries. Add awareness queries when the PAL should pay particular attention to something during the call. Their answers become context for the conversational LLM; they do not instruct it how to respond. Put response instructions in the PAL's `system_prompt`.

Live analysis is available through the [Utterance event](https://docs.tavus.io/sections/event-schemas/conversation-utterance.md) as `user_visual_analysis` and `user_audio_analysis`. See [custom LLM perception context](https://docs.tavus.io/sections/conversational-video-interface/pal/llm.md#perception) for how observations and visual history reach your model.

### Visual Perception Configuration

#### `visual_awareness_queries`

An array of questions evaluated against the camera feed during the call. For Raven-2 shared-screen content, use `screen_awareness_queries` instead.

```json theme={null}
{
  "layers": {
    "perception": {
      "perception_model": "raven-2",
      "visual_awareness_queries": [
        "What object is the user holding up to the camera?",
        "Is more than one person visible?",
        "Is the user presenting a slide deck?"
      ]
    }
  }
}
```

### Audio Perception Configuration

Raven-1 and Raven-2 analyze user tone and delivery. When emotion recognition is enabled, emotional cues also accompany utterances so the PAL can respond naturally. For example:

```text theme={null}
<user_audio_analysis>The user sounded sarcastic when they said this</user_audio_analysis>
Wow, I love Mondays.
```

Audio analysis tags are stripped from transcription callbacks.

#### `audio_awareness_queries`

An array of questions evaluated against the audio stream during the call. There is no separate post-call audio analysis report.

```json theme={null}
{
  "layers": {
    "perception": {
      "perception_model": "raven-2",
      "audio_awareness_queries": [
        "Is the user speaking quickly or pausing frequently?",
        "Is the user raising their voice?"
      ]
    }
  }
}
```

#### `emotion_recognition`

Controls whether Raven may infer emotion from biometric signals such as facial expression and tone of voice. See [EU AI Act configuration](https://docs.tavus.io/sections/onboarding-guide/eu-ai-act.md).

* **`full`:** Allows biometric emotion analysis.
* **`limited`:** Disables biometric-derived emotion analysis. Other cues, such as spoken content, objects, and activity, still flow through.
* **`auto` (default):** Follows the conversation's [`policy`](https://docs.tavus.io/api-reference/conversations/create-conversation): `limited` when `policy` is `eu`, otherwise `full`.

```json theme={null}
{
  "layers": {
    "perception": {
      "perception_model": "raven-2",
      "emotion_recognition": "auto"
    }
  }
}
```

### Screen Perception Configuration (Raven-2)

We recommend Raven-2 for screen sharing. Limited screen perception remains available with Raven-1. A participant must start sharing their screen for Raven to observe it; see [Screen Share](https://docs.tavus.io/sections/conversational-video-interface/pal/screen-share.md).

#### `screen_awareness_queries`

An array of questions evaluated against the shared screen during the call. Requires `perception_model: "raven-2"`.

```json theme={null}
{
  "layers": {
    "perception": {
      "perception_model": "raven-2",
      "screen_awareness_queries": [
        "Which app or page is currently visible?",
        "What error code and message are displayed?"
      ]
    }
  }
}
```

### Perception tools

To trigger an action from a detected cue, [create a registry tool](https://docs.tavus.io/api-reference/tools/create-tool.md) and attach it to the PAL. Put the trigger conditions and extraction instructions in the tool's **`description`**:

* **`origin: "vision"`:** Camera cues.
* **`origin: "audio"`:** Audio cues.
* **`origin: "screen"`:** Shared-screen cues; requires Raven-2.

Raven receives the attached tool definitions, including their descriptions and parameter schemas. You do not need a separate tool-prompt field to repeat those instructions. For example, a screen tool's description can say: "Trigger when an error dialog is visible on the shared screen. Extract the error text exactly as displayed."

See [Tool Calling for Perception](https://docs.tavus.io/sections/conversational-video-interface/pal/perception-tool.md) for create-and-attach examples and delivery behavior.

### Callouts (Raven-2)

With callouts, the PAL proactively speaks up about camera observations while the user is quiet. When `perception_model` is `"raven-2"`, `callouts` defaults to `"on"`. Set `callouts` to `"off"` to disable them. Only Raven-2 runs callouts, so `callouts` defaults to `"off"` for other perception models, and setting it to `"on"` requires `perception_model: "raven-2"`.

Describe **what to notice and what to say in the PAL's top-level `system_prompt`**, alongside `layers` when creating the PAL. `visual_awareness_queries` can focus its camera observations. For example:

```json theme={null}
{
  "pal_name": "Assembly Coach",
  "default_face_id": "rf4e9d9790f0",
  "system_prompt": "Help the user assemble the device. While they are quiet, speak up if they hold a part upside down in view of the camera. Identify the part and explain how to orient it. Stay quiet about unrelated background activity.",
  "layers": {
    "perception": {
      "perception_model": "raven-2",
      "callouts": "on",
      "visual_awareness_queries": [
        "Which part is the user holding, and how is it oriented?"
      ]
    }
  }
}
```

## Post-call perception analysis

Use `perception_analysis_queries` for a report generated **after the conversation ends**. These queries shape the report, rather than the PAL's live behavior. The report combines visual observations, including shared-screen observations when available, with the transcript and its audio analysis.

### `perception_analysis_queries`

An array of questions for the post-call report. For example, a support PAL can request a summary of the errors and pages shown during screen sharing:

```json theme={null}
{
  "layers": {
    "perception": {
      "perception_model": "raven-2",
      "perception_analysis_queries": [
        "Which error codes and messages appeared on the shared screen?",
        "Which troubleshooting pages did the user show, and in what order?",
        "Was more than one person visible on camera during the call?"
      ]
    }
  }
}
```

> [!NOTE]
>
> Awareness queries are optional. You can request post-call analysis without setting `visual_awareness_queries` or `screen_awareness_queries`. Post-call queries are not automatically converted into live awareness queries; add live queries only when you also want to focus the PAL's observations during the call.

Answers arrive in an [`application.perception_analysis` event](https://docs.tavus.io/sections/event-schemas/conversation-perception-analysis) sent to your [conversation callback](https://docs.tavus.io/sections/webhooks-and-callbacks.md#conversation-callbacks). For example:

```json theme={null}
{
  "properties": {
    "analysis": "The shared screen showed error E104 on the connection page, followed by the network settings page. One participant was visible on camera."
  },
  "conversation_id": "<conversation_id>",
  "event_type": "application.perception_analysis",
  "timestamp": "2026-10-19T09:13:35.361736Z"
}
```

Use focused questions that support your PAL's purpose. The report can only address details captured in the observations; it does not guarantee a complete record of every frame or page.

## Legacy configuration

> [!WARNING]
>
> Inline `visual_tools` and `audio_tools` are **deprecated for new integrations**. Create tools in the registry and attach them to the PAL instead. See [Legacy inline tool calling](https://docs.tavus.io/sections/troubleshooting.md#legacy-inline-tool-calling) for existing integrations and migration instructions.

Existing integrations may still use separate perception tool-prompt fields. New integrations should put trigger conditions in the registry tool's `description`; see [legacy perception prompts](https://docs.tavus.io/sections/troubleshooting.md#legacy-perception-tool-prompts).

> [!NOTE]
>
> Each awareness or post-call query and each legacy tool-prompt string has a **10,000-character limit**. Longer entries are rejected by the API.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.