semantic-kernel icon indicating copy to clipboard operation
semantic-kernel copied to clipboard

Semantic Kernel split task into multiple agents

Open vikramarigelaRepo opened this issue 9 months ago • 3 comments

Hi, i am designing solution for a Well architected framework reviewer with following agents.

  • Input agent - parse user input like architecture diagram / bicep template / Terraform template
  • Parsing agent - anaylse the input diagram/IAC code
  • Evaluation Agent - Evaluates Arch diagram against each WAF Pillar using LLM grounded with WAF PDFs
  • Recommendation Agent - suggests Improvements with azure-native services.
  • Report Generator Agent - creates WAF Report with scores risks and recommendations.

I'll be orchestrating the agents using group chat feature . Now the problem is with Evaluation agent where i have to evaluate input diagram against each waf pillar. and i want to split evaluation task internally into separate agent to evaluate each waf pillar . how can i achieve this using semantic kernel. please suggest

vikramarigelaRepo avatar May 12 '25 10:05 vikramarigelaRepo

We recommend using Process Framework for this scenario and specifically step4 of agent orchestration: https://github.com/microsoft/semantic-kernel/tree/main/dotnet/samples/GettingStartedWithProcesses

sophialagerkranspandey avatar May 12 '25 23:05 sophialagerkranspandey

@sophialagerkranspandey Thankyou for the suggestion. I'll take a look at the link you shared above. Cant we achieve this using agentic framework . I was thinking to use plugins for tasks inside evaulation agent . Is it right way to implement?

vikramarigelaRepo avatar May 13 '25 06:05 vikramarigelaRepo

@vikramarigelaRepo, you can use the agent framework, yes, but you'll be relying on the model to choose the right agent, the correct order of agents, etc. It's not always possible/reliable to prompt engineer your way through this. If you need the same, repeatable structure then this is where the process framework comes in.

moonbox3 avatar May 15 '25 02:05 moonbox3

@sophialagerkranspandey / @moonbox3 I was having a similar question here and created https://github.com/microsoft/semantic-kernel/discussions/12270 because for me, too, it is not entirely clear what framework to use when. There seems to be some overlap in where they can be applied.

Could you please help giving some insight there?

hansmbakker avatar May 26 '25 14:05 hansmbakker

Hi @hansmbakker,

Sure, let's break this down a bit more.

  • Agent Framework: the agent framework in Semantic Kernel is designed for scenarios where you want one or more agents to autonomously solve a task or answer a query, with flexibility in how the task is accomplished. Agents can be coordinated through orchestration patterns, such as sequential, concurrent, group chat, handoff, or Magentic orchestration, which allow you to define specific collaboration and message-passing logic among agents. These orchestrations provide structure to agent interactions, ranging from simple pipelines to dynamic, manager-driven conversations. However, the agents themselves make decisions about tool use, message composition, and conversation flow within the bounds of the orchestration, so the solution path may adapt at runtime.

    • Orchestration pattern docs: https://learn.microsoft.com/en-us/semantic-kernel/frameworks/agent/agent-orchestration/?pivots=programming-language-python
  • Process Framework: the process framework is intended for cases where the workflow must follow an explicit, repeatable sequence of steps. Each step, transition, and branching point is defined ahead of time, and the system enforces this order strictly for every execution. This approach guarantees predictability, auditability, and robust state management. If needed, you can embed agent orchestration as a subprocess within a given step, but the overall process remains governed by a fixed structure that is consistent across every run.

    • Process framework docs: https://learn.microsoft.com/en-us/semantic-kernel/frameworks/process/process-framework

Key Distinction:

The agent framework gives you flexible orchestration patterns and agent collaboration, which can allow for adaptive and context-sensitive solutions, but agents retain autonomy over how subtasks are performed within the orchestration logic you define. The process framework, in contrast, enforces a deterministic, pre-defined flow where each step is strictly ordered, making it ideal for scenarios that require repeatable, auditable execution paths.

moonbox3 avatar May 27 '25 01:05 moonbox3