***

title: stop
slug: /reference/python/agents/function-result/stop
description: Stop the agent execution immediately.
max-toc-depth: 3
---------------------

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

[functionresult]: /docs/server-sdks/reference/python/agents/function-result

Stop the agent execution immediately. This halts the AI from processing further
and can be used to interrupt the current speech flow.

## **Parameters**

None.

## **Returns**

[`FunctionResult`][functionresult] — self, for chaining.

## **Example**

```python {11}
from signalwire import AgentBase
from signalwire import FunctionResult

agent = AgentBase(name="my-agent", route="/agent")
agent.set_prompt_text("You are a helpful assistant.")

@agent.tool(name="interrupt_and_restart", description="Interrupt and restart the conversation")
def interrupt_and_restart(args, raw_data):
    return (
        FunctionResult()
        .stop()
        .say("Let me start over.")
    )

agent.serve()
```