# Agent settings

> Deepgram workshops › UC Berkeley AI workshop 2026 › Agent settings
> Web version: https://workshops.deepgram.com/events/uc-berkeley-2026/settings
> About 6 min.

Everything about your agent's behaviour starts with a single settings object. You send it once, and the agent applies it.

### Configure audio I/O {#audio-format}

**Goal:** Build the settings object that sets your agent's audio format, listen, think, and speak providers, prompt, and greeting.

Add an `audio` block that sets the format of your microphone input and the agent's voice output. We use `linear16` (raw 16-bit PCM) at 24 kHz for both, which keeps the wiring trivial.

@tab python Python
```python
SAMPLE_RATE = 24000

audio = AgentV1SettingsAudio(
    input=AgentV1SettingsAudioInput(encoding="linear16", sample_rate=SAMPLE_RATE),
    output=AgentV1SettingsAudioOutput(encoding="linear16", sample_rate=SAMPLE_RATE),
)
```

@tab javascript JavaScript
```javascript
const SAMPLE_RATE = 24000;

const audio = {
  input:  { encoding: "linear16", sample_rate: SAMPLE_RATE },
  output: { encoding: "linear16", sample_rate: SAMPLE_RATE },
};
```
:::

Different sample rates and encodings work if your device needs them. For example, `mulaw` and `alaw` are common for phone-system integrations. Stick with `linear16` at 24 kHz for this workshop.

### Wire the listen / think / speak chain {#wire-providers}

Add an `agent` block that describes the three components from the overview. Each one is a separate provider configuration.

@tab python Python
```python
agent = AgentV1SettingsAgent(
    listen=AgentV1SettingsAgentListen(
        provider=AgentV1SettingsAgentListenProvider_V1(
            type="deepgram",
            model="nova-3",
        ),
    ),
    think=ThinkSettingsV1(
        provider=ThinkSettingsV1Provider_OpenAi(
            type="open_ai",
            model="gpt-4o-mini",
            temperature=0.7,
        ),
        prompt="You are a helpful AI assistant. Keep your responses brief.",
    ),
    speak=SpeakSettingsV1(
        provider=SpeakSettingsV1Provider_Deepgram(
            type="deepgram",
            model="aura-2-asteria-en",
        ),
    ),
    greeting="Hello. I'm a Deepgram voice agent. What would you like to talk about?",
)
```

@tab javascript JavaScript
```javascript
const agent = {
  listen: {
    provider: {
      type:  "deepgram",
      model: "nova-3",
    },
  },
  think: {
    provider: {
      type:        "open_ai",
      model:       "gpt-4o-mini",
      temperature: 0.7,
    },
    prompt: "You are a helpful AI assistant. Keep your responses brief.",
  },
  speak: {
    provider: {
      type:  "deepgram",
      model: "aura-2-asteria-en",
    },
  },
  greeting: "Hello. I'm a Deepgram voice agent. What would you like to talk about?",
};
```
:::

What each provider is set to:

- The `listen` provider is Deepgram's `nova-3`, our flagship streaming STT model.
- The `think` provider is OpenAI's `gpt-4o-mini`. Temperature `0.7` is conversational without going off the rails.
- The `speak` provider is `aura-2-asteria-en`, one of around fifty Deepgram Aura-2 voices. You swap voices in a later lesson.

### Shape the personality with `prompt` {#prompt-role}

Set the agent's personality in the `prompt` field inside `think`. The starter says *"You are a helpful AI assistant. Keep your responses brief."*, which is about as generic as it gets.

Most of the real work in building a useful voice agent happens in this string. You iterate on the prompt in the [Personality](/uc-berkeley-2026/personality) lesson.

### Greet the user with `greeting` {#greeting}

Set the `greeting` field to the line your agent says the moment a session opens, before the user has spoken. It also gives a quick check that audio playback works on the user's end.

### Assemble and send the settings {#send-settings}

Wrap both blocks into one settings object:

@tab python Python
```python
SETTINGS = AgentV1Settings(audio=audio, agent=agent)
```

@tab javascript JavaScript
```javascript
const SETTINGS = { type: "Settings", audio, agent };
```
:::

Send this object exactly once per session, right after the WebSocket opens. The agent emits a `SettingsApplied` event when it's ready for media.

**You should see:** no output yet. The agent confirms your settings with `SettingsApplied`, which the next lesson handles.
