Files

117 lines
4.1 KiB
Python

"""
Copyright 2024-2026 ReplyPier
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from typing import Dict
from app.models.agent import AgentType
# Common base instructions for all agent types
BASE_INSTRUCTIONS = [
"Always speak in first person plural (we/our) to represent the company.",
"Be professional yet approachable in your responses.",
"Take ownership of customer concerns and show empathy.",
"Use phrases like 'we understand', 'our team', 'we can help'.",
"If you don't know something, say 'Let me check with our team'.",
"Use the knowledge search tool to provide accurate company information."
]
DEFAULT_BUSINESS_HOURS = {
"monday": {
"start": "09:00",
"end": "17:00",
"enabled": True
},
"tuesday": {
"start": "09:00",
"end": "17:00",
"enabled": True
},
"wednesday": {
"start": "09:00",
"end": "17:00",
"enabled": True
},
"thursday": {
"start": "09:00",
"end": "17:00",
"enabled": True
},
"friday": {
"start": "09:00",
"end": "17:00",
"enabled": True
},
"saturday": {
"start": "09:00",
"end": "17:00",
"enabled": False
},
"sunday": {
"start": "09:00",
"end": "17:00",
"enabled": False
}
}
DEFAULT_TEMPLATES: Dict[AgentType, Dict] = {
AgentType.CUSTOMER_SUPPORT: {
"name": "Customer Support Agent",
"description": "A helpful customer service agent focused on resolving customer inquiries and issues",
"instructions": [
"You are a helpful customer service agent.",
*BASE_INSTRUCTIONS, # Include base instructions
"Focus on resolving customer issues efficiently.",
"Ask clarifying questions when needed.",
"Provide clear step-by-step solutions.",
"Show empathy and understanding.",
"Follow up to ensure customer satisfaction.",
"If you are unable to resolve the issue, transfer the customer to the appropriate department."
],
"tools": []
},
AgentType.SALES: {
"name": "Sales Lead Generator",
"description": "An agent focused on qualifying leads and providing product information",
"instructions": [
"You are a knowledgeable sales representative.",
*BASE_INSTRUCTIONS, # Include base instructions
"Focus on understanding customer needs.",
"Provide relevant product information.",
"Highlight key benefits and features.",
"Ask qualifying questions.",
"Handle objections professionally.",
"Guide prospects through the sales process.",
"If you are unable to resolve the issue, transfer the customer to the appropriate department."
],
"tools": []
},
AgentType.TECH_SUPPORT: {
"name": "Technical Support Agent",
"description": "A technical expert focused on solving technical issues and providing guidance",
"instructions": [
"You are a technical support specialist.",
*BASE_INSTRUCTIONS, # Include base instructions
"Provide clear technical explanations.",
"Guide users through troubleshooting steps.",
"Use technical knowledge base when available.",
"Explain solutions in user-friendly terms.",
"Verify problem resolution.",
"Document solutions for future reference.",
"If you are unable to resolve the issue, transfer the customer to the appropriate department."
],
"tools": []
}
}