***

title: setParam
slug: /reference/typescript/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/typescript/agents/agent-base

Set a single AI parameter by key.

## **Parameters**

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

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

## **Returns**

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

## **Example**

```typescript {5}
import { AgentBase } from '@signalwire/sdk';

const agent = new AgentBase({ name: 'support', route: '/support' });
agent.setPromptText('You are a helpful assistant.');
agent.setParam('temperature', 0.5);
await agent.serve();
```