A proof-of-concept chat bot API powered by Microsoft Semantic Kernel with persistent chat history and document memory capabilities.
- Semantic Kernel Integration: Utilizes Microsoft Semantic Kernel for AI-powered conversations
- Persistent Chat History: SQLite database storage for chat sessions and messages
- Document Memory: Kernel Memory integration for document context and retrieval
- RESTful API: Clean API endpoints for chat operations
- Swagger Documentation: Built-in API documentation and testing interface
- .NET 9.0: Latest .NET framework
- ASP.NET Core: Web API framework
- Entity Framework Core: Database ORM with SQLite
- Microsoft Semantic Kernel: AI orchestration framework
- Kernel Memory: Document processing and retrieval
- Swagger/OpenAPI: API documentation
GET /api/chathistory- Retrieve chat historyPOST /api/chathistory- Create new chat messages
GET /api/documents- List available documentsPOST /api/documents- Upload and process documents
GET /api/memory- Query memory storePOST /api/memory- Add content to memory
GET /api/config- Get system configuration
- .NET 9.0 SDK
- OpenAI API key (for Semantic Kernel)
-
Clone the repository
git clone <repository-url> cd Semantic-Kernel-POC
-
Configure settings Create
appsettings.Development.json:{ "OpenAI": { "ApiKey": "your-openai-api-key", "ModelId": "gpt-4" }, "SemanticKernel": { "ServiceType": "OpenAI" }, "Database": { "ConnectionString": "Data Source=chatbot.db" } } -
Run the application
dotnet run
-
Access Swagger UI Navigate to
https://localhost:5001/swaggerto explore the API
├── Controllers/ # API controllers
│ ├── ChatHistoryController.cs
│ ├── ConfigController.cs
│ ├── DocumentsController.cs
│ └── MemoryController.cs
├── Data/ # Database context
├── Models/ # Data models and configurations
├── Services/ # Business logic services
├── Documents/ # Sample documents
└── Program.cs # Application entry point
ApiKey: Your OpenAI API keyModelId: AI model to use (e.g., "gpt-4", "gpt-3.5-turbo")
ConnectionString: SQLite database connection string
ServiceType: AI service provider ("OpenAI")
This project follows strict development workflows defined in CLAUDE.md:
- Design-first approach avoiding over-engineering
- Task-driven development with TODO tracking
- One task at a time execution
- Comprehensive testing and cleanup procedures
The Documents/ folder contains sample text files that can be used to test document processing and memory features.
- Follow the workflow rules in
CLAUDE.md - Create feature branches using format:
feature/task{number}-{description} - Make meaningful commits for each step
- Ensure all tests pass before submitting PRs
This is a proof-of-concept project for educational and demonstration purposes.