By the end of this guide, you’ll have:
- Installed the Sentrial Python SDK
- Created and tracked your first agent session
- Automatic issue detection running on your sessions
- Access to AI-powered diagnosis and code fixes
Prerequisites
- Python 3.9+ or Node.js 18+
- A Sentrial account (sign up free)
- An API key from your organization settings
Step 1: Install the SDK
Step 2: Initialize & Track Sessions
Initialize the client with your API key, then create sessions to track your agent runs.Step 3: Track Events
Track key events in your agent: LLM calls, tool usage, and decisions.Option A: LangChain Auto-Tracking (Recommended)
If you use LangChain, our callback handler automatically tracks everything:Option B: Manual Event Tracking
For custom agents, manually track events:Step 4: View in Dashboard
Once sessions are tracked, open the Sentrial dashboard to see your data:Sessions
See all agent interactions with full event timelines. Click any session to replay what happened.
Agents
View metrics per agent: success rate, latency, cost. Identify regressions quickly.
Signals
Automatically detected issues across all sessions. Click to see AI diagnosis.
Codebase
Connect GitHub and chat with AI to fix issues directly in your code.
Complete Example
Here’s a production-ready example with LangChain:Next Steps
Sessions & Events
Deep dive into session tracking and event types.
Code Integration
Connect GitHub and fix issues in your codebase.
Python SDK Reference
Complete API reference for all methods.
LangChain Integration
Automatic tracking for LangChain agents.

