Skip to content

Fixes #46 : Agent Execution Analytics Dashboard - #47

Open
AbhinaavRamesh wants to merge 17 commits into
Meterless:mainfrom
AbhinaavRamesh:main
Open

Fixes #46 : Agent Execution Analytics Dashboard#47
AbhinaavRamesh wants to merge 17 commits into
Meterless:mainfrom
AbhinaavRamesh:main

Conversation

@AbhinaavRamesh

@AbhinaavRamesh AbhinaavRamesh commented Dec 25, 2025

Copy link
Copy Markdown

Fixes #46

This PR introduces a native Analytics Dashboard for GenAI AgentOS, providing visibility into agent performance, costs, and execution patterns—without requiring external tooling.

image

Why This Matters

Currently, there's no way to answer questions like:

  • Which agents are slow or expensive?
  • Why did a query fail?
  • How much are we spending on tokens?

This dashboard solves that by surfacing execution data in an actionable format.

Features

Feature Description
Execution History Paginated list of past queries with timing, status, and agent details
Summary Metrics At-a-glance cards for execution count, avg response time, success rate
Token & Cost Tracking Usage breakdown by agent, model, and user
Query Inspector Drill into individual executions to see the ReAct loop and token breakdown
Export Options CSV/JSON export for offline analysis

Implementation

Database Schema Migration

Added migration a1b2c3d4e5f6_add_analytics_tables.py with five new tables:

Table Purpose
agentexecutions Tracks each agent invocation with timing and status
tokenusages Records token consumption per execution
executiontraces Stores step-by-step ReAct loop details
budgetalerts Configurable spending thresholds and notifications
analyticssnapshots Periodic rollups for trend analysis

Custom PostgreSQL enums added for execution_status, trace_step_type, budget_alert_type, and budget_scope.

Cleanup

Removed stale config files (.dockerignore, .gitignore, .python-version) that were no longer needed.

Alternatives Considered

Approach Trade-off
External tools (Grafana, Datadog) Requires extra infrastructure
Enhanced logging only No visualizations or trend analysis
Third-party platforms (Langfuse, LangSmith) Adds cost and external dependencies

A lightweight native solution fits the self-hosted philosophy of AgentOS.

AbhinaavRamesh and others added 17 commits December 24, 2025 19:06
…hboard

  Add full-stack observability feature for tracking agent executions,
  token usage, costs, and performance metrics.

  Backend:
  - Add database migration with 5 new tables: agentexecutions, tokenusages,
    executiontraces, budgetalerts, and analyticssnapshots
  - Implement analytics repository with filtering, aggregation, and time-series queries
  - Add REST API endpoints for executions, usage stats, cost breakdown, and trends
  - Define Pydantic schemas and DTOs for analytics data transfer
  - Add ExecutionStatus and ExecutionTraceStepType enums
  - Include seed script for generating synthetic test data

  Frontend:
  - Create AnalyticsPage with KPI cards, charts, and execution table
  - Add ExecutionDetailsPage for viewing individual execution traces
  - Implement analyticsService for API communication
  - Add TypeScript types for analytics domain
  - Update Sidebar with analytics navigation link
  - Configure router with /analytics and /analytics/:id routes

  Documentation:
  - Add ANALYTICS.md with API reference and usage guide
  - Include UI screenshots for feature demonstration

  Testing:
  - Add comprehensive API tests for all analytics endpoints

  Housekeeping:
  - Remove redundant backend/.dockerignore, .gitignore, .python-version
    (covered by root-level configuration)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: AbhinaavRamesh <47682907+AbhinaavRamesh@users.noreply.github.com>
Replace window.location.href with React Router navigate
Feature Request: Agent Execution Analytics Dashboard
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Agent Execution Analytics Dashboard

2 participants