> This page is for Server SDKs.

> Fetch clean Markdown by appending `.md` to any page URL under https://signalwire.com/docs or requesting it with the HTTP header `Accept: text/markdown`. The root index at https://signalwire.com/docs/llms.txt lists the available documentation indexes.

# set_prompt

> Set the context's prompt text directly.

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

**`prompt`** `str` — required

Plain-text prompt for this context.

---

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