.NET Agent Framework: Expose an agent via OpenAI Chat Completions + Ollama
Authorised Territory demonstrates how to expose a .NET AI agent through an OpenAI-compatible HTTP endpoint using the Chat Completions API protocol, built with an ASP.NET Core Empty project in Visual Studio 2026 and tested via an HTTP request file, with the agent running against a local Ollama model (gpt-oss).
Overview
What the video builds
- An ASP.NET Core Empty web project that exposes a .NET AI agent over HTTP.
- An OpenAI-compatible endpoint that follows the Chat Completions API protocol.
Local model runtime
- The agent is configured to use Ollama as the local model runtime.
- The model referenced is gpt-oss.
Tooling and testing approach
- Project creation is shown in Visual Studio 2026.
- Requests are tested using an HTTP request in an
.httpfile (sending HTTP calls directly to the endpoint).