***

title: add_pre_answer_verb
slug: /reference/python/agents/agent-base/add-pre-answer-verb
description: Add a SWML verb to run before the call is answered.
max-toc-depth: 3
---------------------

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

[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.

<Warning>
  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.
</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**

<ParamField path="verb_name" type="str" required={true} toc={true}>
  SWML verb name (e.g., `"play"`, `"sleep"`, `"request"`).
</ParamField>

<ParamField path="config" type="dict[str, Any]" required={true} toc={true}>
  Verb configuration dictionary. See the
  [SWML reference][swml-reference] for verb-specific parameters.
</ParamField>

## **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()
```