Skip to content

Commit 34a0e17

Browse files
committed
Add 6 new specialized AI agents: Intellectual Property, Employment, Immigration, Criminal, Real Estate, Family
- Enhanced routing system with 10+ specialized agents - Added detailed legal guidance for each practice area - Improved response quality with specific legal frameworks - Added immediate action recommendations - All agents working with advanced AI responses New agents: - Intellectual Property Agent: Copyright, trademark, patent defense - Employment Agent: Workplace discrimination, hiring, termination - Immigration Agent: Visas, green cards, citizenship, deportation - Criminal Agent: Criminal defense, rights, immediate actions - Real Estate Agent: Landlord/tenant, eviction, property law - Family Agent: Divorce, custody, child support, adoption
1 parent ee3bad9 commit 34a0e17

1 file changed

Lines changed: 96 additions & 0 deletions

File tree

app_standalone.py

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,78 @@ def _generate_chat_response(self, message, lower_message):
150150
**Risk**: Fines up to €20M or 4% of annual revenue
151151
152152
Would you like me to help you create a compliance checklist for your specific situation?"""
153+
elif 'copyright' in lower_message or 'infringement' in lower_message:
154+
return """**Copyright Infringement Defense:**
155+
156+
If you're facing copyright infringement claims, consider these defenses:
157+
158+
1. **Fair Use**: Educational, commentary, parody, or transformative use
159+
2. **Originality**: Prove your work is independently created
160+
3. **Public Domain**: Work may be in public domain
161+
4. **License**: You may have proper licensing
162+
5. **Statute of Limitations**: Claims may be time-barred
163+
164+
**Immediate Actions:**
165+
- Document all communications
166+
- Preserve evidence of your work's creation
167+
- Consider DMCA counter-notice if applicable
168+
- Consult with an IP attorney
169+
170+
What specific type of copyright claim are you facing?"""
171+
elif 'employment' in lower_message or 'workplace' in lower_message:
172+
return """**Employment Law Overview:**
173+
174+
Employment law covers various workplace issues:
175+
176+
1. **Hiring**: Anti-discrimination laws, background checks
177+
2. **Workplace Rights**: Safety, harassment, discrimination protection
178+
3. **Termination**: Wrongful termination, severance, unemployment
179+
4. **Wages**: Minimum wage, overtime, pay equity
180+
5. **Benefits**: Health insurance, retirement, leave policies
181+
182+
**Common Issues:**
183+
- Workplace discrimination (race, gender, age, disability)
184+
- Sexual harassment
185+
- Wage and hour violations
186+
- Wrongful termination
187+
188+
What specific employment issue are you dealing with?"""
189+
elif 'immigration' in lower_message:
190+
return """**Immigration Law Overview:**
191+
192+
Immigration law is complex and constantly changing:
193+
194+
1. **Visa Types**: Work, student, tourist, family-based
195+
2. **Green Cards**: Employment, family, diversity lottery
196+
3. **Citizenship**: Naturalization process and requirements
197+
4. **Deportation Defense**: Removal proceedings, appeals
198+
5. **Asylum**: Refugee status and protection
199+
200+
**Important Notes:**
201+
- Immigration law changes frequently
202+
- Deadlines are critical
203+
- Documentation is essential
204+
- Legal representation is highly recommended
205+
206+
What specific immigration matter do you need help with?"""
207+
elif 'criminal' in lower_message:
208+
return """**Criminal Defense Overview:**
209+
210+
If you're facing criminal charges, you have important rights:
211+
212+
1. **Right to Attorney**: You have the right to legal representation
213+
2. **Right to Remain Silent**: You don't have to incriminate yourself
214+
3. **Right to Trial**: You can contest charges in court
215+
4. **Presumption of Innocence**: You're innocent until proven guilty
216+
5. **Due Process**: Fair treatment under the law
217+
218+
**Immediate Actions:**
219+
- Don't speak to police without an attorney
220+
- Document everything related to your case
221+
- Gather evidence and witnesses
222+
- Consult with a criminal defense attorney immediately
223+
224+
What type of criminal charges are you facing?"""
153225
else:
154226
return f"Thank you for your legal question about '{message}'. While I can provide general legal information, remember that this isn't legal advice. Your situation may have unique factors that require personalized guidance from a licensed attorney familiar with your jurisdiction's laws. Would you like me to explain some general principles related to this issue?"
155227

@@ -160,6 +232,30 @@ def route_to_agent(message):
160232
"""Route message to appropriate AI agent"""
161233
lower_message = message.lower().strip()
162234

235+
# Intellectual Property keywords
236+
if any(keyword in lower_message for keyword in ['copyright', 'trademark', 'patent', 'intellectual property', 'ip', 'infringement', 'plagiarism']):
237+
return 'intellectual_property'
238+
239+
# Employment keywords
240+
if any(keyword in lower_message for keyword in ['employment', 'employee', 'hiring', 'firing', 'workplace', 'discrimination', 'harassment']):
241+
return 'employment'
242+
243+
# Real Estate keywords
244+
if any(keyword in lower_message for keyword in ['real estate', 'property', 'landlord', 'tenant', 'lease', 'rent', 'eviction', 'housing']):
245+
return 'real_estate'
246+
247+
# Criminal keywords
248+
if any(keyword in lower_message for keyword in ['criminal', 'arrest', 'charges', 'court', 'trial', 'sentencing', 'probation']):
249+
return 'criminal'
250+
251+
# Immigration keywords
252+
if any(keyword in lower_message for keyword in ['immigration', 'visa', 'green card', 'citizenship', 'deportation', 'asylum']):
253+
return 'immigration'
254+
255+
# Family keywords
256+
if any(keyword in lower_message for keyword in ['divorce', 'custody', 'child support', 'alimony', 'adoption', 'family law']):
257+
return 'family'
258+
163259
# Compliance keywords
164260
if any(keyword in lower_message for keyword in ['gdpr', 'compliance', 'privacy', 'data protection', 'regulation']):
165261
return 'compliance'

0 commit comments

Comments
 (0)