Use DI with AI Agent class based skills in .NET Agent Framework
Authorised Territory demonstrates how to use dependency injection with class-based skills in the .NET Agent Framework, showing how an AgentSkillResource function can resolve services via DI instead of instantiating them with new, while the agent runs a local LLM using Ollama.
Overview
The video walks through applying dependency injection (DI) to class-based skills in the .NET Agent Framework.
Key points covered:
- Using DI to obtain a service inside an
AgentSkillResourcefunction rather than creating instances directly withnew. - Running the agent against a locally hosted LLM using Ollama.
- Reference to the starting solution created in an earlier video: https://youtu.be/9B1WNIjKNDU