> For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

# add_pre_answer_verb

> Add a SWML verb to run before the call is answered.

[swml-reference]: /docs/swml/reference

[ref-agentbase]: /docs/server-sdks/reference/python/agents/agent-base

Add a verb to run before the call is answered. Pre-answer verbs execute while the
call is still ringing.

Only certain verbs are safe before answering. Using an unsupported verb raises
`ValueError`. Verbs with `auto_answer` capability (like `play` and `connect`) are
allowed but should include `"auto_answer": False` in their config to prevent
automatic answering — omitting it logs a warning.

Safe pre-answer verbs: `transfer`, `execute`, `return`, `label`, `goto`, `request`,
`switch`, `cond`, `if`, `eval`, `set`, `unset`, `hangup`, `send_sms`, `sleep`,
`stop_record_call`, `stop_denoise`, `stop_tap`.

## **Parameters**

SWML verb name (e.g., `"play"`, `"sleep"`, `"request"`).

Verb configuration dictionary. See the
[SWML reference][swml-reference] for verb-specific parameters.

## **Returns**

[`AgentBase`][ref-agentbase] -- Returns self for method chaining.

## **Example**

```python {5}
from signalwire import AgentBase

agent = AgentBase(name="support", route="/support")
agent.set_prompt_text("You are a helpful assistant.")
agent.add_pre_answer_verb("play", {
    "urls": ["ring:us"],
    "auto_answer": False
})
agent.serve()
```