***

title: set_param
slug: /reference/python/agents/agent-base/set-param
description: Set a single AI parameter by key.
max-toc-depth: 3
---------------------

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

[ref-agentbase]: /docs/server-sdks/reference/python/agents/agent-base

Set a single AI parameter by key.

## **Parameters**

<ParamField path="key" type="str" required={true} toc={true}>
  Parameter name (e.g., `"temperature"`, `"end_of_speech_timeout"`).
</ParamField>

<ParamField path="value" type="Any" required={true} toc={true}>
  Parameter value. Type depends on the parameter being set.
</ParamField>

## **Returns**

[`AgentBase`][ref-agentbase] -- Returns self for method chaining.

## **Example**

```python {5}
from signalwire import AgentBase

agent = AgentBase(name="support", route="/support")
agent.set_prompt_text("You are a helpful assistant.")
agent.set_param("temperature", 0.5)
agent.serve()
```