Skip to main content

What are Sessions?

Sessions allow you to group related LLM requests together to understand multi-turn conversations, user workflows, and sequential operations. Track the entire journey of a user interaction across multiple API calls.

Why Use Sessions?

Conversation Tracking

Group chat messages to analyze full conversations

Workflow Monitoring

Track multi-step AI workflows from start to finish

User Journeys

Understand how users navigate through your AI features

Cost Analysis

Calculate total costs for entire sessions

Session Headers

Add session headers to your requests to group them:

Required Headers

string
required
Unique identifier for the session. Use the same ID for all requests in a session.

Optional Headers

string
Human-readable name for the session (e.g., “Customer Support Chat”, “Travel Planner”)
string
Path or step within the session (e.g., “/booking/flight/search”, “/chat/message/3”)

Basic Example

Multi-Step Workflow Example

Track complex workflows across multiple steps:

Viewing Sessions

Access your sessions in the dashboard:
1

Navigate to Sessions

Go to the Sessions page in your Helicone dashboard
2

View Session List

See all sessions with metrics: total cost, request count, duration, success rate
3

Click a Session

View all requests in the session, organized by path/timestamp
4

Analyze Patterns

Identify common flows, drop-off points, and expensive operations

Session Analytics

Helicone provides rich analytics for sessions:

Aggregate Metrics

  • Total Cost: Sum of all request costs in the session
  • Request Count: Number of requests in the session
  • Duration: Time from first to last request
  • Average Latency: Mean latency across all requests
  • Success Rate: Percentage of successful requests

Per-Session Metrics

Session API

Query Sessions

Fetch sessions with filters and metrics

Session Metrics

Get aggregate metrics for sessions

Best Practices

Use UUIDs or unique identifiers for session IDs. Don’t reuse session IDs across different conversations.
Give sessions meaningful names that describe the workflow or conversation type:
  • Good: “Customer Support Chat”, “Recipe Generator”
  • Bad: “Session 1”, “Test”
Use paths to track progress through multi-step workflows:
Track both session and user to understand per-user session patterns:
Keep sessions focused on a single conversation or workflow. Start a new session for unrelated interactions.

Common Use Cases

Track complete conversations from greeting to resolution:

Next Steps

Distributed Tracing

Track parent-child relationships between requests

Custom Properties

Add metadata to sessions

User Metrics

Combine sessions with user tracking

Request Logging

Learn about individual request logging