How etendosoftware/com.etendoerp.copilot works
Main Components Identification
a) Frontend Layer:
• Web interface (React/TypeScript application in web/com.etendoerp.copilot.chat)
• Widget component for integration
b) Backend Core:
• REST API Service (FastAPI)
• Agent System
• Langchain Agent
• OpenAI Assistant Agent
• Core Services Layer
• Memory Management
• Tool Management
• Vector Database Integration
• Thread Context Handler
c) Tools System:
• Tool Wrapper Framework
• Tool Loader/Installer
• Custom Tools Implementation
d) Database Layer:
• Vector Databases
• Relational Database (for storing conversations, apps, tools, etc.)
[Frontend Layer]
• ↕
[API Gateway]
• ↕
[Core Services Layer]
• ↕
[Agent Layer]
• ↕
[Tools Layer]
• ↕
[Database Layer]
Component Relationships
a) Frontend to Backend:
• REST API calls
• WebSocket connections for real-time chat
b) Core Services Interactions:
• Agent orchestration
• Tool management
• Memory handling
• Vector store operations
c) Database Access Patterns:
• Vector DB for embeddings
• Relational DB for structured data
Implementation Details
[Frontend (React/TS)]
• ↓
[FastAPI Service]
• ↓
[Core Services]
• ThreadContext
• MemoryHandler
• ToolLoader
• VectorDB Utils
• ↓
[Agents]
• LangChain Agent
• OpenAI Assistant Agent
• ↓
[Tool System]
• ToolWrapper
• Custom Tools
• ↓
[Storage]
• Vector DBs
• Relational DB
Additional Elements
Supporting components:
• Environment configuration
• Docker container boundaries
• External service integrations (OpenAI, etc.)
• Security layers (JWT authentication)