Demo – API Manifest Plugins for Semantic Kernel
Tags: englishpost, azureopenai, codesample
Published: 2024-06-03 15:06:42

---
title: Demo – API Manifest Plugins for Semantic Kernel
published: true
date: 2024-05-08 13:00:00 UTC
tags: EnglishPost,AzureOpenAI,CodeSample,EnglishPost
canonical_url: 
---

Hi!

Today, it’s time to share some insights into the world of API Manifest Plugins for Semantic Kernel, these are a cool way to work with OpenAI’s Large Language Models (LLMs).

## Introduction to API Manifest Plugins for Semantic Kernel

Semantic Kernel is at the forefront of AI development, allowing developers to import plugins from OpenAPI documents. However, importing entire OpenAPI documents for large APIs can be inefficient. [To tackle this, Microsoft introduced API Manifest Plugins for Semantic Kernel](https://devblogs.microsoft.com/semantic-kernel/introducing-api-manifest-plugins-for-semantic-kernel-2/)

An  **API Manifest**  is a document that outlines an application’s API dependencies, including links to API descriptions, the requests made, and their authorization requirements. [These plugins enable Semantic Kernel functions to be generated from API Manifest files, which can then be called by LLMs in various scenarios](https://devblogs.microsoft.com/semantic-kernel/introducing-api-manifest-plugins-for-semantic-kernel-2/?WT.mc_id=academic-00000-brunocapuano).

Key features include:

- Slicing large API descriptions into task-specific parts.
- Packaging multiple API dependencies into a single plugin.
- Defining authorization requirements for API calls.

This approach not only streamlines the process but also enhances security and efficiency when integrating third-party APIs.

## The Importance of Function Calling while working with OpenAI LLMs

Function calling is a game-changer for developers working with OpenAI LLMs. It allows the models to intelligently output JSON objects containing arguments to call one or many functions, based on the input provided[<sup>.</sup>](https://platform.openai.com/docs/guides/function-calling)

This feature is crucial for:

- Creating assistants that answer questions by calling external APIs.
- Converting natural language into API calls.
- Extracting structured data from text.

Supported by the latest models, function calling ensures that developers can get structured data back from the model more reliably.

## Reference to the GitHub Repository

[My GitHub repository “sk-API-Manifest-Plugins” is a sample entry for developers looking to leverage API Manifest Plugins with Semantic Kernel](https://github.com/elbruno/sk-API-Manifest-Plugins).

### Scenario

```
In this scenario, we will assume that there are public APIs with information about superheroes, and a pet database with information about pets and their owner information.

There is a fictitious Superhero Pet Day, so the owner of a Pet Store will trigger a plan to find which clients have pets with superhero names.

The plan will detect these pets and send an email congratulating them for the Superhero Pet Day with information about their pet name super hero.
```

### Prerequisites

Once you cloned the repository, ensure you have:

- [.NET 8](https://dotnet.microsoft.com/download/dotnet/8.0)
- [Visual Studio 2022](https://visualstudio.microsoft.com/) or [Visual Studio Code](https://code.visualstudio.com/)
- Access to OpenAI APIs or [Azure OpenAI Services](https://learn.microsoft.com/en-us/azure/ai-services/openai/overview?WT.mc_id=academic-00000-brunocapuano)

### Components

The repository includes:

- 2 Sample API projects: PetStoreAPI and SuperHeroAPI.
- 1 Semantic Kernel test project with a plan to solve the scenario. The project uses API Manifest to embed the plugins from the 2 APIs.
- Bonus: the SK test also use a native plugin that emulates the email sent.

### Running the Demo

To run the demo:

1. Clone the repository from GitHub.
2. Install the necessary dependencies listed in the repository.
3. Follow the step-by-step guide to set up the environment and execute the demo.

Here is the start page of the console demo:

![start page with the console start app](https://brunocapuano.files.wordpress.com/2024/05/10appstart.png?w=970)

And the responses from the SK Planner:

![](https://brunocapuano.files.wordpress.com/2024/05/20responses.png?w=971)

The last step also show a table with all the details and steps that the planner performed to solve the scenario.

This hands-on experience will give you a practical understanding of how API Manifest Plugins work within Semantic Kernel.

* * *

For more detailed information and to explore the full capabilities of API Manifest Plugins and function calling with OpenAI LLMs, visit the official [Semantic Kernel blog](https://devblogs.microsoft.com/semantic-kernel/introducing-api-manifest-plugins-for-semantic-kernel-2/) and the [OpenAI documentation](https://platform.openai.com/docs/guides/function-calling). Embrace the future of AI with these powerful tools at your disposal.

Happy coding!

Greetings

El Bruno

More posts in my blog [ElBruno.com](https://www.elbruno.com).

* * *