High severity intermediate · Fix: 5-10 min

PluginFunctionNotFoundError

semantic_kernel.exceptions.PluginFunctionNotFoundError

What this error means
Semantic Kernel throws PluginFunctionNotFoundError when a requested plugin function is not registered or cannot be found at runtime.

Stack trace

traceback
semantic_kernel.exceptions.PluginFunctionNotFoundError: Plugin function 'my_plugin_function' not found in the registered plugins.
  at semantic_kernel.runtime.PluginManager.get_function(plugin_name='my_plugin', function_name='my_plugin_function')
  at semantic_kernel.runtime.ExecutionContext.invoke_plugin_function(...)
QUICK FIX
Register the plugin properly with kernel.register_plugin() and verify the function name matches exactly before calling it.

Why it happens

This error occurs because the Semantic Kernel runtime cannot locate the specified plugin function. It usually means the plugin was not registered correctly, the function name is misspelled, or the plugin assembly/module was not loaded before invocation.

Detection

Monitor plugin registration logs and catch PluginFunctionNotFoundError exceptions to log the missing function name and plugin context before the runtime fails.

Causes & fixes

1

The plugin containing the function was never registered with the kernel.

✓ Fix

Ensure you call kernel.register_plugin() or equivalent registration method before invoking plugin functions.

2

The function name used in the invocation does not exactly match the registered function name (case-sensitive).

✓ Fix

Verify and correct the function name string to exactly match the registered plugin function name.

3

The plugin assembly or module failed to load due to missing dependencies or incorrect path.

✓ Fix

Check plugin loading logs and confirm all dependencies are present and the plugin path is correct.

Code: broken vs fixed

Broken - triggers the error
python
from semantic_kernel import Kernel

kernel = Kernel()
# Missing plugin registration here
result = kernel.invoke_plugin_function('my_plugin', 'my_plugin_function')  # This line raises PluginFunctionNotFoundError
Fixed - works correctly
python
import os
from semantic_kernel import Kernel

os.environ['SEMANTIC_KERNEL_API_KEY'] = os.environ.get('SEMANTIC_KERNEL_API_KEY', '')  # Use env var for keys

kernel = Kernel()
kernel.register_plugin('my_plugin', '/path/to/my_plugin')  # Plugin registered properly
result = kernel.invoke_plugin_function('my_plugin', 'my_plugin_function')  # Now works
print(result)
Added explicit plugin registration with kernel.register_plugin() before invoking the function to ensure the runtime can find the plugin function.

Workaround

Catch PluginFunctionNotFoundError and fallback to a default function or return a user-friendly error message while logging the missing function details.

Prevention

Always register all plugins and their functions during kernel initialization and validate function names with unit tests to avoid runtime lookup failures.

Python 3.9+ · semantic-kernel >=0.10.0 · tested on 0.12.3
Verified 2026-04
Verify ↗

Community Notes

No notes yetBe the first to share a version-specific fix or tip.