Supported Semantic Kernel languages
Semantic Kernel plans on providing support to the following languages:
- C#
- Python
- Java
While the overall architecture of the kernel is consistent across all languages, we made sure the SDK for each language follows common paradigms and styles in each language to make it feel native and easy to use.
In C#, there are several packages to help ensure that you only need to import the functionality that you need for your project. The following table shows the available packages in C#.
Package name | Description |
---|---|
Microsoft.SemanticKernel |
The main package that includes everything to get started |
Microsoft.SemanticKernel.Core |
The core package that provides implementations for Microsoft.SemanticKernel.Abstractions |
Microsoft.SemanticKernel.Abstractions |
The base abstractions for Semantic Kernel |
Microsoft.SemanticKernel.Connectors.Amazon |
The AI connector for Amazon AI |
Microsoft.SemanticKernel.Connectors.AzureAIInference |
The AI connector for Azure AI Inference |
Microsoft.SemanticKernel.Connectors.AzureOpenAI |
The AI connector for Azure OpenAI |
Microsoft.SemanticKernel.Connectors.Google |
The AI connector for Google models (e.g., Gemini) |
Microsoft.SemanticKernel.Connectors.HuggingFace |
The AI connector for Hugging Face models |
Microsoft.SemanticKernel.Connectors.MistralAI |
The AI connector for Mistral AI models |
Microsoft.SemanticKernel.Connectors.Ollama |
The AI connector for Ollama |
Microsoft.SemanticKernel.Connectors.Onnx |
The AI connector for Onnx |
Microsoft.SemanticKernel.Connectors.OpenAI |
The AI connector for OpenAI |
Microsoft.SemanticKernel.Connectors.AzureAISearch |
The vector store connector for AzureAISearch |
Microsoft.SemanticKernel.Connectors.AzureCosmosDBMongoDB |
The vector store connector for AzureCosmosDBMongoDB |
Microsoft.SemanticKernel.Connectors.AzureCosmosDBNoSQL |
The vector store connector for AzureAISearch |
Microsoft.SemanticKernel.Connectors.MongoDB |
The vector store connector for MongoDB |
Microsoft.SemanticKernel.Connectors.Pinecone |
The vector store connector for Pinecone |
Microsoft.SemanticKernel.Connectors.Qdrant |
The vector store connector for Qdrant |
Microsoft.SemanticKernel.Connectors.Redis |
The vector store connector for Redis |
Microsoft.SemanticKernel.Connectors.Sqlite |
The vector store connector for Sqlite |
Microsoft.SemanticKernel.Connectors.Weaviate |
The vector store connector for Weaviate |
Microsoft.SemanticKernel.Plugins.OpenApi (Experimental) |
Enables loading plugins from OpenAPI specifications |
Microsoft.SemanticKernel.PromptTemplates.Handlebars |
Enables the use of Handlebars templates for prompts |
Microsoft.SemanticKernel.Yaml |
Provides support for serializing prompts using YAML files |
Microsoft.SemanticKernel.Prompty |
Provides support for serializing prompts using Prompty files |
Microsoft.SemanticKernel.Agents.Abstractions |
Provides abstractions for creating agents |
Microsoft.SemanticKernel.Agents.OpenAI |
Provides support for Assistant API agents |
To install any of these packages, you can use the following command:
dotnet add package <package-name>
In Python, there's a single package that includes everything you need to get started with Semantic Kernel. To install the package, you can use the following command:
pip install semantic-kernel
On PyPI under Provides-Extra
the additional extras you can install are also listed and when used that will install the packages needed for using SK with that specific connector or service, you can install those with the square bracket syntax for instance:
pip install semantic-kernel[azure]
This will install Semantic Kernel, as well as specific tested versions of: azure-ai-inference
, azure-search-documents
, azure-core
, azure-identity
, azure-cosmos
and msgraph-sdk
(and any dependencies of those packages). Similarly the extra hugging_face
will install transformers
and sentence-transformers
.
For Java, Semantic Kernel has the following packages; all are under the group Id com.microsoft.semantic-kernel
, and can be imported
from maven.
<dependency>
<groupId>com.microsoft.semantic-kernel</groupId>
<artifactId>semantickernel-api</artifactId>
</dependency>
A BOM is provided that can be used to define the versions of all Semantic Kernel packages.
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.microsoft.semantic-kernel</groupId>
<artifactId>semantickernel-bom</artifactId>
<version>${semantickernel.version}</version>
<scope>import</scope>
<type>pom</type>
</dependency>
</dependencies>
</dependencyManagement>
semantickernel-bom
β A Maven project BOM that can be used to define the versions of all Semantic Kernel packages.semantickernel-api
β Package that defines the core public API for the Semantic Kernel for a Maven project.semantickernel-aiservices-openai
βProvides a connector that can be used to interact with the OpenAI API.
Below is an example POM XML for a simple project that uses OpenAI.
<project>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.microsoft.semantic-kernel</groupId>
<artifactId>semantickernel-bom</artifactId>
<version>${semantickernel.version}</version>
<scope>import</scope>
<type>pom</type>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>com.microsoft.semantic-kernel</groupId>
<artifactId>semantickernel-api</artifactId>
</dependency>
<dependency>
<groupId>com.microsoft.semantic-kernel</groupId>
<artifactId>semantickernel-connectors-ai-openai</artifactId>
</dependency>
</dependencies>
</project>
The following tables show which features are available in each language. The π symbol indicates that the feature is partially implemented, please see the associated note column for more details. The β symbol indicates that the feature is not yet available in that language; if you would like to see a feature implemented in a language, please consider contributing to the project or opening an issue.
Services | C# | Python | Java | Notes |
---|---|---|---|---|
Prompts | β | β | β | To see the full list of supported template and serialization formats, refer to the tables below |
Native functions and plugins | β | β | β | |
OpenAPI plugins | β | β | β | Java has a sample demonstrating how to load OpenAPI plugins |
Automatic function calling | β | β | β | |
Open Telemetry logs | β | π | β | |
Hooks and filters | β | β | β |
When authoring prompts, Semantic Kernel provides a variety of template languages that allow you to embed variables and invoke functions. The following table shows which template languages are supported in each language.
Formats | C# | Python | Java | Notes |
---|---|---|---|---|
Semantic Kernel template language | β | β | β | |
Handlebars | β | β | β | |
Liquid | β | β | β | |
Jinja2 | β | β | β |
Once you've created a prompt, you can serialize it so that it can be stored or shared across teams. The following table shows which serialization formats are supported in each language.
Formats | C# | Python | Java | Notes |
---|---|---|---|---|
YAML | β | β | β | |
Prompty | β | β | β |
Services | C# | Python | Java | Notes |
---|---|---|---|---|
Text Generation | β | β | β | Example: Text-Davinci-003 |
Chat Completion | β | β | β | Example: GPT4, Chat-GPT |
Text Embeddings (Experimental) | β | β | β | Example: Text-Embeddings-Ada-002 |
Text to Image (Experimental) | β | β | β | Example: Dall-E |
Image to Text (Experimental) | β | β | β | Example: Pix2Struct |
Text to Audio (Experimental) | β | β | β | Example: Text-to-speech |
Audio to Text (Experimental) | β | β | β | Example: Whisper |
Endpoints | C# | Python | Java | Notes |
---|---|---|---|---|
Amazon Bedrock | β | β | β | |
Anthropic | β | β | β | |
Azure AI Inference | β | β | β | |
Azure OpenAI | β | β | β | |
β | β | β | ||
Hugging Face Inference API | β | β | β | |
Mistral | β | β | β | |
Ollama | β | β | β | |
ONNX | β | β | β | |
OpenAI | β | β | β | |
Other endpoints that suppoprt OpenAI APIs | β | β | β | Includes LLM Studio, Azure Model-as-a-service, etc. |
Warning
The Semantic Kernel Vector Store functionality is in preview, and improvements that require breaking changes may still occur in limited circumstances before release.
For the list of out of the box vector store connectors and the language support for each, refer to out of the box connectors.
Important
Memory Store connectors are legacy and have been replaced by Vector Store connectors. For more information see Legacy Memory Stores.
Memory Connectors | C# | Python | Java | Notes |
---|---|---|---|---|
Azure AI Search | β | β | β | |
Chroma | β | β | β | |
DuckDB | β | β | β | |
Milvus | β | β | β | |
Pinecone | β | β | β | |
Postgres | β | β | β | |
Qdrant | β | π | β | |
Redis | β | π | β | |
Sqlite | β | β | π | |
Weaviate | β | β | β |