Open matthewbolanos opened 2 months ago
Agents are constructed to wrap Kernel instances rather than the Kernel being passed to operations on agents? Doesn't that go against the scheme that was set up for services?
We ended up choosing to go that route (wrap a kernel object instead of passing it during every operation) since this mimics the behavior we've seen from other agent frameworks. They create their agent once with the required AI service and necessary plugins. In our framework, that's equivalent to creating a kernel and binding it to an agent.
That being said... we also see patterns like the Assistants API that allows for both, i.e., defining the base model/plugins for an agent and also allowing overrides for individual invocations. I believe the latter will need to be added as an enhancement to our framework.
Looks like I created that issue here: https://github.com/microsoft/semantic-kernel/issues/6037
Note: Property injection (as opposed to constructor injection) might be an option that helps minimize bubbling constructor arguments.