{"id":29995468,"url":"https://github.com/nashtech-garage/ntg-agent","last_synced_at":"2026-03-04T00:32:34.983Z","repository":{"id":301294675,"uuid":"1007611990","full_name":"nashtech-garage/ntg-agent","owner":"nashtech-garage","description":"A sample Chatbot in C# using Semantic Kernel","archived":false,"fork":false,"pushed_at":"2025-08-02T05:12:01.000Z","size":1257,"stargazers_count":41,"open_issues_count":14,"forks_count":21,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-02T08:12:56.476Z","etag":null,"topics":["chatbot","csharp","generative-ai","kernel-memory","rag","semantic-kernel"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nashtech-garage.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-24T09:02:27.000Z","updated_at":"2025-07-31T22:43:19.000Z","dependencies_parsed_at":"2025-08-02T07:24:59.045Z","dependency_job_id":null,"html_url":"https://github.com/nashtech-garage/ntg-agent","commit_stats":null,"previous_names":["nashtech-garage/ntg-agent"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nashtech-garage/ntg-agent","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nashtech-garage%2Fntg-agent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nashtech-garage%2Fntg-agent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nashtech-garage%2Fntg-agent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nashtech-garage%2Fntg-agent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nashtech-garage","download_url":"https://codeload.github.com/nashtech-garage/ntg-agent/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nashtech-garage%2Fntg-agent/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268820432,"owners_count":24312380,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-04T02:00:09.867Z","response_time":79,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chatbot","csharp","generative-ai","kernel-memory","rag","semantic-kernel"],"created_at":"2025-08-05T01:40:44.685Z","updated_at":"2026-03-04T00:32:34.975Z","avatar_url":"https://github.com/nashtech-garage.png","language":"HTML","readme":"# NTG Agent\nThis project aims to practice building a chatbot in C#\n\n[![Build](https://github.com/nashtech-garage/ntg-agent/actions/workflows/ntg-agent-ci.yml/badge.svg)](https://github.com/nashtech-garage/ntg-agent/actions/workflows/ntg-agent-ci.yml)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=nashtech-garage_ntg-agent\u0026metric=alert_status)](https://sonarcloud.io/summary/new_code?id=nashtech-garage_ntg-agent)\n[![SonarCloud Coverage](https://sonarcloud.io/api/project_badges/measure?project=nashtech-garage_ntg-agent\u0026metric=coverage)](https://sonarcloud.io/summary/new_code?id=nashtech-garage_ntg-agent)\n[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=nashtech-garage_ntg-agent\u0026metric=security_rating)](https://sonarcloud.io/summary/new_code?id=nashtech-garage_ntg-agent)\n[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=nashtech-garage_ntg-agent\u0026metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=nashtech-garage_ntg-agent)\n\n\n## High level architecture\n\n![NTG Agent - High level architecture](ntg-agent-components.png)\n\n## Technologies and frameworks\n- .NET 10\n- .NET Aspire\n- Blazor\n- Microsoft Agent Framework\n- Kernel Memory\n- Support multiple LLMs: GitHub Models, Open AI, Azure Open AI etc.\n- SQL Server\n\n## Documentation\nDetails about the project can be referenced at DeepWiki: https://deepwiki.com/nashtech-garage/ntg-agent\n\n## Getting started\n\n- Setup [GitHub models](https://docs.github.com/en/github-models/use-github-models/prototyping-with-ai-models) (free): Create your Fine-grained personal access tokens in GitHub https://github.com/settings/personal-access-tokens. The token needs to have **models:read** permissions.\n- Update file secrets.json for the NTG.Agent.Knowledge with content below Or run the cli command `dotnet user-secrets set \"KernelMemory:Services:OpenAI:APIKey\" \"\u003cyour_token_here\u003e\"`. Read [this link](https://learn.microsoft.com/en-us/aspnet/core/security/app-secrets) if you don't know how to set the secrets\n\n\n```json\n{\n  \"KernelMemory\": {\n    \"Services\": {\n      \"OpenAI\": {\n        \"APIKey\": \"your GitHub token\"\n      }\n    }\n  }\n}\n```\n\n- In the NTG.Agent.MCP.Server project, add your Google SearchEngineId and ApiKey\nfollowing https://developers.google.com/custom-search/docs/tutorial/creatingcse in the secrets.json as below\n\n```json\n{\n    \"Google\": {\n      \"ApiKey\": \"\u003cyour google cse Api Key\u003e\",\n      \"SearchEngineId\": \"\u003cyour google cse Search EngineID\u003e\"\n    }\n}\n```\n\n- The default database connection string is `Server=.;Database=NTGAgent;Trusted_Connection=True;TrustServerCertificate=true;MultipleActiveResultSets=true` which connects to the local SQL server instance using Windows Authentication. If your environment is different, update the connection string in appsettings.Development.json files of three projects: NTG.Agent.Admin, NTG.Agent.Orchestrator, NTG.Agent.Knowledge\n\n- In the NTG.Agent.Admin project, open the terminal and run `dotnet ef database update`. Repeat the same for the NTG.Agent.Orchestrator project.\n\n- Run the NTG.Agent.AppHost, in the Aspire Dashboard you will see resource as below:\n  - NTG.Agent.WebClient is the website for end users\n  - NTG.Agent.Admin is the website for administrators. The default admin account is admin@ntgagent.com / Ntg@123\n  - NTG.Agent.Orchestrator is the backend API\n  - NTG.Agent.Knowledge is the service responsible for ingesting documents. It extracts the content of uploaded files, generates embeddings, and stores them in a vector database. It also provides an API to search for relevant documents\n\n- Open the NTG.Agent.Admin --\u003e Agent Management --\u003e Agent Default and update the Agent Provider with GitHub Model information that you created earlier. \n  - Provider Name: GitHub Model\n  - Provider Endpoint: https://models.github.ai/inference\n  - Provider API Key: Your GitHub token\n  - Model Name: openai/gpt-4.1 or other model that GitHub model supports\n\n## Using other LLM models\nNTG Agent supports multiple LLM model providers: GitHub Model, Azure Open AI, Google Gemini\n\n### Google Gemini\n\nSetup [Gemini API](https://aistudio.google.com/): Create your API key in Google AI Studio https://aistudio.google.com/api-keys\nThe Provider Endpoint: https://generativelanguage.googleapis.com/v1beta/\n\n## How authentication work\n\nTo get started easily, we use the shared cookies approach. In NTG.Agent.Admin, we add YARP as a BFF (Backend for Frontend), which forwards API requests to NTG.Agent.Orchestrator.\nCurrently, it only works for Blazor WebAssembly. Cookies are not included when the request is made from the server (Blazor).\n\n## Long Term Memory Configuration\n\nThe Long Term Memory (LTM) feature allows the chatbot to remember user-specific information across conversations. This feature can be controlled via configuration to manage token consumption:\n\n```json\n{\n  \"LongTermMemory\": {\n    \"Enabled\": true,\n    \"MinimumConfidenceThreshold\": 0.3,\n    \"MaxMemoriesToRetrieve\": 20\n  }\n}\n```\n\n- Set `Enabled: false` to disable memory extraction and retrieval, saving tokens\n- Adjust `MinimumConfidenceThreshold` to control quality of stored memories\n- Modify `MaxMemoriesToRetrieve` to balance context vs. token usage\n\n## Contributing\n\n- Give us a star\n- Reporting a bug\n- Participate discussions\n- Propose new features\n- Submit pull requests. If you are new to GitHub, consider to [learn how to contribute to a project through forking](https://docs.github.com/en/get-started/quickstart/contributing-to-projects)\n\nBy contributing, you agree that your contributions will be licensed under Apache-2.0 license. \n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnashtech-garage%2Fntg-agent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnashtech-garage%2Fntg-agent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnashtech-garage%2Fntg-agent/lists"}