February 28th, 2025

Release the Agents! SK Agents Framework RC1

Shawn Henry
GPM - Semantic Kernel
Semantic Kernel Agent Framework Reaches Release Candidate 1

We’re excited to announce that with the release of Semantic Kernel 1.40 (.NET) and 1.22.0 (Python), we’re elevating the Semantic Kernel Agent Framework to Release Candidate 1. This marks a significant milestone in our journey toward providing a robust, versatile framework for building AI agents for enterprise applications.

Code Sample: Creating a Chat Agent with tool plugins
Creating an agent with Semantic Kernel is easy! Let’s look at a simple Python example that demonstrates how to create a chat completion agent that answers questions about a menu using Semantic Kernel plugins:
pip install semantic-kernel
# Define a sample plugin for the menu
class MenuPlugin:
    """A sample Menu Plugin used for the concept sample."""
    @kernel_function(description="Provides a list of specials from the menu.")
    def get_specials(self) -> Annotated[str, "Returns the specials from the menu."]:
        return """
        Special Soup: Clam Chowder
        Special Salad: Cobb Salad
        Special Drink: Chai Tea
        """
    @kernel_function(description="Provides the price of the requested menu item.")
    def get_item_price(
        self, menu_item: Annotated[str, "The name of the menu item."]
    ) -> Annotated[str, "Returns the price of the menu item."]:
        return "$9.99"

async def main():
    agent = ChatCompletionAgent(
        service=OpenAzureAIChatCompletion(),
        name="HostAgent",
        instructions="Answer questions about the menu.",
        plugins=[MenuPlugin()],
    )
    chat_history = ChatHistory()
    chat_history.add_user_message("What is the special soup and how much does it cost?")
    response = await agent.get_response(chat_history)
    print(f"# {response.name}: {response.content}")
You can see this full sample here: Chat Completion Agent with Plugins.
The same functionality is available in C# with equally clean syntax:
dotnet add package Microsoft.SemanticKernel
dotnet add package Microsoft.SemanticKernel.Agents.core
dotnet add package Microsoft.SemanticKernel.core
dotnet add package Microsoft.SemanticKernel.Connectors.AzureOpenAI
var builder = Kernel.CreateBuilder();
builder.AddAzureOpenAIChatCompletion(
                Env.GetString("OPENAI_CHAT_MODEL_ID"),
                Env.GetString("OPENAI_API_KEY"));
var kernel = builder.Build();

ChatCompletionAgent agent = new()
{
    Instructions = "Answer questions about the menu.",
    Name = "HostAgent",
    Kernel = kernel,
    Arguments = new KernelArguments(new PromptExecutionSettings() {
        FunctionChoiceBehavior = FunctionChoiceBehavior.Auto()
    }),
};

agent.Kernel.Plugins.Add(KernelPluginFactory.CreateFromType<MenuPlugin>());

ChatHistory chat = [];
ChatMessageContent message = new(AuthorRole.User, "What is the special soup and how much does it cost?");
chat.Add(message);

await foreach (ChatMessageContent response in agent.InvokeAsync(chat))
{
    chat.Add(response);
    Console.WriteLine(response.Content);
    // Output: # Host: The special soup is Clam Chowder for $9.99.
}

You can see this full sample here: Chat Completion Agent with Plugins.

Multi-Provider Agent Support
In addition to this important milestone, we’re previewing expanded agent provider capabilities. Semantic Kernel now supports agents from:
This multi-provider approach gives developers the most flexibility in choosing the right AI service for their specific use cases while maintaining a consistent development experience.
For example to use Azure AI Agents, when you create you agent simply use the appropriate provider class and agent definition:
agent = AzureAIAgent(
    client=client,
    definition=agent_definition,
)
… and service-backed thread
thread = await client.agents.create_thread()

… and the rest is the same!

What’s Next?

This Release Candidate represents a significant step forward in our commitment to providing a unified framework for AI agent development. We know that building a stable API is important for developing and deploying applications at scale.

We encourage you to try out these new capabilities and let us know what you think. Your input is invaluable as we work toward a full release in the coming weeks.

For more information, check out our documentation and examples on GitHub, and join the conversation in our community channels.

Next up, the team is focusing on integration with AutoGen to build amazing multi-agent systems! Stay tuned for more updates as we continue to evolve the Semantic Kernel Agent Framework.

Author

Shawn Henry
GPM - Semantic Kernel

0 comments