Semantic Kernel is an SDK that integrates Large Language Models (LLMs) like OpenAI, Azure OpenAI, and Hugging Face with conventional programming languages like C#, Python, and Java. Semantic Kernel achieves this by allowing you to define plugins that can be chained together in just a few lines of code.
What makes Semantic Kernel special, however, is its ability to automatically orchestrate plugins with AI. With Semantic Kernel planners, you can ask an LLM to generate a plan that achieves a user's unique goal. Afterwards, Semantic Kernel will execute the plan for the user.
The Semantic Kernel SDK is available in C#, Python, and Java. To get started, choose your preferred language below. See the Feature Matrix to see a breakdown of feature parity between our currently supported languages.
The quickest way to get started with the basics is to get an API key from either OpenAI or Azure OpenAI and to run one of the C#, Python, and Java console applications/scripts below.
python -m pip install semantic-kernel.
.env file as described here.
git clone -b experimental-java https://github.com/microsoft/semantic-kernel.git
The fastest way to learn how to use Semantic Kernel is with our C# and Python Jupyter notebooks. These notebooks demonstrate how to use Semantic Kernel with code snippets that you can run with a push of a button.
Once you've finished the getting started notebooks, you can then check out the main walkthroughs on our Learn site. Each sample comes with a completed C# and Python project that you can run locally.
Finally, refer to our API references for more details on the C# and Python APIs:
If you're interested in seeing a full end-to-end example of how to use Semantic Kernel, check out our Chat Copilot reference application. Chat Copilot is a chatbot that demonstrates the power of Semantic Kernel. By combining plugins, planners, and personas, we demonstrate how you can build a chatbot that can maintain long-running conversations with users while also leveraging plugins to integrate with other services.
You can run the app yourself by downloading it from its GitHub repo.
The Semantic Kernel extension for Visual Studio Code makes it easy to design and test semantic functions. The extension provides an interface for designing semantic functions and allows you to test them with a push of a button with your existing models and data.
In the above screenshot, you can see the extension in action:
If you like Semantic Kernel, you may also be interested in other repos the Semantic Kernel team supports:
|A reference application that demonstrates how to build a chatbot with Semantic Kernel.
|Semantic Kernel Docs
|The home for Semantic Kernel documentation that appears on the Microsoft learn site.
|Semantic Kernel Starters
|Starter projects for Semantic Kernel to make it easier to get started.
|A service that allows you to create pipelines for ingesting, storing, and querying knowledge.
We welcome your contributions and suggestions to SK community! One of the easiest ways to participate is to engage in discussions in the GitHub repository. Bug reports and fixes are welcome!
For new features, components, or extensions, please open an issue and discuss with us before sending a PR. This is to avoid rejection as we might be taking the core in a different direction, but also to consider the impact on the larger ecosystem.
To learn more and get started:
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the MIT license.