Package com.google.genkit.core
Interface Plugin
- All Known Subinterfaces:
DynamicPlugin,ServerPlugin
- All Known Implementing Classes:
AnthropicPlugin,AwsBedrockPlugin,AzureFoundryPlugin,CoherePlugin,CompatOAIPlugin,DeepSeekPlugin,EvaluatorsPlugin,FirebasePlugin,GoogleGenAIPlugin,GroqPlugin,JettyPlugin,LocalVecPlugin,MCPPlugin,MistralPlugin,OllamaPlugin,OpenAIPlugin,PineconePlugin,PostgresPlugin,SpringPlugin,WeaviatePlugin,XAIPlugin
public interface Plugin
Plugin is the interface implemented by types that extend Genkit's
functionality. Plugins are typically used to integrate external services like
model providers, vector databases, or monitoring tools.
Plugins are registered and initialized via the Genkit builder during initialization.
-
Method Summary
-
Method Details
-
getName
String getName()Returns the unique identifier for the plugin. This name is used for registration and lookup.- Returns:
- the plugin name
-
init
Initializes the plugin. This method is called once during Genkit initialization. The plugin should return a list of actions that it provides.- Returns:
- list of actions provided by this plugin
-
init
Initializes the plugin with access to the registry. This method is called once during Genkit initialization. The plugin should return a list of actions that it provides.Override this method instead of
init()when your plugin needs to resolve dependencies from the registry (e.g., embedders, models).- Parameters:
registry- the Genkit registry for resolving dependencies- Returns:
- list of actions provided by this plugin
-