How saiabhiramdevarakonda-dot/chatapp works
This is a multi-part agentic AI chat application: an Angular chat UI fronts Node backends that generate answers, retrieve knowledge, or invoke tools for customer, order, and weather tasks. The main agent workflow is represented by the documented frontend/backend architecture and the sampled agent controller’s calls to an LLM and MCP client. The repository also contains a separate RAG chat backend and a tool-calling backend. Several route-to-controller and tool-to-service connections are not shown because their wiring was not sampled.
Main entry points: mcpServer.ts MCP server · agent.controller.ts Agent controller · gemini.service.ts Gemini service · chatRouter.js RAG chat API
Components 23
Chat frontend
- Angular chat UI
technyks-chat-app/src/app/chat/chat.ts - Chat service
technyks-chat-app/src/app/services/chat/chat.service.ts
Agent backend
- Agent controller
agentic-app-backend/src/controllers/agent.controller.ts - Gemini service
agentic-app-backend/src/services/gemini.service.ts - OpenAI service
agentic-app-backend/src/services/openai.service.ts - MCP client
agentic-app-backend/src/mcp/client/mcp-client.service.ts - MCP server endpoint
agentic-app-backend/src/controllers/mcp-server.controller.ts - MCP server
agentic-app-backend/src/mcp/server/mcpServer.ts
Business tools
- Customer tool
agentic-app-backend/src/mcp/server/tools/customer.tool.ts - Order tool
agentic-app-backend/src/mcp/server/tools/order.tool.ts - Weather tool
agentic-app-backend/src/mcp/server/tools/weather.tool.ts - Customer service
agentic-app-backend/src/services/customer.service.ts - Order service
agentic-app-backend/src/services/order.service.ts - MongoDB
agentic-app-backend/src/config/mongodb.ts
Knowledge retrieval
- RAG tool
agentic-app-backend/src/mcp/server/tools/rag.tool.ts - RAG engine
agentic-app-backend/src/rag/ragEngine.ts - Vector store
agentic-app-backend/src/rag/vectorStore/vector.store.ts - Vector database
agentic-app-backend/src/rag/vectorStore/dbs/chroma.db.ts
Other backends
- Tool-calling chat
tool_calling/src/controllers/chat.controller.ts - RAG chat API
chat-app-backend/src/chatRouter.js - RAG provider
chat-app-backend/src/rag.js - Embedding cache
chat-app-backend/src/embeddingCache.js
Other components
- User
Connections 23
- User → Angular chat UI: sends prompts
- Angular chat UI → Chat service: submits chat
- Chat service → Agent controller: calls backend
- Agent controller → MCP client: initializes client
- Agent controller → Gemini service: selects model
- Agent controller → OpenAI service: selects model
- MCP server endpoint → MCP server: connects transport
- MCP server → Customer tool: registers tools
- MCP server → Order tool: registers tools
- MCP server → Weather tool: registers tools
- MCP server → RAG tool: registers tools
- Customer tool → Customer service: uses service
- Order tool → Order service: uses service
- Customer service → MongoDB: persists data
- Order service → MongoDB: persists data
- RAG tool → RAG engine: searches context
- RAG engine → Gemini service: creates embeddings
- RAG engine → Vector store: searches vectors
- Vector store → Vector database: queries store
- Tool-calling chat → Gemini service: selects provider
- RAG chat API → RAG provider: prepares prompt
- RAG chat API → Embedding cache: reads vectors
- RAG chat API → Gemini service: generates answer