> ## Documentation Index
> Fetch the complete documentation index at: https://docs.requesty.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Session Reconstruction

> Automatic session reconstruction

# Automatic Session Reconstruction

Understanding how users interact with your LLM applications is key to improving them. A crucial part of this is analyzing entire conversations or "sessions." However, tracking sessions usually requires you to add a unique `session_id` to every API request, which can be a hassle to implement and maintain.

<Note>
  **[View session traces](https://app.requesty.ai/sessions)** in the Requesty Console.
</Note>

Requesty's gateway removes this burden with **Automatic Session Reconstruction**. You can send your LLM interaction data to us as-is, and we will automatically group related interactions into coherent sessions for you.

## What It Means For You

* **Zero Implementation Effort**: You don't need to modify your application code to generate or manage session IDs. Simply send us the interaction data, and we'll handle the rest.
* **Accurate Conversation Tracking**: Get a clear view of the entire user journey or your agentic flow, from the first prompt to the final response.
* **Powerful Analytics**: With sessions correctly identified, you can analyze conversation length, user engagement, topic flow, and other critical metrics that depend on understanding the full context of an interaction.

## How It Works

Our system intelligently analyzes the content of the messages in each interaction and automatically identifies if it's a part of an existing session.

For example, if a user starts a conversation:

1. **User's first turn:**
   * `system`: "You are a helpful assistant."
   * `user`: "What is the capital of France?"
   * `assistant`: "The capital of France is Paris."

Our service sees this is the start of a new conversation and assigns it a new session ID internally.

If the user continues the conversation:

2. **User's second turn:**
   * `system`: "You are a helpful assistant."
   * `user`: "What is the capital of France?"
   * `assistant`: "The capital of France is Paris."
   * `user`: "What is its population?"
   * `assistant`: "The population of Paris is over 2 million."

Our service recognizes that this new interaction contains the complete history of the first one, plus a new question and answer. It automatically identifies it as part of the **same session** and links it to the previous interaction.

This process allows us to reconstruct the entire conversation thread reliably, without requiring any session management on your end.ß
