fetch_sessions
Retrieve and analyze user session data from Langfuse projects to monitor application interactions, with options for pagination, time filtering, and multiple output formats.
Instructions
Get a list of sessions in the current project.
Args:
ctx: Context object containing lifespan context with Langfuse client
age: Minutes ago to start looking (e.g., 1440 for 24 hours)
page: Page number for pagination (starts at 1)
limit: Maximum number of sessions to return per page
output_mode: Controls the output format and detail level
Returns:
Based on output_mode:
- compact: List of summarized session objects
- full_json_string: String containing the full JSON response
- full_json_file: List of summarized session objects with file save info
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| age | Yes | Minutes ago to start looking (e.g., 1440 for 24 hours) | |
| page | No | Page number for pagination (starts at 1) | |
| limit | No | Maximum number of sessions to return per page | |
| output_mode | No | Controls the output format and action. 'compact' (default): Returns a summarized JSON object optimized for direct agent consumption. 'full_json_string': Returns the complete, raw JSON data serialized as a string. 'full_json_file': Returns a summarized JSON object AND saves the complete data to a file. | compact |