Skip to main content

What is a Session?

A session groups the turns of a single conversation between a user and your AI product. It contains one or more inference results (input/output pairs) and can be evaluated as a whole using conversational metrics. You create sessions explicitly with sessions.create() for full control over session lifecycle and grouping. If you give a session your own custom_id, you can then reference it by that id when creating an inference result: pass it as session_custom_id (with a version_id or product_id anchor) and Galtea appends the turn to that existing session. Production sessions can also be created automatically by ingesting OpenTelemetry traces; see Monitor Real User Traffic via OpenTelemetry. You can create, view, and manage sessions programmatically using the Galtea SDK.

SDK Integration

Session Service SDK

Manage sessions using the Python SDK

Session Properties

Text
required
The custom ID associated with the session. This is usually a client-side generated ID that identifies the conversation session between a user and a LLM app. It is unique per version: logging an inference result with a session_custom_id finds the existing session with that custom ID and appends to it (see Create Inference Result).
Version
required
The version associated with the session.
Test Case
The test case associated with the session. This is typically used for non-production evaluations.
Boolean
Indicates whether the session represents real production traffic. Defaults to True when test_case_id is omitted at creation and False when a test_case_id is provided. Externally-ingested sessions (e.g. imported traces) may be classified as non-production without supplying a test_case_id. The only forbidden combination is test_case_id set together with is_production=True. When test_case_id is set, the session context is derived from the test case; otherwise the context from the request is used directly.
Text
The context provided to the AI product during the session or ground-truth related context. For production sessions, this value is taken from the request. For non-production sessions, it is derived from the linked test case.
Object
Additional custom metadata about the session. This can be used to store any relevant information that doesn’t fit into the other fields.
Enum
The current status of the session. Possible values:
  • PENDING: The session has been created but has not yet received all inference results.
  • COMPLETED: The session has finished successfully.
  • FAILED: The session encountered an error during processing.
Text
Any error message associated with the session. This is useful for tracking failed sessions or sessions that encountered issues.
Text
The canonical storage URI of the full-call recording for telephony sessions. This field is read-only and populated by the API after a phone-call session’s recording is captured and processed. Null for non-telephony sessions or before the recording is available. Resolve to a playable URL via the storage endpoint.

Concepts overview

How Galtea’s concepts connect — diagram + per-entity quick reference.

Evaluation

Learn how evaluations score inference results within a session.

Inference Result

Understand the input/output pairs that make up a session.

Simulating Conversations

Tutorial on running multi-turn conversation simulations.