# Using Media in Chat Agents

Spara chat agents (Navigator, Smartbar, and Fullscreen) can show videos, images, and PDFs mid-conversation. When a lead asks for a demo, a case study, or a pricing overview, the agent surfaces the file automatically in a side panel — no manual triggering needed.

This guide walks through uploading a file, writing trigger conditions, and verifying it works in a live test.

For background on how media works, see [https://docs.spara.com/platform/media](https://docs.spara.com/platform/media "mention").

{% stepper %}
{% step %}

#### Upload your file

Go to [**Media**](https://app.spara.co/media) and click **Upload File**. Select the video, image, or PDF you want to add.

Supported formats: mp4, mov, png, jpg, gif, pdf.
{% endstep %}

{% step %}

#### Name the file

Give the file a clear, lead-facing name. This is what Spara displays to the lead when the file is shown.

Use something descriptive and professional:

* "Product Overview" (not "v3\_final\_USE THIS.mp4")
* "Enterprise Case Study — Acme Corp"
* "Pricing and Packages"
  {% endstep %}

{% step %}

#### Write your "When" conditions

The **When** field tells the AI when to show this file. Write a bulleted list of trigger conditions in plain language.

**Example for a product demo video:**

```
- Lead asks to see a product demo or walkthrough
- Lead asks "what does it look like" or "can you show me"
- Lead expresses interest in understanding how the platform works
```

**Example for a pricing PDF:**

```
- Lead asks about pricing, cost, or subscription plans
- Lead wants to compare tiers or understand what's included
- Lead is evaluating whether to move forward
```

Be specific. Broad conditions like "lead shows interest" will cause the file to appear too early or too often.
{% endstep %}

{% step %}

#### Set visibility to Visible

Toggle the file to **Visible** to make it active. Files set to **Hidden** won't be shown by any agent, even if the trigger conditions match.
{% endstep %}

{% step %}

#### Test in Navigator (or your preferred chat interface)

Go to [**Testing**](https://app.spara.co/testing) and open a chat test for your Navigator (or Smartbar, or Fullscreen) agent.

Start a conversation and steer it toward a trigger condition you defined. For example, if your condition is "lead asks for a product demo," send a message like:

> "Can you show me how the product works?"

If the media panel opens on the left side of the chat, your configuration is working. If it doesn't appear, try rephrasing or broadening your "When" description, then test again.
{% endstep %}
{% endstepper %}

## Tips

* **One file per use case.** A demo video, a pricing PDF, and a case study should each be separate files with focused "When" conditions.
* **Review real conversations.** If leads are seeing a file at the wrong moment, check the "When" description and tighten it.
* **Hidden = archived, not deleted.** If you stop using a file, set it to Hidden rather than deleting it. You can reactivate it later without re-uploading.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.spara.com/guides/platform-guides/using-media-in-chat-agents.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
