feat: Add AI-Powered Agent Performance Scorecard with Gemini Coaching Insights#846
feat: Add AI-Powered Agent Performance Scorecard with Gemini Coaching Insights#846samarthsugandhi wants to merge 2 commits into
Conversation
- Add backend/agent_scorecard.py: get_agent_metrics(), compute_performance_score(),
get_ai_coaching_tip() via Gemini, get_company_scorecard(), refresh_agent_scorecard()
- Add backend/scorecard_router.py: GET /api/scorecard/company/{id},
GET /api/scorecard/agent/{id}, POST /api/scorecard/refresh/{id}
- Register scorecard_router in backend/main.py
- Add supabase/migrations/20260531_add_agent_scorecards.sql
- Add Frontend/src/components/AgentScorecard.jsx: circular score ring +
metric bars + AI coaching tip
- Add Frontend/src/components/AgentLeaderboard.jsx: color-coded ranked table
- Add backend/tests/test_agent_scorecard.py: 8 unit tests
Closes ritesh-1918#774
|
@samarthsugandhi is attempting to deploy a commit to the ritesh Team on Vercel. A member of the Team first needs to authorize it. |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@ritesh-1918 Hi, this issue was originally raised by me, but the PR was submitted by @Daksh7785, who was neither assigned to the issue nor involved in its discussion. It appears that the solution was taken from my reported issue and merged without my contribution being considered. Could you please review this situation and take appropriate action if it violates the project's contribution guidelines? Thank you. |
Summary
Implements #774 — Real-time agent performance scorecard with AI-generated coaching insights using Gemini.
What's Changed
backend/agent_scorecard.pyget_agent_metrics()queries Supabase,compute_performance_score()weighted formula,get_ai_coaching_tip()via Gemini,get_company_scorecard(),refresh_agent_scorecard()backend/scorecard_router.py/api/scorecard/company/{id}, GET/api/scorecard/agent/{id}, POST/api/scorecard/refresh/{id}— all auth-guardedbackend/main.pysupabase/migrations/20260531_add_agent_scorecards.sqlagent_scorecardstable + indexesFrontend/src/components/AgentScorecard.jsxFrontend/src/components/AgentLeaderboard.jsxbackend/tests/test_agent_scorecard.pycompute_performance_score()How to Test
cd backend && pytest tests/test_agent_scorecard.py -v→ 8 tests pass/api/scorecard/refresh/{agent_id}?company_id=x→ recomputes + returns AI tipChecklist
Authorization: Bearerheadercompute_performance_score()returns 0.0 when no ticket datamain.pyCloses #774