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

# AI Session Logs

> Prompt and response transcripts for AI Gateway requests in an organization

Session logs store the prompt and response for each AI Gateway call. Open **AI Gateway > Session Logs** to browse them. Use them to see what a client sent, what the upstream returned, and which user, key, provider, and resource handled the call.

<Frame>
  <img src="https://mintcdn.com/fossorial/k1mH62o3m6aJnQ5R/images/ai/session-logs.png?fit=max&auto=format&n=k1mH62o3m6aJnQ5R&q=85&s=299bcafddd5da1e2e1b5652fbbf47d90" alt="AI Gateway session logs table in the Pangolin dashboard" centered width="3836" height="2158" data-path="images/ai/session-logs.png" />
</Frame>

<Note>
  Session logs are only available in [Pangolin Cloud](https://app.pangolin.net/auth/signup) or self-hosted [Enterprise Edition](/self-host/enterprise-edition).
</Note>

Token counts and estimated USD live in [Usage Analytics](/manage/ai/usage-analytics). Those records are separate. Changing session log retention does not delete usage data.

<Tip>
  Set **AI Gateway Session Log Retention** in org settings before you expect rows. The default is 0 days, which leaves logging off.
</Tip>

## Enable Retention

In org security settings, set **AI Gateway Session Log Retention** to how long Pangolin should keep transcripts. Logging starts only after that value is greater than zero. Older rows are removed when they pass the retention window.

## What Each Row Contains

After a gateway call that belongs to an organization, Pangolin stores:

* Session id (shared with the usage record for that call)
* Time, HTTP status, and whether the response was streamed
* [Capability](/manage/ai/providers/configuration#capabilities), [provider](/manage/ai/providers/overview), and requested model
* Public or private [resource](/manage/ai/multiple-gateway-resources)
* User and [virtual API key](/manage/ai/virtual-api-keys), when they are known
* Raw request and response bodies
* Normalized chat messages used for the transcript view

Expand a row to see session id, status, catalog cost and tokens (joined from usage), and the transcript. Toggle between the chat view and raw JSON.

Very large bodies are truncated at about 200,000 characters. Truncated rows are marked in the UI.

## Filters

Narrow the table by date range, then:

* Provider
* Capability
* Resource
* User
* Virtual API key
* Model
* Streaming or not

## Export

Export the current filters as CSV from the table, the same way as other organization logs.

## Streaming

Session logs can be streamed (like all other logs) to upstream SIEM providers or other data sources. You can set this up following the [streaming](/manage/analytics/streaming) documentation.
