Core Concepts
Understand the key concepts behind Intentra CLI.
Events
An event is a single hook invocation from an AI tool. Each time you:
- Send a message in Cursor chat
- Request code completion
- Run a Claude Code command
- Execute a Gemini CLI prompt
…an event is captured.
Scans
A scan groups related events into a logical unit. For example:
- A chat conversation with multiple back-and-forth messages = one scan
- Code completion attempts while typing = one scan
- Separate, unrelated prompts = multiple scans
Scans make it easier to understand your AI usage patterns.
Normalization
Different AI tools report data in different formats. Intentra normalizes all events to a unified schema:
| Tool | Native Format | Normalized |
|---|---|---|
| Cursor | inputTokens, outputTokens | tokens.input, tokens.output |
| Claude | usage.input_tokens | tokens.input, tokens.output |
| Gemini | tokenCount | tokens.input, tokens.output |
This allows consistent analysis across tools.
Patterns
Intentra detects usage patterns that might indicate issues:
- Retry loops - Tool retries failed actions repeatedly
- Token bloat - Excessive context sent to model
- Timeout chains - Sequential timeouts wasting resources
Patterns are flagged on scans for review.
Local Buffer
All events are stored in a local SQLite buffer:
- Works offline
- No data leaves your machine by default
- Fast queries for local analysis
- Optional sync to remote server
Cost Estimation
Intentra estimates costs based on:
- Token counts (input + output)
- Model pricing (configurable)
- Usage over time
Note: Estimates are approximate and may not match actual provider bills.