SPI entry point

public interface AdkPlugin {
  String name();
  void register(PluginRegistry registry);
}
Advertisement

Discovered via ServiceLoader

META-INF/services/adk.AdkPlugin:
  com.myco.WeatherToolsPlugin
  com.myco.CustomModelPlugin
Advertisement

Registration flow

public class WeatherToolsPlugin implements AdkPlugin {
  public void register(PluginRegistry reg) {
    reg.tools().add(new WeatherTool());
    reg.tools().add(new ForecastTool());
  }
}