# Runbook — the PDF, link, video or audio never reaches the lead

> **Symptom.** *"no se envía el pdf que configuré como recurso"* · *"el link no llega"* · *"manda un
> texto raro con corchetes en vez del audio"* · *"the freebie never goes out"*.

## What you need first

- The resource, and one conversation where it should have been delivered.
- What the lead actually received, verbatim. The exact text separates half of these hypotheses.

> **First, check the asset type can be sent at all.** A **link** is just text and always works. An
> **image** or an **audio** clip the agent sends itself through `send_resource`, but only while
> `config.resourceSending` is enabled. A **PDF, document or video** has no agent-side delivery path
> in any channel — the tool rejects it — so "no se envía el pdf que configuré como recurso" is
> usually not a failure to diagnose: those go out as a **link**, or through a **follow-up
> workflow**, and `knowledge/how-to/send-a-resource.md` has both sequences. Come back here once the
> asset is one the agent could have sent.

---

### H1 — A media tag was emitted as literal text

Distinctive and instantly recognisable: the lead receives something like `[AUDIO: file.mp3]` as a
text message. The prompt was written to output a tag the platform does not interpret, so it goes out
as plain text.

- **Test:** look at what the lead received **and confirm it was a plain-text message**. The same
  bracketed string is also what the platform stores in the transcript in place of a media message
  that has no transcription — there the audio *was* delivered and there is nothing to fix on the
  send (only the missing transcription, see the how-to). Only a text outbound is this hypothesis.
- **Stop condition:** the tag went out as an outbound text message → **you're done**.
- **Fix:** remove the tag from the prompt. Media has specific delivery paths and none of them is a
  marker in the text. An **image or audio** clip is sent by the agent itself, but only once
  `config.resourceSending` is enabled and the clip is agent-usable — check that before anything
  else. A **PDF, document or video** has no agent-side path at all: it goes out as a link, or
  through a follow-up with a static message. Check what the asset type supports before promising it
  in the prompt.

*Evidence: a prompt instructing the model to output an audio tag inline; every lead received the raw
tag instead of the audio.*

### H2 — The agent announced it and never sent it

The agent says "te paso el link" and no URL appears. Reads as a delivery failure; is a flow bug.

- **Test:** read three conversations that reached the moment and check whether the resource itself
  is present — a URL for a link or a PDF, the media itself for audio or video. An announcement is
  not a delivery.
- **Stop condition:** the resource is discussed but never present → **you're done**.
- **Fix:** the step must deliver in the same turn it announces. Demonstrate that in examples rather
  than adding a rule about it — this behavior is learned from examples and a rule will lose to them.

*Evidence: a lead disqualified by a form was told "te paso de nuevo el link" and no outbound message
in that window contained a URL at all. Separately, an agent asked whether the lead had seen a link
it had never sent.*

### H3 — The URL is wrong, dead, or stale in one file

The resource is usually right where you look first and wrong somewhere else. URLs get copied between
files and drift: a protocol-less or `www.`-prefixed variant, a link to a tool the creator abandoned,
a price or coupon that changed.

- **Test:** open the link the agent actually sends. Then search **every** section of the **live**
  config for that resource — the prompt, the examples, the objections, the keyword responses, the
  data files. Search what is deployed, not the local `agents/<name>/` folder; that is a working copy
  and is the one that goes stale.
- **Stop condition:** it 404s, or two files carry different versions → **you're done**.
- **Fix:** update every occurrence in one change.

*Evidence: an SDK built by copying URLs from an older prompt that used a different URL format;
examples teaching a bare domain instead of a full URL; a course link carrying a discontinued
discount price that the creator had to correct in Slack.*

### H4 — The keyword delivers it, but the conversation dies there

The resource goes out correctly and nothing follows. The operator counts this as a delivery problem
because the outcome is the same: no conversation.

- **Test:** read what happens after the resource in five conversations.
- **Stop condition:** the resource lands and the thread stops → **you're done**.
- **Fix:** the delivery step needs a follow-on question in the same turn. Watch for an instruction
  like "only the URL, nothing else" — written to prevent clutter, it reliably reads as "say nothing
  after the link".

*Evidence: a keyword that correctly sent its URL and omitted the discovery question, because the
instruction told the model to send only the URL. Real Instagram testing caught it; the delivery fix
had already been verified as working.*

### H5 — A gate is holding it back

Some resources sit behind a qualification step. If the gate is stricter than the operator believes,
the resource is correctly withheld and looks missing.

- **Test:** check whether the flow requires stages the lead never completed.
- **Stop condition:** the lead never passed the gate → **you're done**, working as configured.
- **Fix:** only if the operator disagrees with the gate. Then it is a flow change, and it belongs in
  the examples.

*Evidence: a flow describing seven stages with no gate enforcing the early ones, and the opposite
case — a resource held behind a consent question the creator never wanted.*

### H6 — The agent was never linked to the resource it references

A prompt can reference a resource or tool the agent was never wired to. The call fails silently and
the agent carries on as if nothing happened.

- **Test:** check which tools and resources the agent is actually linked to, not which ones the
  prompt mentions.
- **Stop condition:** the prompt references something unlinked → **you're done**.
- **Fix:** wire it. A prompt reference is not a connection, and nothing surfaces the gap.

---

## When to stop

If the resource is linked, the URL resolves, the gate passed and the step fires, capture it: the
conversation id, the resource, what the lead received verbatim, and the turn where it should have
appeared. Send that with `report_feedback`.
