Semantic Kernel AI Gets Autonomous Agents

September 12, 2024

Semantic Kernel AI Gets Autonomous Agents

On August 1st, Microsoft’s Chris Rickman announced the addition of Enterprise Multi-agent support in Semantic Kernel, a significant step forward for AI development. This announcement is particularly encouraging for the future of Olympic33’s AI Framework, which is architected around Semantic Kernel at its core.

The Evolution of Semantic Kernel: From Components to Full Agents

Until now, developers could utilise components of Semantic Kernel to build agents using the chat completion model, capable of answering user questions and invoking plugins when needed. However, there was a missing piece — a first-class agent abstraction that could consolidate logic and simplify code while ensuring a standard way to interact with agents.

The introduction of the Agent Framework marks a shift toward a more streamlined and efficient multi-agent system. This framework simplifies the process of building multi-agent frameworks by enabling agents to coordinate with one another and interact with a standardised API. Currently, the Agent Framework is marked as experimental, but it comes with two out-of-the-box agents: the ChatCompletionAgent and the OpenAIAssistantAgent, based on the OpenAI Assistant API.

Getting Started: ChatCompletionAgent vs. OpenAIAssistantAgent

For most developers, the OpenAIAssistantAgent is the easiest entry point. It manages state automatically and provides several out-of-the-box tools, making it ideal for rapid development and deployment. The framework offers two modes for interacting with an agent: directly (no-chat) or via an AgentChat.

For those who prefer more control over the chat history or wish to use non-OpenAI models, the ChatCompletionAgent is the perfect alternative. Although it operates similarly to the OpenAI Assistants, developers need to provide their own chat history and supply a custom code interpreter.

An agent in this context can be thought of as an AI entity designed to perform a specific role. Multiple agents can collaborate to accomplish complex tasks. In Semantic Kernel, each agent can be equipped with plugins and functions that support its role.

Multi-Agent Orchestration: A Step Toward Efficiency

Early on, projects like AutoGen identified that multiple agents, each with different tools and system prompts, could outperform a single agent—similar to how diverse human teams leverage multiple perspectives and skills to achieve better outcomes. In a multi-agent system, once a single agent is created, it is possible to replicate it and have multiple agents collaborate.

Recent research has led to two distinct methods for orchestrating multiple agents: group chats and task-based business process flows.

1. Collaborating Within a Group Chat

Group chats involve several participants (multiple agents and/or humans) sharing a common chat history. This pattern mirrors human interactions on platforms like Microsoft Teams or WhatsApp and is excellent at preserving semantic information across multiple turns. For instance, if a user mentions a preference to agent A, agent B can access this information because they are part of the same conversation.

However, this method has its drawbacks. Agents might get stuck in loops conversing back and forth, leading to increased token usage, slowing down solutions, and escalating costs. Because of these challenges, another orchestration approach emerged.

Multiple Agents Interacting (source: Microsoft).

2. Providing Structure with Business Process Flows (Coming Soon)

Inspired by how humans handle complex business processes, this method focuses on structured task coordination rather than freeform chat. Instead of simply passing conversation state between agents, artifacts are routed among them, allowing for incremental work that builds on previous steps—much like how team members collaborate in a task management app.

Frameworks like Crew AI pioneered this pattern by incorporating it as a fundamental part of their structure. However, a significant limitation is that any information not included in an artifact is effectively lost.

The Best of Both Worlds: Combining Group Chats with Processes

Most of today's frameworks adopt either group chats or business process flows exclusively or merge them into a single approach. The Semantic Kernel team has recognised the benefits of treating these as distinct yet complementary concepts. Drawing inspiration from how humans use separate apps for chatting and task management, they plan to deliver preview versions of both patterns and demonstrate their interwoven potential.

In the meantime, the team has shared a .NET preview version of Group Chat orchestration, showcasing how these approaches can work together to create a more robust, versatile multi-agent system.

Conclusion

The addition of Enterprise Multi-agent support in Semantic Kernel is a promising development for developers and enterprises looking to leverage AI in more sophisticated and collaborative ways. By providing flexible, standardised, and powerful tools, the new Agent Framework makes it easier to create and manage multiple agents that can work together seamlessly, opening the door to more innovative AI-driven solutions.

O33 AI Solutions

Transform the way you operate with our advanced AI Framework and Semantic Kernel solutions.