Dependency Injection of Agents and Plugins #11444
-
I am following adding plugins to specific agents using this - https://learn.microsoft.com/en-us/semantic-kernel/frameworks/agent/agent-functions?pivots=programming-language-csharp#adding-plugins-to-an-agent What is the right way to inject this using DI. In general, I would love to see recommendations to inject "Kernel" into an aspnet core API. Should we choose Singleton or Transient for best performance. Any inputs on pros/cons?
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Please see step 6 here: https://github.com/microsoft/semantic-kernel/blob/main/dotnet/samples/GettingStartedWithAgents/Step06_DependencyInjection.cs for an example of Dependency Injection. |
Beta Was this translation helpful? Give feedback.
Please see step 6 here: https://github.com/microsoft/semantic-kernel/blob/main/dotnet/samples/GettingStartedWithAgents/Step06_DependencyInjection.cs for an example of Dependency Injection.