Skip to content

Conversation

@Kaherdin
Copy link

This pull request introduces a new "real estate agent" scenario, expanding the application's agent capabilities with specialized agents for real estate use cases. It also improves the agent configuration structure to support this new scenario and makes minor code consistency updates.

New Real Estate Agent Scenario

  • Added a new scenario realEstate with three specialized agents:
    • greeterAgent: Welcomes users and routes them to the appropriate service (sector info or appointment) (src/app/agentConfigs/real-estate-agent/greeter-agent.ts)
    • sectorInfoAgent: Provides detailed information about neighborhoods, including prices, amenities, and transport options, with tools for sector lookup and comparison (src/app/agentConfigs/real-estate-agent/sector-info-agent.ts)
    • appointmentAgent: Handles appointment scheduling, collects client info, checks availability, and books appointments via tools (src/app/agentConfigs/real-estate-agent/appointment-agent.ts)
  • Agents are interconnected for handoffs, enabling smooth transitions between greeting, information, and booking services (src/app/agentConfigs/real-estate-agent/index.ts)
  • Defined the company name for the real estate scenario (Grand Chasseral Immobilier Jura) in a dedicated constants file (src/app/agentConfigs/real-estate-agent/constants.ts)

Integration and Configuration Updates

  • Registered the new realEstateScenario in the global agent set registry and SDK scenario map, making it available throughout the app (src/app/agentConfigs/index.ts, src/app/App.tsx) [1] [2] [3] [4]
  • Updated the company name mapping logic to support the new scenario for moderation guardrails (src/app/App.tsx)

Code Consistency and Minor Improvements

  • Standardized string quoting and import styles in several agent config files for consistency (src/app/agentConfigs/chatSupervisor/index.ts, src/app/agentConfigs/simpleHandoff.ts) [1] [2] [3]
  • Added suppressHydrationWarning to the root HTML element to address potential hydration mismatches (src/app/layout.tsx)

- Added new complexTaskAgent to handle advanced/out-of-scope requests in real estate scenario
- Created comprehensive AGENT_GUIDE.md with detailed instructions for adding new agents
- Updated greeterAgent to include handoff to complexTaskAgent for complex queries
- Enhanced scenario configuration to support bidirectional handoffs between all agents
- Added tools for task creation and email notifications in complexTaskAgent

The changes add a new agent capability
- Updated company name to "Grand Chasseral Immo SA" and added comprehensive company information including address, contact details, and opening hours
- Added detailed team member information with roles and contact preferences
- Enhanced greeter agent to directly handle general inquiries about company info without redirecting
- Expanded agent instructions to include specific responses for common questions about hours, location, and team
- Added detailed team member information including roles, phone numbers and emails
- Created new contactHumanAgent to handle staff availability and callback requests
- Added getCompanyInfoText helper function to generate formatted company info
- Updated greeterAgent to handle direct apartment inquiries and staff contact requests
- Replaced sectorInfoAgent with contactHumanAgent for better customer service flow
- Added tools for checking
- Added verification step to check if requested collaborator exists in team list
- Updated contact procedure to suggest similar collaborator names when exact match not found
- Improved string formatting and template literals for cleaner message construction
- Fixed code formatting and quotes consistency throughout the file
- Added Aurélien Borst as IT manager to company team list with contact details
- Added clientEmail field as required parameter in contact form schema
- Updated execute function to handle new clientEmail parameter in response
- Reformatted team member contact info template for better readability
- Added email functionality using Nodemailer for sending callback requests to staff
- Created API routes for handling callback requests (/api/send-callback) and test emails (/api/send-test-email)
- Added email configuration documentation and example .env file with SMTP settings
- Implemented test email agent for verifying SMTP setup
- Updated contact human agent to use real email notifications instead of mock responses
- Reduced staff availability
- Adjusted realtime session configuration with new turn detection settings and reduced speed from 4 to 1.5
- Temporarily disabled content moderation guardrails due to API incompatibility with v0.2.1
- Moved turn detection config from dynamic session updates to initial connection setup
- Fixed code formatting and quotation style consistency across files
- Simplified session update logic by removing redundant turn detection parameters
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.

1 participant