{"id":21530669,"url":"https://github.com/mongodb-developer/foodagent-dotnet","last_synced_at":"2026-04-19T14:34:12.946Z","repository":{"id":264195719,"uuid":"891595266","full_name":"mongodb-developer/foodagent-dotnet","owner":"mongodb-developer","description":"A demo of AI Agents using Semantic Kernel, C#, OpenAI and MongoDB Atlas","archived":false,"fork":false,"pushed_at":"2025-01-20T16:36:29.000Z","size":27,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-20T17:41:22.043Z","etag":null,"topics":["ai-ml","csharp","dev-center","dotnet","mongodb","semantic-kernel","vector-search"],"latest_commit_sha":null,"homepage":"","language":"C#","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/mongodb-developer.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}},"created_at":"2024-11-20T15:58:17.000Z","updated_at":"2025-01-20T16:36:31.000Z","dependencies_parsed_at":"2024-11-22T15:47:12.259Z","dependency_job_id":null,"html_url":"https://github.com/mongodb-developer/foodagent-dotnet","commit_stats":null,"previous_names":["mongodb-developer/foodagent-dotnet"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongodb-developer%2Ffoodagent-dotnet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongodb-developer%2Ffoodagent-dotnet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongodb-developer%2Ffoodagent-dotnet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongodb-developer%2Ffoodagent-dotnet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mongodb-developer","download_url":"https://codeload.github.com/mongodb-developer/foodagent-dotnet/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244094266,"owners_count":20397020,"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","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":["ai-ml","csharp","dev-center","dotnet","mongodb","semantic-kernel","vector-search"],"created_at":"2024-11-24T02:09:36.410Z","updated_at":"2025-10-03T12:59:42.062Z","avatar_url":"https://github.com/mongodb-developer.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Food AI Agent with Semantic Kernel and C#, OpenAI and MongoDB Atlas\n\nThis repo is a sample console application in .NET, showing how to use Semantic Kernel, OpenAI and MongoDB Atlas to create a simple AI Agent for querying missing ingredients to make a recipe, followed by the recpie, another recpie or a recommended restaurant to visit instead.\n\n## Prerequisites\nYou will need a few things to run this locally:\n1. OpenAI account and API Key\n2. MongoDB Atlas cluster with sample dataset loaded (the free forever M0 tier is adequate)\n3. MongoDB Atlas Connection String\n\nYou will need to add these keys to your environment variables to run the application.\n\nE.G:\n```bash\nexport OPENAI_API_KEY=\"\u003cYOUR OPEN AI API KEY\u003e\"\n```\n\n## Things to know\n\nThe sample data available from MongoDB for restaurants does not have a field for embeddings yet. Thankfully, Semantic Kernel is able to generate embeddings for us using OpenAI. In ```Program.cs``` you will find a method called ```GenerateEmbeddingsForCuisine()```.\nThis needs to be called just ONCE, the first time you run the application. This will go ahead and fetch documents (currently set to 1000 documents) from the sample_restaurants database, restaurants collection, generate the embeddings and then save them in a collection called *embedded_cuisines* in the format that Semantic Kernel can work with.\n\n## Running the application\n\n1. Ensure you have added the required environment variables\n2. Run ```dotnet build``` using the DotNET SDK or inside an IDE such as Visual Studio.\n3. Run ```dotnet run``` to run the application.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmongodb-developer%2Ffoodagent-dotnet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmongodb-developer%2Ffoodagent-dotnet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmongodb-developer%2Ffoodagent-dotnet/lists"}