- [JSON representation](https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1/SessionConfig#SCHEMA_REPRESENTATION)
- [InputAudioConfig](https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1/SessionConfig#InputAudioConfig)
  - [JSON representation](https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1/SessionConfig#InputAudioConfig.SCHEMA_REPRESENTATION)
- [AudioEncoding](https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1/SessionConfig#AudioEncoding)
- [OutputAudioConfig](https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1/SessionConfig#OutputAudioConfig)
  - [JSON representation](https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1/SessionConfig#OutputAudioConfig.SCHEMA_REPRESENTATION)
- [SessionConfig.RemoteDialogflowQueryParameters](https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1/SessionConfig#SessionConfig.RemoteDialogflowQueryParameters)
  - [JSON representation](https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1/SessionConfig#SessionConfig.RemoteDialogflowQueryParameters.SCHEMA_REPRESENTATION)

The configuration for the session.

| JSON representation |
|---|
| ``` { "session": string, "inputAudioConfig": { object (`https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1/SessionConfig#InputAudioConfig`) }, "outputAudioConfig": { object (`https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1/SessionConfig#OutputAudioConfig`) }, "historicalContexts": [ { object (`https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1/Message`) } ], "entryAgent": string, "deployment": string, "timeZone": string, "useToolFakes": boolean, "remoteDialogflowQueryParameters": { object (`https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1/SessionConfig#SessionConfig.RemoteDialogflowQueryParameters`) }, "enableTextStreaming": boolean, "includeLlmThoughtSummary": boolean, "excludeDiagnosticInfo": boolean, "includeProgressUpdate": boolean } ``` |

| Fields ||
|---|---|
| `session` | `string` Required. The unique identifier of the session. Format: `projects/{project}/locations/{location}/apps/{app}/sessions/{session}` |
| `inputAudioConfig` | ``object (`https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1/SessionConfig#InputAudioConfig`)`` Optional. Configuration for processing the input audio. |
| `outputAudioConfig` | ``object (`https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1/SessionConfig#OutputAudioConfig`)`` Optional. Configuration for generating the output audio. |
| `historicalContexts[]` | ``object (`https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1/Message`)`` Optional. The historical context of the session, including user inputs, agent responses, and other messages. Typically, CES agent would manage session automatically so client doesn't need to explicitly populate this field. However, client can optionally override the historical contexts to force the session start from certain state. |
| `entryAgent` | `string` Optional. The entry agent to handle the session. If not specified, the session will be handled by the `https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1/projects.locations.apps#App.FIELDS.root_agent` of the app. Format: `projects/{project}/locations/{location}/apps/{app}/agents/{agent}` |
| `deployment` | `string` Optional. The deployment of the app to use for the session. Format: `projects/{project}/locations/{location}/apps/{app}/deployments/{deployment}` |
| `timeZone` | `string` Optional. The time zone of the user. If provided, the agent will use the time zone for date and time related variables. Otherwise, the agent will use the time zone specified in the App.time_zone_settings. The format is the IANA Time Zone Database time zone, e.g. "America/Los_Angeles". |
| `useToolFakes` | `boolean` Optional. Whether to use tool fakes for the session. If this field is set, the agent will attempt use tool fakes instead of calling the real tools. |
| `remoteDialogflowQueryParameters` | ``object (`https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1/SessionConfig#SessionConfig.RemoteDialogflowQueryParameters`)`` Optional. [QueryParameters](https://cloud.google.com/dialogflow/cx/docs/reference/rpc/google.cloud.dialogflow.cx.v3#queryparameters) to send to the remote [Dialogflow](https://cloud.google.com/dialogflow/cx/docs/concept/console-conversational-agents) agent when the session control is transferred to the remote agent. |
| `enableTextStreaming` | `boolean` Optional. Whether to stream text output from the model to the client incrementally as it is generated. Defaults to `false`. - When disabled, the model's text output is buffered, and each text output sent to the client is a complete sentence. Clients can render each text output on a new line. - When enabled, each text output may contain only part of a sentence. Clients should concatenate consecutive text outputs to render the complete response. NOTE: This is only supported for text (non-voice) sessions using `https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1/projects.locations.apps.sessions/streamRunSession#google.cloud.ces.v1.SessionService.StreamRunSession` or `BidiRunSession`. |
| `includeLlmThoughtSummary` | `boolean` Optional. Whether to include LLM thought summaries in the session outputs. |
| `excludeDiagnosticInfo` | `boolean` Optional. Whether to exclude diagnostic info from the session output. |
| `includeProgressUpdate` | `boolean` Optional. Whether to include intermediate processing update to the client. If enabled, the update will be sent back in `https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1/RunSessionResponse#SessionOutput.FIELDS.progress`. |

## InputAudioConfig

InputAudioConfig configures how the CES agent should interpret the incoming audio data.

| JSON representation |
|---|
| ``` { "audioEncoding": enum (`https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1/SessionConfig#AudioEncoding`), "sampleRateHertz": integer, "noiseSuppressionLevel": string } ``` |

| Fields ||
|---|---|
| `audioEncoding` | ``enum (`https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1/SessionConfig#AudioEncoding`)`` Required. The encoding of the input audio data. |
| `sampleRateHertz` | `integer` Required. The sample rate (in Hertz) of the input audio data. |
| `noiseSuppressionLevel` | `string` Optional. Whether to enable noise suppression on the input audio. Available values are "low", "moderate", "high", "very_high". |

## AudioEncoding

AudioEncoding specifies the encoding format for audio data.

| Enums ||
|---|---|
| `AUDIO_ENCODING_UNSPECIFIED` | Unspecified audio encoding. |
| `LINEAR16` | 16-bit linear PCM audio encoding. |
| `MULAW` | 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law. |
| `ALAW` | 8-bit samples that compand 14-bit audio samples using G.711 PCMU/A-law. |

## OutputAudioConfig

OutputAudioConfig configures how the CES agent should synthesize outgoing audio responses.

| JSON representation |
|---|
| ``` { "audioEncoding": enum (`https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1/SessionConfig#AudioEncoding`), "sampleRateHertz": integer } ``` |

| Fields ||
|---|---|
| `audioEncoding` | ``enum (`https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1/SessionConfig#AudioEncoding`)`` Required. The encoding of the output audio data. |
| `sampleRateHertz` | `integer` Required. The sample rate (in Hertz) of the output audio data. |

## SessionConfig.RemoteDialogflowQueryParameters

[QueryParameters](https://cloud.google.com/dialogflow/cx/docs/reference/rpc/google.cloud.dialogflow.cx.v3#queryparameters) to send to the remote [Dialogflow](https://cloud.google.com/dialogflow/cx/docs/concept/console-conversational-agents) agent when the session control is transferred to the remote agent.

| JSON representation |
|---|
| ``` { "webhookHeaders": { string: string, ... }, "payload": { object }, "endUserMetadata": { object } } ``` |

| Fields ||
|---|---|
| `webhookHeaders` | `map (key: string, value: string)` Optional. The HTTP headers to be sent as webhookHeaders in [QueryParameters](https://cloud.google.com/dialogflow/cx/docs/reference/rpc/google.cloud.dialogflow.cx.v3#queryparameters). An object containing a list of `"key": value` pairs. Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`. |
| `payload` | ``object (`https://protobuf.dev/reference/protobuf/google.protobuf#struct` format)`` Optional. The payload to be sent in [QueryParameters](https://cloud.google.com/dialogflow/cx/docs/reference/rpc/google.cloud.dialogflow.cx.v3#queryparameters). |
| `endUserMetadata` | ``object (`https://protobuf.dev/reference/protobuf/google.protobuf#struct` format)`` Optional. The end user metadata to be sent in [QueryParameters](https://cloud.google.com/dialogflow/cx/docs/reference/rpc/google.cloud.dialogflow.cx.v3#queryparameters). |