Analytics

Analytics & Monitoring

Track your agent's performance, monitor costs, review conversations, and gain insights into usage patterns with real-time analytics.

Analytics & Monitoring

thinnestAI provides comprehensive analytics to help you understand how your agents are performing, what they're costing, and where they can improve.

Dashboard Overview

The main Dashboard shows aggregated metrics across all your agents:

MetricDescription
Total ConversationsNumber of chat and voice sessions
Total MessagesMessages exchanged across all agents
Total CostUSD spent on LLM tokens and voice minutes
Average Response TimeMean latency from message to response
Success RatePercentage of conversations completed successfully
Active AgentsNumber of agents handling traffic

Time Range Filters

View metrics for different periods:

  • Last 24 hours
  • Last 7 days
  • Last 30 days
  • Custom date range

Agent Performance

Each agent has a dedicated Performance tab with detailed metrics:

Response Metrics

MetricDescription
Avg Response TimeMean time to generate a response
p50 LatencyMedian latency (50th percentile)
p95 Latency95th percentile latency
Tokens per ResponseAverage input + output tokens per message

Cost Metrics

MetricDescription
Total CostTotal USD spent by this agent
Cost per ConversationAverage cost per session
Input TokensTotal input tokens consumed
Output TokensTotal output tokens consumed
Voice MinutesTotal minutes of voice calls

Quality Metrics

MetricDescription
Success RateConversations completed without errors
Error RatePercentage of failed conversations
Tool Call RateHow often the agent uses tools
Evaluation ScoreAverage score from evaluations (if configured)

Via the API

curl "https://api.thinnest.ai/agents/agent_abc123/summary?period=7d" \
  -H "Authorization: Bearer $THINNESTAI_API_KEY"
{
  "period": "7d",
  "total_sessions": 342,
  "total_messages": 1845,
  "total_cost_usd": 12.47,
  "avg_response_time_ms": 1240,
  "p50_latency_ms": 980,
  "p95_latency_ms": 2850,
  "success_rate": 0.97,
  "total_input_tokens": 485000,
  "total_output_tokens": 192000,
  "voice_minutes": 28.5,
  "avg_evaluation_score": 4.2
}

Agent Tracing

Every agent interaction is traced for debugging and analysis:

Trace Data

Each trace includes:

  • Input message — What the user said
  • Agent reasoning — The LLM's internal processing
  • Tool calls — Which tools were called, with what arguments, and what they returned
  • Output message — The agent's response
  • Token usage — Input and output tokens
  • Latency — Time for each step
  • Cost — USD cost of this interaction
  • Errors — Any errors that occurred

Viewing Traces

curl "https://api.thinnest.ai/agents/agent_abc123/traces?limit=20" \
  -H "Authorization: Bearer $THINNESTAI_API_KEY"
{
  "traces": [
    {
      "id": "trace_xyz",
      "session_id": "sess_123",
      "input": "What are your hours?",
      "output": "We're open Monday to Friday, 9 AM to 5 PM EST.",
      "tool_calls": [],
      "input_tokens": 145,
      "output_tokens": 28,
      "latency_ms": 890,
      "cost_usd": 0.0012,
      "status": "success",
      "created_at": "2026-03-06T14:30:00Z"
    }
  ]
}

Voice Metrics

For voice agents, additional real-time metrics are available:

MetricDescription
Active CallsCurrently ongoing voice sessions
Call DurationAverage and total call length
Voice LatencyTime from speech end to agent response start
Transcription AccuracyQuality of speech-to-text
Interruption RateHow often the user interrupts the agent

Real-Time Voice Metrics (WebSocket)

Subscribe to live voice metrics during active calls:

const ws = new WebSocket('wss://api.thinnest.ai/voice/metrics/agent_abc123/ws');

ws.onmessage = (event) => {
  const metrics = JSON.parse(event.data);
  console.log('Active calls:', metrics.active_calls);
  console.log('Avg latency:', metrics.avg_latency_ms);
};

Channel Analytics

Track message volume and quality per channel:

curl "https://api.thinnest.ai/analytics/channels?agent_id=agent_abc123&period=30d" \
  -H "Authorization: Bearer $THINNESTAI_API_KEY"
{
  "channels": {
    "voice": {
      "total_sessions": 180,
      "total_messages": 1200,
      "success_rate": 0.96,
      "avg_response_time_ms": 1500
    },
    "chat": {
      "total_sessions": 420,
      "total_messages": 2800,
      "success_rate": 0.99,
      "avg_response_time_ms": 850
    },
    "widget": {
      "total_sessions": 95,
      "total_messages": 380,
      "success_rate": 0.98,
      "avg_response_time_ms": 920
    }
  }
}

Usage & Billing Metrics

Monitor your spending in real-time:

curl "https://api.thinnest.ai/metrics/usage" \
  -H "Authorization: Bearer $THINNESTAI_API_KEY"
{
  "balance_usd": 47.23,
  "usage_today_usd": 3.12,
  "usage_this_month_usd": 89.45,
  "top_agents_by_cost": [
    { "agent_id": "agent_abc123", "name": "Support Agent", "cost_usd": 45.20 },
    { "agent_id": "agent_def456", "name": "Sales Caller", "cost_usd": 32.10 }
  ],
  "breakdown": {
    "llm_tokens": 72.30,
    "voice_minutes": 15.50,
    "scraping": 1.65
  }
}

Audit Logging

For compliance and security, all platform actions are logged:

EventData Captured
Agent created/updated/deletedWho, when, what changed
Tool configuration changesOld and new config (keys redacted)
Phone number assigned/releasedAgent, number, timestamp
Team member changesInvitations, role changes, removals
Billing eventsTop-ups, subscription changes, refunds

View Audit Logs

curl "https://api.thinnest.ai/admin/audit/logs?limit=50" \
  -H "Authorization: Bearer $THINNESTAI_API_KEY"
{
  "logs": [
    {
      "id": 1234,
      "user_id": "auth0|abc123",
      "action": "agent.update",
      "resource_type": "agent",
      "resource_id": "agent_abc123",
      "details": {
        "changed_fields": ["instructions", "temperature"]
      },
      "ip_address": "203.0.113.42",
      "created_at": "2026-03-06T15:00:00Z"
    }
  ]
}

Deployment History

Track all deployments and version changes:

curl "https://api.thinnest.ai/deployments/agent_abc123/history" \
  -H "Authorization: Bearer $THINNESTAI_API_KEY"
{
  "deployments": [
    {
      "id": 5,
      "version": "v3",
      "status": "active",
      "deployed_at": "2026-03-06T12:00:00Z",
      "deployed_by": "user@example.com",
      "changes": "Updated system prompt and added Gmail tool"
    },
    {
      "id": 4,
      "version": "v2",
      "status": "superseded",
      "deployed_at": "2026-03-04T09:00:00Z"
    }
  ]
}

Rollback

If a deployment causes issues, roll back to a previous version:

curl -X POST "https://api.thinnest.ai/deployments/agent_abc123/rollback" \
  -H "Authorization: Bearer $THINNESTAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "version_id": 4 }'

Alerts & Notifications

Configure alerts for important metrics:

  • Error rate spike — Get notified when error rate exceeds a threshold
  • High latency — Alert when response time degrades
  • Budget threshold — Warning when spending approaches a limit
  • Low balance — Alert before your balance runs out

Best Practices

  • Check analytics weekly — Spot trends before they become problems.
  • Use traces for debugging — When an agent misbehaves, traces show exactly what happened.
  • Monitor cost per conversation — Ensure your agents are cost-effective.
  • Set up alerts — Don't wait for users to report issues.
  • Compare agent versions — After deploying changes, compare metrics to the previous version.
  • Review audit logs — Track who changed what, especially in team environments.

On this page