What is the Kernel?

ASK⇾ Kernel Planner Skills Memories Connectors >>> ⇾GET

Journey of an ask to a get in Semantic Kernel visualized as phases as annotated immediately below

The kernel in Semantic Kernel (SK) is the orchestrator of a user's ASK. The kernel fulfills the user's desired goal using its available skills, memories, and connectors. Key features of the kernel that facilitate faster development include:

  • Skills: Package your most useful prompts as fully reusable components
  • Hybrid Development: Fluidly mix your AI prompts with conventional native code
  • Orchestration: Manage complicated LLM AI prompts with complete control
  • Future Proof: Use multiple LLM AI models and configurations with specificity

The kernel is designed to encourage "function composition" which allows developers to combine and interconnect the input and outputs of skills into a single pipeline.

Tip

Try the Simple chat summary sample app to quickly see the Kernel in action.

Why is the Kernel called a "kernel"?

Kernel: "The core, center, or essence of an object or system." —Wiktionary

The term "kernel" can have different meanings in different contexts, but in the case of the Semantic Kernel, the kernel refers to an instance of the processing engine that processes an ASK all the way through to fulfillment. The kernel is the seed around which everything else in the Semantic Kernel world grows.

How does the Kernel appear in code?

In code you will see the kernel instantiated with Kernel.Builder.Build():

using Microsoft.SemanticKernel;

var myKernel = Kernel.Builder.Build();

There are a variety of things that you can do with myKernel that include:

  • Configuring the kernel to use OpenAI or Azure OpenAI
  • Sourcing a collection of skills
  • Chaining multiple skills' together
  • Customize how the kernel works to fit your exact needs

Take the next step

Now that you know about the kernel, you are ready to learn about the planner.

gray circles of semantic kernel