***

title: set_system_prompt
slug: /reference/python/agents/context-builder/context/set-system-prompt
description: Set a new system prompt that takes effect when this context is entered.
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 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**

<ParamField path="system_prompt" type="str" required={true} toc={true}>
  New system 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()
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()
```