Table of Contents

Plugins & Plugin Packages

This document provides reference information for plugins and plugin packages in FoundationaLLM.

Overview

Plugins extend the functionality of the FoundationaLLM platform. They can add new features, integrate with external systems, or implement processing steps. Plugins are delivered in plugin packages, which are managed on the Packages page of the Management Portal (interactively) or through the Management API (programmatically).

Plugin packages and plugins are resources of the FoundationaLLM.Platform resource provider (pluginPackages and plugins).

Packages

FoundationaLLM uses three kinds of versioned packages:

Package kind Resource Runtime Contents
Plugin package FoundationaLLM.Platform/pluginPackages Dotnet or Python Plugins
Artifact package FoundationaLLM.Platform/artifactPackages FoundationaLLM FoundationaLLM resources such as prompts, agents, data pipelines, and App Configuration values (including Agent Portal themes)
Agent template FoundationaLLM.Agent/agentTemplates FoundationaLLM A template for creating agents

Package versions are downloaded from a Public package store (maintained by FoundationaLLM, accessed with a SAS token) or a Private package store (your own storage account).

Plugin Packages

A plugin package is a unit of versioning and deployment of one or more plugins.

Supported plugin package types

Runtime Package type Contains
Python ZIP package with a foundationallm_manifest.json file Agent workflow and agent tool plugins
Dotnet NuGet package with a _metadata/dependencies.json file Data source, data pipeline stage, content text extraction, content text partitioning, and shielding plugins

Package naming convention

FoundationaLLM plugin packages are named {runtime}-{name}, where {runtime} is Dotnet or Python and {name} contains only letters, digits, underscores, or hyphens. The name in the request must match the name declared in the package.

Example: Dotnet-FoundationaLLMDataPipelinePlugins

Managing plugin packages through the API

All requests use the Management API base URL, an api-version=2024-02-16 query parameter, and a bearer token.

Deploy a version from a package store

POST /instances/{instanceId}/providers/FoundationaLLM.Platform/pluginPackages/{packageName}
Content-Type: application/json
{
    "type": "plugin-package",
    "name": "{packageName}",
    "package_runtime": "Dotnet",
    "package_version": "1.0.0",
    "package_store_type": "Public"
}

The same call creates the package if it does not exist or deploys a new version if it does. This is what the Packages page sends.

Upload a package file

Send a multipart/form-data request to the same URL with:

  • A file with the key file (the NuGet or ZIP package).
  • A text field with the key resource containing the JSON above (package_store_type is not needed).

List plugin packages

GET /instances/{instanceId}/providers/FoundationaLLM.Platform/pluginPackages

Download a plugin package

GET /instances/{instanceId}/providers/FoundationaLLM.Platform/pluginPackages/{packageName}?loadContent=true

Validate a package store connection

POST /instances/{instanceId}/providers/FoundationaLLM.Platform/pluginPackages/validate
{ "packageStoreType": "Public" }

Plugins

Plugin categories

Runtime Category Description
Python Agent workflow Implements agent workflows that run in the LangChain API
Python Agent tool Implements agent tools for the LangChain workflow host
.NET Data Source Implements data sources for data pipelines
.NET Data Pipeline Stage Implements stages for data pipeline execution
.NET Content Text Extraction Implements text extraction from binary content
.NET Content Text Partitioning Implements text partitioning strategies
.NET Shielding Implements content shielding (for example, Azure Content Safety, Lakera Guard, Enkrypt Guardrails, Presidio)

Plugin naming convention

Plugin names use the format {runtime}-{packageName}-{pluginName}, where each part contains only letters, digits, underscores, or hyphens.

Examples:

  • Dotnet-FoundationaLLMDataPipelinePlugins-AzureAISearchIndexingDataPipelineStage
  • Dotnet-FoundationaLLMShieldingPlugins-AzureContentSafety

Plugin definition structure

{
    "type": "plugin",
    "name": "Dotnet-FoundationaLLMDataPipelinePlugins-AzureAISearchIndexingDataPipelineStage",
    "object_id": "/instances/{instanceId}/providers/FoundationaLLM.Platform/plugins/...",
    "display_name": "Azure AI Search Indexing Data Pipeline Stage (FoundationaLLM)",
    "description": "Provides the FoundationaLLM standard implementation for indexing data pipeline stages.",
    "category": "Data Pipeline Stage",
    "plugin_package_object_id": "/instances/{instanceId}/providers/FoundationaLLM.Platform/pluginPackages/Dotnet-FoundationaLLMDataPipelinePlugins",
    "parameters": [...],
    "parameter_selection_hints": {...},
    "dependencies": [...]
}

Plugin parameters

Each plugin has zero or more parameters. Supported parameter types:

Type Description
string A single string value
int A single integer value
float A single floating-point value
bool A single boolean value
datetime A single date and time value
array An array of values
resource-object-id A FoundationaLLM resource identifier

Parameter selection hints

For resource-object-id parameters, parameter_selection_hints tells the UI which resources to offer:

"parameter_selection_hints": {
    "APIEndpointConfigurationObjectId": {
        "resourcePath": "providers/FoundationaLLM.Configuration/apiEndpointConfigurations",
        "filterActionPayload": {
            "Category": "General",
            "Subcategory": "Indexing"
        }
    }
}

Plugin dependencies

Plugins can depend on other plugins:

  • Single: exactly one dependency plugin must be selected.
  • Multiple: one or more dependency plugins must be selected.
"dependencies": [
    {
        "selection_type": "Single",
        "dependency_plugin_names": [
            "Dotnet-FoundationaLLMDataPipelinePlugins-TokenContentTextPartitioning",
            "Dotnet-FoundationaLLMDataPipelinePlugins-SemanticContentTextPartitioning"
        ]
    }
]

Managing plugins through the API

List all plugins

GET /instances/{instanceId}/providers/FoundationaLLM.Platform/plugins

Filter plugins by category

POST /instances/{instanceId}/providers/FoundationaLLM.Platform/plugins/filter
{
    "categories": [
        "Data Source",
        "Data Pipeline Stage"
    ]
}

Category names are matched exactly (case-sensitive).