Skip to main content

What is a Session?

A session represents a single agent interaction from start to finish. It captures:

Timeline

When the interaction started and ended, plus duration.

User Context

Which user triggered the interaction.

Events

Every LLM call, tool usage, and decision in sequence.

Outcome

Whether the session succeeded or failed, plus metrics.

Creating Sessions

The simplest way to track sessions using the begin/finish pattern:

Full Control API

For more control over session data:

Event Types

Sessions contain events that capture everything your agent does:

Tool Calls

When your agent uses a tool (search, API call, database query, etc.)

Decisions

When your agent makes a choice between alternatives:

Automatic Tracking

LangChain Integration — If you use LangChain, our callback handler automatically tracks all events. No manual tracking needed. Learn more about LangChain integration →

Session Lifecycle

1

Created

Session starts when agent begins processing.
2

Events

Tool calls, decisions, and LLM calls are tracked.
3

Completed

Session ends with success/failure status and metrics.

Viewing Sessions

In the Sentrial dashboard, you can:
  • Browse all sessions with filters for time range, agent, user, and status
  • Replay sessions to see exactly what happened step-by-step
  • View event details including inputs, outputs, and reasoning
  • See detected issues and jump to AI diagnosis

Next Steps

Issues & Diagnosis

Learn how issues are automatically detected.

Python SDK Reference

Complete API for session tracking.