***

title: set_prompt
slug: /reference/python/agents/context-builder/context/set-prompt
description: Set the context's prompt text directly.
max-toc-depth: 3
---------------------

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

[ref-context]: /docs/server-sdks/reference/python/agents/context-builder/context

Set the context's prompt text directly. Cannot be used together with `add_section()`
or `add_bullets()`.

## **Parameters**

<ParamField path="prompt" type="str" required={true} toc={true}>
  Plain-text prompt for this context.
</ParamField>

## **Returns**

[`Context`][ref-context] -- Self for method chaining.

## **Example**

```python {7}
from signalwire import AgentBase

agent = AgentBase(name="my-agent", route="/agent")

contexts = agent.define_contexts()
ctx = contexts.add_context("default")
ctx.set_prompt("You are handling billing inquiries. Be concise and accurate.")
ctx.add_step("greet").set_text("Greet the caller and ask how you can help.")

agent.serve()
```