> 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_system_prompt

> Set a new system prompt that takes effect when this context is entered.

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

Set a new system prompt that takes effect when this context is entered. Triggers
a context reset. Cannot be combined with `add_system_section()` / `add_system_bullets()`.

## **Parameters**

**`system_prompt`** `str` — required

New system 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()
support = contexts.add_context("default")
support.set_system_prompt("You are a patient technical support engineer.")
support.add_step("greet").set_text("Greet the caller and ask about their issue.")

agent.serve()
```