An Overview of the Agent Architecture
Warning
The Semantic Kernel Agent Framework is in preview and is subject to change.
This article covers key concepts in the architecture of the Agent Framework, including foundational principles, design objectives, and strategic goals.
Goals
The Agent Framework was developed with the following key priorities in mind:
- The Semantic Kernel framework serves as the core foundation for implementing agent functionalities.
- Multiple agents can collaborate within a single conversation, while integrating human input.
- An agent can engage in and manage multiple concurrent conversations simultaneously.
- Different types of agents can participate in the same conversation, each contributing their unique capabilities.
Agent
The abstract Agent class serves as the core abstraction for all types of agents, providing a foundational structure that can be extended to create more specialized agents. One key subclass is Kernel Agent, which establishes a direct association with a Kernel object. This relationship forms the basis for more specific agent implementations, such as the Chat Completion Agent and the Open AI Assistant Agent, both of which leverage the Kernel's capabilities to execute their respective functions.
Agents are currently unavailable in Java.
Agents can either be invoked directly to perform tasks or orchestrated within an Agent Chat, where multiple agents may collaborate or interact dynamically with user inputs. This flexible structure allows agents to adapt to various conversational or task-driven scenarios, providing developers with robust tools for building intelligent, multi-agent systems.
Deep Dive:
Agent Chat
The Agent Chat class serves as the foundational component that enables agents of any type to engage in a specific conversation. This class provides the essential capabilities for managing agent interactions within a chat environment. Building on this, the Agent Group Chat class extends these capabilities by offering a stategy-based container, which allows multiple agents to collaborate across numerous interactions within the same conversation.
This structure facilitates more complex, multi-agent scenarios where different agents can work together, share information, and dynamically respond to evolving conversations, making it an ideal solution for advanced use cases such as customer support, multi-faceted task management, or collaborative problem-solving environments.
Deep Dive:
Agent Channel
The Agent Channel class enables agents of various types to participate in an Agent Chat. This functionality is completely hidden from users of the Agent Framework and only needs to be considered by developers creating a custom Agent.
Agents are currently unavailable in Java.
Agent Alignment with Semantic Kernel Features
The Agent Framework is built on the foundational concepts and features that many developers have come to know within the Semantic Kernel ecosystem. These core principles serve as the building blocks for the Agent Framework’s design. By leveraging the familiar structure and capabilities of the Semantic Kernel, the Agent Framework extends its functionality to enable more advanced, autonomous agent behaviors, while maintaining consistency with the broader Semantic Kernel architecture. This ensures a smooth transition for developers, allowing them to apply their existing knowledge to create intelligent, adaptable agents within the framework.
The Kernel
At the heart of the Semantic Kernel ecosystem is the Kernel, which serves as the core object that drives AI operations and interactions. To create any agent within this framework, a Kernel instance is required as it provides the foundational context and capabilities for the agent’s functionality. The Kernel acts as the engine for processing instructions, managing state, and invoking the necessary AI services that power the agent's behavior.
The Chat Completion Agent and Open AI Assistant Agent articles provide specific details on how to create each type of agent. These resources offer step-by-step instructions and highlight the key configurations needed to tailor the agents to different conversational or task-based applications, demonstrating how the Kernel enables dynamic and intelligent agent behaviors across diverse use cases.
Related API's:
Agents are currently unavailable in Java.
Plugins and Function Calling
Plugins are a fundamental aspect of the Semantic Kernel, enabling developers to integrate custom functionalities and extend the capabilities of an AI application. These plugins offer a flexible way to incorporate specialized features or business-specific logic into the core AI workflows. Additionally, agent capabilities within the framework can be significantly enhanced by utilizing Plugins and leveraging Function Calling. This allows agents to dynamically interact with external services or execute complex tasks, further expanding the scope and versatility of the AI system within diverse applications.
Example:
Related API's:
Agents are currently unavailable in Java.
Agent Messages
Agent messaging, including both input and response, is built upon the core content types of the Semantic Kernel, providing a unified structure for communication. This design choice simplifies the process of transitioning from traditional chat-completion patterns to more advanced agent-driven patterns in your application development. By leveraging familiar Semantic Kernel content types, developers can seamlessly integrate agent capabilities into their applications without needing to overhaul existing systems. This streamlining ensures that as you evolve from basic conversational AI to more autonomous, task-oriented agents, the underlying framework remains consistent, making development faster and more efficient.
Note: The Open AI Assistant Agent`_ introduced content types specific to its usage for File References and Content Annotation:
Related API's:
Agents are currently unavailable in Java.
Templating
An agent's role is primarily shaped by the instructions it receives, which dictate its behavior and actions. Similar to invoking a Kernel prompt, an agent's instructions can include templated parameters—both values and functions—that are dynamically substituted during execution. This enables flexible, context-aware responses, allowing the agent to adjust its output based on real-time input.
Additionally, an agent can be configured directly using a Prompt Template Configuration, providing developers with a structured and reusable way to define its behavior. This approach offers a powerful tool for standardizing and customizing agent instructions, ensuring consistency across various use cases while still maintaining dynamic adaptability.
Example:
Related API's:
Agents are currently unavailable in Java.
Chat Completion
The Chat Completion Agent is designed around any Semantic Kernel AI service, offering a flexible and convenient persona encapsulation that can be seamlessly integrated into a wide range of applications. This agent allows developers to easily bring conversational AI capabilities into their systems without having to deal with complex implementation details. It mirrors the features and patterns found in the underlying AI service, ensuring that all functionalities—such as natural language processing, dialogue management, and contextual understanding—are fully supported within the Chat Completion Agent, making it a powerful tool for building conversational interfaces.
Related API's:
Agents are currently unavailable in Java.