Skip to content

refactor(integration): split integrations_frontend_api.py into modular routers

zakariae yahya a demandé de fusionner feature/accounts-folders vers develop

feat(memory): Add multi-channel memory support for internal and external users

Description

Summary

  • Add dedicated memory endpoints for internal platform and external channels (Slack, Teams, Telegram)
  • Externalize Pydantic schemas to maintain code organization
  • Support multi-agent memory isolation

Changes

New Files

  • Integration/schemas/memory.py - Memory response schemas
  • Integration/routers/memory.py - Memory service endpoints

Modified Files

  • Integration/schemas/__init__.py - Export new schemas
  • Integration/services/langchain_memory_service.py - Add internal/external methods
  • Integration/services/conversation_service.py - Add external chat lookup

Endpoints Added

Method Path Description
GET /chat/conversations/{id}/memory/internal Internal platform memory
GET /chat/conversations/{id}/memory/external External channel memory

Headers

Internal Memory:

  • x-user-uuid (required): User UUID from IAVIA platform
  • x-agent-id (required): Agent identifier

External Memory:

  • x-chat-id (required): External chat identifier (Slack user ID, Telegram chat ID)
  • x-channel (required): Channel type (SLACK, TEAMS, TELEGRAM, WHATSAPP)
  • x-agent-id (required): Agent identifier

Git Add Files

git add Integration/schemas/memory.py                                                                                                                                             
git add Integration/schemas/__init__.py                                                                                                                                           
git add Integration/routers/memory.py                                                                                                                                             
git add Integration/routers/__init__.py                                                                                                                                           
git add Integration/services/langchain_memory_service.py                                                                                                                          
git add Integration/services/conversation_service.py                                                                                                                              
                                                                                                                                                                                  
Test Plan                                                                                                                                                                         
                                                                                                                                                                                  
- Test internal memory with userUuid header                                                                                                                                       
- Test external memory with chatId + channel headers                                                                                                                              
- Verify agent isolation (ADAN, ALADIN, ANIR)                                                                                                                                     
- Test window_size parameter (1-100)
Modification effectuée par zakariae yahya

Rapports de requête de fusion