How nashtech-garage/ntg-agent works
NTG Agent is a multi-UI chatbot platform: users select an agent, send prompts, and receive model responses, with document knowledge and interactive tools extending chat. The repository also includes agent/provider administration, skills, sharing, token tracking, and anonymous access. The README documents the deployed services and LightRAG’s per-agent containers; sampled source confirms container reconciliation and ingestion-status polling. Many runtime controllers and UI components are present in the tree but were not sampled, so uncertain request-flow links are omitted or marked unverified.
Main entry points: AgentFactory.cs Agent factory · Program.cs Aspire host · AgentAdminController.cs Agent administration · NTG.Agent.WebClient Blazor chat
Components 23
Chat experience
- Blazor chat
src/NTG.Agent.WebClient/NTG.Agent.WebClient - CopilotKit chat
src/NTG.Agent.CopilotKitApp - Chat endpoints
src/NTG.Agent.Orchestrator/Controllers/ConversationsController.cs - Conversation state
src/NTG.Agent.WebClient/NTG.Agent.WebClient.Client/States/ConversationState.cs - Conversation sharing
src/NTG.Agent.Orchestrator/Controllers/SharedConversationsController.cs
Agent runtime
- Agent configuration
src/NTG.Agent.Orchestrator/Models/Agents/Agent.cs - Agent factory
src/NTG.Agent.Orchestrator/Services/Agents/AgentFactory.cs - LLM providers
src/NTG.Agent.Orchestrator/Models/Agents/Provider.cs - AI tools
src/NTG.Agent.AITools/NTG.Agent.AITools.SearchOnlineTool/SearchOnlineTool.cs - MCP tools
src/NTG.Agent.MCP.Server/McpTools/WeatherTools.cs - Token tracking
src/NTG.Agent.Orchestrator/Services/TokenTracking/TokenTrackingService.cs
Knowledge and skills
- Document handling
src/NTG.Agent.Orchestrator/Controllers/DocumentsController.cs - Knowledge service
src/NTG.Agent.LightRag/LightRagKnowledge.cs - Per-agent RAG
src/NTG.Agent.LightRag/LightRagContainerManager.cs - Ingestion status
src/NTG.Agent.LightRag/BackgroundServices/LightRagIngestionStatusHostedService.cs - Skills registry
src/NTG.Agent.Orchestrator/Services/Skills/SkillRegistry.cs
Administration
- Agent administration
src/NTG.Agent.Orchestrator/Controllers/AgentAdminController.cs - Admin dashboard
src/NTG.Agent.Admin/NTG.Agent.Admin
Platform services
- Agent database
src/NTG.Agent.Orchestrator/Data/AgentDbContext.cs - Aspire host
src/NTG.Agent.AppHost/Program.cs
Other components
- User
- LLM provider
- SQL Server
Connections 25
- User → Blazor chat: chats in
README.md - User → CopilotKit chat: chats in
README.md - Blazor chat → Chat endpoints: sends prompts
- CopilotKit chat → Chat endpoints: requests chat
- Blazor chat → Conversation state: maintains state
- Chat endpoints → Agent factory: runs agent
- Agent administration → Agent configuration: configures
src/NTG.Agent.Orchestrator/Controllers/AgentAdminController.cs - Agent administration → Per-agent RAG: provisions
src/NTG.Agent.Orchestrator/Controllers/AgentAdminController.cs - Agent factory → LLM providers: uses provider
- Agent factory → LLM provider: generates with
- Agent factory → AI tools: offers tools
- Agent factory → Skills registry: loads skills
- Document handling → Knowledge service: stores knowledge
- Knowledge service → Per-agent RAG: queries
- Ingestion status → Knowledge service: checks status
src/NTG.Agent.LightRag/BackgroundServices/LightRagIngestionStatusHostedService.cs - Ingestion status → Agent database: updates status
src/NTG.Agent.LightRag/BackgroundServices/LightRagIngestionStatusHostedService.cs - Agent administration → Agent database: persists agents
src/NTG.Agent.Orchestrator/Controllers/AgentAdminController.cs - Admin dashboard → Agent administration: manages agents
- Conversation sharing → Agent database: stores shares
- Token tracking → Agent database: records usage
- Aspire host → SQL Server: starts database
README.md - Aspire host → Admin dashboard: launches
README.md - Aspire host → Blazor chat: launches
README.md - Aspire host → CopilotKit chat: launches
README.md - MCP tools → LLM provider: provides tools