-
Notifications
You must be signed in to change notification settings - Fork 69
Feature/realtime agent v2 sdk #17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Add OpenAI Agents SDK dependencies (@openai/agents, @openai/agents-realtime) - Create new /realtime-agent-v2 route for parallel implementation - Implement MainV2.vue using SDK's RealtimeAgent and RealtimeSession - Migrate all 6 coaching tools to SDK's tool() format with Zod schemas - Update audio pipeline to use SDK's session.sendAudio() method - Add TypeScript declarations for SDK types - Maintain dual-agent architecture (salesperson + customer coach) - Use gpt-4o-mini models for cost optimization
- Extract 14 components from monolithic Main.vue (1558 lines) - Implement 3 Pinia stores for state management: - realtimeAgent: Business logic and conversation state - settings: UI preferences and toggles - openai: SDK agent management - Create modular component structure: - Navigation: TitleBar, CoachSelector, ConnectionStatus, etc. - Content: LiveTranscription, CustomerIntelligence, KeyInsights, etc. - Actions: CommitmentsList, PostCallActions - Modals: CustomerInfoModal - Integrate OpenAI Agents SDK while preserving exact UI - Maintain all 6 coaching function tools with SDK implementation - Preserve original 3-column grid layout and styling - Fix Tailwind CSS v4 @apply directive issues - Fix Zod nullable fields for OpenAI Realtime API compatibility - Update API endpoints to match existing routes
Claude finished @vijaythecoder's task —— View job PR Review Progress ✅Reviewing pull request: Feature/realtime agent v2 sdk Review Checklist:
Code Review FeedbackThis is a substantial feature addition implementing OpenAI's Realtime API V2 with a dual-agent architecture. Here's my detailed analysis: ✅ Strengths
|
- Create comprehensive mock data service with realistic sales conversation - Add TypeScript interfaces for mock data structures - Implement mock mode toggle in navigation bar - Update store with mock data loading and simulation capabilities - Fix transcript styling: remove horizontal scroll, subtle borders - Include customer insights, coaching tips, and performance metrics - Enable easy UI testing without API calls
Claude finished @vijaythecoder's task —— View job PR Review ProgressReviewing pull request: Feature/realtime agent v2 sdk Review Checklist:
Code Review FeedbackThis is a substantial feature addition implementing OpenAI's Realtime API V2 with a dual-agent architecture. Here's my detailed analysis: ✅ Strengths
|
- Fix double scrollbar issue by using h-screen overflow-hidden pattern - Fix dropdown functionality with proper event handling - Fix template fetching to handle wrapped API response structure - Swap Discussion Topics and Post-Call Actions positions - Set column 3 component heights: Contextual 50%, Commitments 30%, Topics 20% - Fix overlay mode transparency by properly using useOverlayMode composable - Fix Customer Intelligence progress bar visibility in overlay mode - Fix Discussion Topics pill height to be fixed instead of stretching
Claude finished @vijaythecoder's task —— View job Code Review FeedbackThis is a substantial feature addition implementing OpenAI's Realtime API V2 with a dual-agent architecture. Here's my detailed analysis: ✅ Strengths
|
- Fix hidden cards in single column view by adding minimum heights - Key Insights: min-h-[200px], Post-Call Actions: min-h-[150px] - Contextual Info: min-h-[250px], Commitments: min-h-[150px], Topics: min-h-[120px] - Update all card backgrounds to bg-gray-50/dark:bg-gray-900 for consistency - Simplify responsive layout to use only lg breakpoint for better mobile experience
Claude finished @vijaythecoder's task —— View job Code Review FeedbackThis is a substantial feature addition implementing OpenAI's Realtime API V2 with a dual-agent architecture. Here's my detailed analysis: ✅ Strengths
|
- Adjust VAD settings for coach session: threshold 0.3, silence 100ms, padding 200ms - Add aggressive real-time analysis instructions to coach prompt - Fix duplicate transcript handlers - use input_audio_transcription.completed events - Add function call event handlers for coach analytics - Update conversation context on each customer message - Fix dropdown z-index with Teleport solution - Remove screen recording blocked indicator - Add debug logging for function calls
Claude finished @vijaythecoder's task —— View job Code Review FeedbackThis is a substantial feature addition implementing OpenAI's Realtime API V2 with a dual-agent architecture. Here's my detailed analysis: ✅ Strengths
|
The architecture documentation has been moved to a more appropriate location or is no longer needed.
Claude finished @vijaythecoder's task —— View job PR Review Progress ✅Reviewing pull request: Feature/realtime agent v2 sdk Review Checklist:
Code Review FeedbackThis is a substantial feature addition implementing OpenAI's Realtime API V2 with a dual-agent architecture. Here's my detailed analysis: ✅ Strengths
|
- TitleBar.vue: Add ESLint comment for false positive on props usage - MainV2.vue: Remove unused imports (RealtimeSessionOptions, ref) and unused variables (currentAudioData, calculateAudioLevel) - openai.ts: Remove unused RealtimeAgentConfiguration import - openai-agents.d.ts: Replace Function type with proper function signatures All linting issues resolved - npm run lint now passes successfully
Claude finished @vijaythecoder's task —— View job PR Review Progress ✅Reviewing pull request: Feature/realtime agent v2 sdk Review Checklist:
Code Review FeedbackThis is a substantial feature addition implementing OpenAI's Realtime API V2 with a dual-agent architecture. Here's my detailed analysis: ✅ Strengths
|
- Remove screen darkening effect from protection mode - Update card backgrounds to white for better contrast in light theme - Remove shadows from transcription message bubbles - Update system messages to professional gray theme - Fix WebSocket connection errors by correcting parameter names - Implement smart transcript grouping to combine messages from same speaker - Fix tool configuration format for coach session - Add 5-second time window for message grouping These changes improve the visual appearance and functionality of the realtime agent interface.
Claude finished @vijaythecoder's task —— View job PR Review Progress ✅Reviewing pull request: Feature/realtime agent v2 sdk Review Checklist:
Code Review FeedbackThis is a substantial feature addition implementing OpenAI's Realtime API V2 with a dual-agent architecture. Here's my detailed analysis: ✅ Strengths
|
- Update AppSidebar logo link to /realtime-agent-v2 - Update Conversations page link to /realtime-agent-v2 - Update Onboarding page link to /realtime-agent-v2 All navigation now points to the new V2 implementation instead of the legacy version.
- Replace Swift-based system audio capture with electron-audio-loopback - Add microphone permission handling for macOS - Fix screen recording permission loop issue - Add NSScreenCaptureUsageDescription to Info.plist - Create Audio Test page for testing mic and system audio - Add navigation links between Audio Test, Agent V1, and Agent V2 - Update MainV2 to use electron-audio-loopback for system audio - Add microphone entitlement com.apple.security.device.audio-input - Create API endpoints for checking and requesting media permissions - Add comprehensive troubleshooting documentation
Claude finished @vijaythecoder's task —— View job PR Review Progress ✅Reviewing pull request: Feature/realtime agent v2 sdk Review Checklist:
Code Review FeedbackThis is a substantial feature addition implementing OpenAI's Realtime API V2 with a dual-agent architecture. Here's my detailed analysis: ✅ Strengths
|
- Remove V2 badge from MainV2.vue - Remove Audio Test and Agent V2 links from navigation - Remove Agent V1 link for cleaner navigation - Remove Mock Mode button from UI - Add console commands for mock mode (window.clueless.enableMockMode/disableMockMode) - Improve connection status display with better visual representation - Show 'Connected' in green, 'Connecting...' in yellow with animation - Use 'Not Connected' instead of 'disconnected' - Add color-coded text and smooth transitions - Simplify developer tools to essential commands only
Claude finished @vijaythecoder's task —— View job PR Code Review Complete ✅Reviewing pull request: Feature/realtime agent v2 sdk Review Checklist:
Code Review FeedbackThis is a substantial feature addition implementing OpenAI's Realtime API V2 with a dual-agent architecture. Here's my detailed analysis: ✅ Strengths
|
- Remove debug console.log statements throughout the component - Keep only critical error messages and error handling logs - Remove audio capture status checks and session configuration logs - Remove transcription completion logs and transport event logs - Remove permission status logs and audio sending debug logs - Clean up mock mode console messages - Remove developer commands listing on startup - Maintain clean console output for production use
Claude finished @vijaythecoder's task —— View job PR Review Complete ✅Reviewing pull request: Feature/realtime agent v2 sdk Review Checklist:
Code Review FeedbackThis is a substantial feature addition implementing OpenAI's Realtime API V2 with a dual-agent architecture. Here's my detailed analysis: ✅ Strengths
|
- Fix missing closing brace in onaudioprocess callback - Remove unnecessary nested try-catch block for audio loopback - Ensure all async/await code is properly contained within async functions - Build now completes successfully
Claude finished @vijaythecoder's task —— View job PR Code Review Complete ✅Reviewing pull request: Feature/realtime agent v2 sdk Review Checklist:
Code Review FeedbackThis is a substantial feature addition implementing OpenAI's Realtime API V2 with a dual-agent architecture. Here's my detailed analysis: ✅ Strengths
|
- Remove unused closeMobileMenu function from MobileMenu.vue - Remove unused parameters from catch blocks in MainV2.vue - Remove unused event parameters from event handlers - Use parameterless catch blocks where error object is not needed - All ESLint checks now pass
Claude finished @vijaythecoder's task —— View job PR Code Review Complete ✅Reviewing pull request: Feature/realtime agent v2 sdk Review Checklist:
Code Review FeedbackThis is a substantial feature addition implementing OpenAI's Realtime API V2 with a dual-agent architecture. Here's my detailed analysis: ✅ Strengths
|
- Remove 19 debug logs from useScreenProtection.ts - Remove 50+ debug logs from RealtimeAgent/Main.vue - Remove 6 debug logs from AudioTest/Index.vue - Remove 10 debug logs from audioCapture.ts - Remove 4 debug logs from electronPermissions.ts - Remove 1 debug log from MainV2.vue - Fix ESLint errors from orphaned console.log arguments - Keep legitimate error handling console.error statements
Claude finished @vijaythecoder's task —— View job PR Code Review Complete ✅Reviewing pull request: Feature/realtime agent v2 sdk Review Checklist:
Code Review FeedbackThis is a substantial feature addition implementing OpenAI's Realtime API V2 with a dual-agent architecture. Here's my detailed analysis: ✅ Strengths
|
- Replace window.audioLoopback with Native.ipcRendererInvoke - Use dynamic IPC channel names: enable-loopback-audio, disable-loopback-audio - Consistent with new NativePHP extension system
- Fixed electron-audio-loopback integration in NativePHP extension - Removed duplicate IPC handler registration that was causing conflicts - Updated MainV2.vue to use Native.ipcRendererInvoke for audio loopback - Added comprehensive logging for debugging audio capture flow - Added nativephp-electron to .gitignore for local development setup The key fix was allowing the electron-audio-loopback package to register its own IPC handlers without interference from manual implementations.
Claude finished @vijaythecoder's task —— View job PR Code Review Complete ✅Reviewing pull request: Feature/realtime agent v2 sdk Review Checklist:
Code Review FeedbackThis is a substantial feature addition implementing OpenAI's Realtime API V2 with a dual-agent architecture. Here's my detailed analysis: ✅ Strengths
|
Claude finished @vijaythecoder's task —— View job PR Code Review Complete ✅Reviewing pull request: Feature/realtime agent v2 sdk Review Checklist:
Code Review FeedbackThis is a substantial feature addition implementing OpenAI's Realtime API V2 with a dual-agent architecture. Here's my detailed analysis: ✅ Strengths
|
Summary
This PR refactors the RealtimeAgent from a monolithic 1558-line component into a modular architecture using Vue components, Pinia stores, and the OpenAI Agents SDK, while preserving the exact UI and functionality.
Key Changes
🏗️ Component Architecture (14 extracted components)
TitleBar
,CoachSelector
,ConnectionStatus
,ScreenProtectionToggle
,OverlayModeToggle
,MobileMenu
LiveTranscription
,CustomerIntelligence
,KeyInsights
,DiscussionTopics
,TalkingPoints
CommitmentsList
,PostCallActions
CustomerInfoModal
🗄️ State Management with Pinia (3 stores)
realtimeAgent.ts
: Business logic, conversation state, transcripts, and intelligencesettings.ts
: UI preferences, toggles, and dropdown statesopenai.ts
: SDK agent management, API keys, and session configuration🚀 OpenAI Agents SDK Integration
🎨 UI Preservation
🐛 Bug Fixes
@apply
directive issues.optional()
to.nullable()
for OpenAI API compatibility/templates
instead of/api/scripts
)Testing
Benefits
Route
New route available at
/realtime-agent-v2
for testing alongside the original at/realtime-agent
.