Building a multi-agent system with Semantic Kernel
In this article, Geekodon presents a practical demo of an agentic AI system built using Semantic Kernel, highlighting key components and workflow strategies. The demo showcases an architecture where three main agents—Planner, Reviewer, and Executor—work collaboratively to process and execute user requests.
System Overview
- Planner: Analyzes the user’s input and formulates an action plan.
- Reviewer: Evaluates the Planner’s proposed tasks and provides feedback for refinement.
- Executor: Implements the step-by-step actions, relying on user approval before each step, modeled with a Copilot-style interface.
This agentic approach emphasizes a human-in-the-loop workflow, where users remain involved throughout the process by approving planned actions before execution, fostering transparency and trust in automated systems.
Implementation Details
Geekodon outlines the implementation steps:
- Semantic Kernel Initialization:
- Build the core kernel and register necessary services in
AgentService.cs: Init
.
- Build the core kernel and register necessary services in
- Agent Creation:
- Use the
ChatCompletionAgent
class to instantiate agents, detailed inAgentService.cs: CreateAgent
.
- Use the
- Plugin Integration:
- Enhance the Executor agent with tools and plugins, configured via
AgentService.cs: Init
.
- Enhance the Executor agent with tools and plugins, configured via
- Process Steps Specification:
- Define granular steps for each agent in
AiProcessSteps.cs
.
- Define granular steps for each agent in
- Process Flow Design:
- Structure data transfers between Planner, Reviewer, and Executor so feedback loops are enabled (
AgentService.cs: InitProcess
).
- Structure data transfers between Planner, Reviewer, and Executor so feedback loops are enabled (
- Human-in-the-Loop Integration:
- Add user proxy steps and set up communication with an external client, creating a message channel (
AgentService.cs: ExternalClient
). - Ensure messages flow to the process runner (
AgentService.cs: StartNewTaskProcessAsync
).
- Add user proxy steps and set up communication with an external client, creating a message channel (
Copilot-Style User Experience
A unique characteristic of this system is its Copilot-style user interface, ensuring users can monitor and guide each AI-generated step. This design optimizes reliability and user control, aligning agentic systems with practical deployment needs.
Conclusion
Geekodon’s demonstration serves as a guide for developers interested in building agentic, transparent, and user-centered AI assistants using Semantic Kernel. The full code and further discussion can be accessed via the provided links.
This post appeared first on Reddit DotNet. Read the entire article here