AI Without the Rewrite: Injecting LLM Power into .NET via Python Sidecar Microservices

Mateus Yonathan, Bobi Sukmo Hatmaji · HAL (Le Centre pour la Communication Scientifique Directe) · 2025

This paper presents a practical solution for integrating AI capabilities into existing .NET Core 8 applications through Python sidecar microservices. The approach addresses the challenge of adding AI functionality to enterprise systems where cloud APIs are prohibited due to regulatory requirements, data residency concerns, or security policies. The architecture introduces a Python-based sidecar microservice that handles AI inference tasks using locally deployed language models, alongside a language-agnostic communication protocol called the Model Context Protocol (MCP) for standardized .NET-Python interaction. This enables zero-code-change integration that preserves existing .NET application logic while adding AI capabilities like fraud detection, customer intent analysis, and automated document processing. The solution is designed for on-premise deployment where all processing occurs within internal networks, maintaining data residency and compliance requirements. The paper provides a system model formalizing communication patterns, mathematical formulations for performance optimization, evaluation frameworks for measuring effectiveness, and governance considerations for enterprise deployment. This work addresses the practical challenge of modernizing legacy .NET applications with AI capabilities through a microservices approach that minimizes disruption and maximizes maintainability in regulated environments where external AI dependencies are prohibited.

Read the paper · More papers on PaperTik