***

title: add_post_ai_verb
slug: /reference/python/agents/agent-base/add-post-ai-verb
description: Add a SWML verb to run after the AI conversation ends.
max-toc-depth: 3
---------------------

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

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

Add a verb to run after the AI conversation ends. Common uses include logging,
cleanup transfers, and explicit hangup.

## **Parameters**

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

<ParamField path="config" type="dict[str, Any]" required={true} toc={true}>
  Verb configuration dictionary.
</ParamField>

## **Returns**

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

## **Example**

```python {5,9}
from signalwire import AgentBase

agent = AgentBase(name="support", route="/support")
agent.set_prompt_text("You are a helpful assistant.")
agent.add_post_ai_verb("request", {
    "url": "https://api.example.com/call-complete",
    "method": "POST"
})
agent.add_post_ai_verb("hangup", {})
agent.serve()
```