(C# ASP.NET Core) Creating a Tic-Tac-Toe with an AI Agent using SemanticKernel API

This project leverages Agentic AI to guide the Agent in playing tic-tac-toe with the logged-in user. The user follows AI Chat-assisted steps to complete the login process. Watch the video below for more details.
(Rev. 16-Sep-2025)

Categories | About |     |  

Parveen,

Source Code of the Project here ↓

Please visit this page for projects - Source code here

About this Project

This ASP.NET Core project uses Semantic Kernel to instruct an AI Model to play a live tic-tac-toe game with a user.

Yaml Instructions for the AI Agent

Following instructions are given to the AI Agent:

The Javascript for the Tic-Tac-Toe in this project.

Following is the javascript for the project.

Video Explanation (see it happen!)

Please watch the following youtube video:

Codebehind File for Index.cshtml.cs

Following is the code-behind file for the project.

Please visit this page for projects - Completed Project Source code here

API Keys can be had for Free

Please watch the following youtube video:

The above video explains how to get apiKey, modelId and endpoint.

MUST GIVE readonly PERMISSION TO MODEL AS EXPLAINED IN THE VIDEO.

The interface in the video might change with time but the concept is expected to remain same.

IMPORTANT: I have used Azure AIInference because of free keys. For other options please refer -> Chat completion with MSDN Semantic Kernel Setup documentation (read the whole page)

Markup File for Index.cshtml

Following is the cshtml file of the tic-tac-toe page.

Please visit this page for source code - Completed Project Source code here

ASPNET Core Projects

Please visit this page for projects - Source code here


This Blog Post/Article "(C# ASP.NET Core) Creating a Tic-Tac-Toe with an AI Agent using SemanticKernel API" by Parveen is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.