Skip to content

Commit c846b5b

Browse files
authored
Merge pull request #14 from Sandy247/multi-agent-comparison
feat: Multi-Agent Comparison with Scenario-Based Testing
2 parents 889a15f + a576d47 commit c846b5b

37 files changed

Lines changed: 7871 additions & 225 deletions

.gitignore

Lines changed: 88 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -1,81 +1,12 @@
1-
# Dependencies
2-
node_modules/
3-
npm-debug.log*
4-
yarn-debug.log*
5-
yarn-error.log*
6-
7-
# Next.js
8-
frontend/.next/
9-
frontend/.next/**
10-
frontend/out/
11-
12-
# Production builds
13-
frontend/build/
14-
frontend/dist/
15-
16-
# Environment variables
17-
.env
18-
.env.local
19-
.env.development.local
20-
.env.test.local
21-
.env.production.local
22-
23-
# Logs
24-
logs
25-
*.log
26-
27-
# Runtime data
28-
pids
29-
*.pid
30-
*.seed
31-
*.pid.lock
32-
33-
# Coverage directory used by tools like istanbul
34-
coverage/
35-
36-
# nyc test coverage
37-
.nyc_output
38-
39-
# Dependency directories
40-
jspm_packages/
41-
42-
# Optional npm cache directory
43-
.npm
44-
45-
# Optional REPL history
46-
.node_repl_history
47-
48-
# Output of 'npm pack'
49-
*.tgz
50-
51-
# Yarn Integrity file
52-
.yarn-integrity
53-
54-
# dotenv environment variables file
55-
.env
56-
57-
# IDE files
58-
.vscode/
59-
.idea/
60-
*.swp
61-
*.swo
62-
*~
63-
64-
# OS generated files
65-
.DS_Store
66-
.DS_Store?
67-
._*
68-
.Spotlight-V100
69-
.Trashes
70-
ehthumbs.db
71-
Thumbs.db
72-
731
# Python
742
__pycache__/
753
*.py[cod]
764
*$py.class
775
*.so
786
.Python
7+
env/
8+
venv/
9+
ENV/
7910
build/
8011
develop-eggs/
8112
dist/
@@ -91,32 +22,97 @@ wheels/
9122
*.egg-info/
9223
.installed.cfg
9324
*.egg
94-
MANIFEST
25+
.pytest_cache/
26+
.coverage
27+
htmlcov/
28+
.mypy_cache/
29+
.dmypy.json
30+
dmypy.json
31+
32+
# Node
33+
node_modules/
34+
npm-debug.log*
35+
yarn-debug.log*
36+
yarn-error.log*
37+
.npm
38+
.eslintcache
39+
.node_repl_history
40+
*.tgz
9541

96-
# Virtual environments
42+
# React build
43+
webapp/frontend/build/
44+
45+
# Environment files
9746
.env
98-
# Virtual environments (managed by uv)
99-
.venv/
100-
env/
101-
venv/
102-
ENV/
103-
env.bak/
104-
venv.bak/
47+
.env.local
48+
.env.development.local
49+
.env.test.local
50+
.env.production.local
51+
# But keep these for reference
52+
!.env.production
53+
!.env.example
54+
55+
# IDE
56+
.vscode/
57+
.idea/
58+
*.swp
59+
*.swo
60+
*~
61+
.DS_Store
62+
63+
# Logs
64+
*.log
65+
logs/
66+
*.log.*
10567

10668
# Database
10769
*.db
10870
*.sqlite3
10971

110-
# Audio files (if you want to ignore local recordings)
111-
recordings/
112-
*.wav
113-
*.mp3
114-
*.m4a
115-
*.aac
116-
*.ogg
117-
*.flac
72+
# Transcripts and data
73+
transcripts/
74+
reports/*.csv
75+
reports/*.xlsx
76+
reports/*.json
11877

11978
# Temporary files
120-
*.tmp
121-
*.temp
122-
.cache/
79+
tmp/
80+
temp/
81+
.cache/
82+
83+
# Docker
84+
.dockerignore.local
85+
86+
# Kubernetes secrets
87+
k8s/secrets/
88+
k8s/*.secret.yaml
89+
90+
# Additional test/coverage files
91+
*.coverage.xml
92+
coverage.xml
93+
htmlcov/
94+
95+
# Playwright
96+
.playwright-mcp/
97+
98+
# Temporary logs
99+
backend-logs.txt
100+
*-logs.txt
101+
102+
# Test artifacts
103+
test_single_redaction.py
104+
metrics_extraction_evaluation.py
105+
106+
# Local scripts
107+
generate_shubham_metrics_csv.py
108+
recover_bolna_executions.py
109+
schedule-agent-tasks.sh
110+
111+
# Claude Config
112+
CLAUDE.md
113+
.claude/
114+
115+
# Next.js build artifacts
116+
frontend/.next/
117+
frontend/out/
118+
*.tsbuildinfo

README.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ Perfect for **call centers**, **voice bot developers**, **customer service teams
5151
- **🏷️ Smart Classification & Labeling**: AI-driven call categorization, sentiment analysis, and business action labeling
5252
- **📝 Enhanced Transcript Processing**: Automatic timestamp alignment, turn-by-turn conversation analysis, and transcript normalization
5353
- **🎵 Advanced Audio Analysis**: AI-powered voice analysis with pause detection, speech segmentation, and conversation health scoring
54+
- **🔄 Multi-Agent Comparison**: Scenario-based testing to compare multiple voice agents with AI-powered metrics
5455
- **☁️ S3 Integration**: Secure audio file storage with automatic format detection
5556
- **🌐 Modern Web UI**: Beautiful React/Next.js frontend with real-time timeline visualization
5657
- **🔌 Flexible Data Ingestion**: Support for both direct API calls and Bolna platform integration
@@ -413,13 +414,18 @@ python test_all_calls_pipeline.py --help
413414
voicesummary/
414415
├── app/ # Backend application
415416
│ ├── api/ # API endpoints
416-
│ │ └── calls.py # Call management API
417+
│ │ ├── calls.py # Call management API
418+
│ │ └── agent_comparison.py # Agent comparison API
417419
│ ├── integrations/ # External platform integrations
418-
│ │ └── fetch_bolna_calls_simple.py # Bolna integration
420+
│ │ ├── fetch_bolna_calls_simple.py # Bolna integration
421+
│ │ ├── bolna_agent_config_fetcher.py # Agent config fetching
422+
│ │ └── manual_agent_manager.py # Manual agent management
419423
│ ├── utils/ # Utility modules
420424
│ │ ├── audio_processor.py # Audio analysis & processing
421425
│ │ ├── improved_voice_analyzer.py # AI voice analysis
422426
│ │ ├── call_data_pipeline.py # AI data extraction pipeline
427+
│ │ ├── comparison_orchestrator.py # Comparison execution
428+
│ │ ├── conversation_simulator.py # AI dialogue simulation
423429
│ │ └── s3.py # S3 operations
424430
│ ├── models.py # Database models
425431
│ ├── schemas.py # API schemas
@@ -469,6 +475,16 @@ voicesummary/
469475
| `GET` | `/api/calls/{call_id}/extracted-data` | Get AI-extracted data for a call |
470476
| `GET` | `/api/calls/{call_id}/extracted-data/status` | Get AI processing status of extracted data |
471477

478+
### Agent Comparison
479+
480+
| Method | Endpoint | Description |
481+
|--------|----------|-------------|
482+
| `POST` | `/api/comparisons/` | Create new agent comparison |
483+
| `GET` | `/api/comparisons/` | List all comparisons |
484+
| `GET` | `/api/comparisons/{comparison_id}` | Get comparison details |
485+
| `POST` | `/api/comparisons/{comparison_id}/execute` | Execute comparison |
486+
| `POST` | `/api/comparisons/{comparison_id}/rerun` | Re-run comparison |
487+
472488
## 🎯 Use Cases
473489

474490
### Voice Agent Analytics & AI Insights
Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
"""Add processed_data column to audio_calls table
22
33
Revision ID: 001
4-
Revises:
4+
Revises:
55
Create Date: 2025-01-27 10:00:00.000000
66
77
"""
8-
from alembic import op
8+
99
import sqlalchemy as sa
1010
from sqlalchemy.dialects import postgresql
1111

12+
from alembic import op
13+
1214
# revision identifiers, used by Alembic.
13-
revision = '001'
15+
revision = "001"
1416
down_revision = None
1517
branch_labels = None
1618
depends_on = None
@@ -21,10 +23,12 @@ def upgrade():
2123
# Check if the column already exists
2224
connection = op.get_bind()
2325
inspector = sa.inspect(connection)
24-
columns = [col['name'] for col in inspector.get_columns('audio_calls')]
25-
26-
if 'processed_data' not in columns:
27-
op.add_column('audio_calls', sa.Column('processed_data', postgresql.JSON, nullable=True))
26+
columns = [col["name"] for col in inspector.get_columns("audio_calls")]
27+
28+
if "processed_data" not in columns:
29+
op.add_column(
30+
"audio_calls", sa.Column("processed_data", postgresql.JSON, nullable=True)
31+
)
2832
print("Added processed_data column to audio_calls table")
2933
else:
3034
print("processed_data column already exists in audio_calls table")
@@ -35,10 +39,10 @@ def downgrade():
3539
# Check if the column exists before trying to drop it
3640
connection = op.get_bind()
3741
inspector = sa.inspect(connection)
38-
columns = [col['name'] for col in inspector.get_columns('audio_calls')]
39-
40-
if 'processed_data' in columns:
41-
op.drop_column('audio_calls', 'processed_data')
42+
columns = [col["name"] for col in inspector.get_columns("audio_calls")]
43+
44+
if "processed_data" in columns:
45+
op.drop_column("audio_calls", "processed_data")
4246
print("Removed processed_data column from audio_calls table")
4347
else:
4448
print("processed_data column does not exist in audio_calls table")

0 commit comments

Comments
 (0)