Skip to content

Spring Boot

<dependency>
<groupId>com.google.genkit</groupId>
<artifactId>genkit-plugin-spring</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
import com.google.genkit.plugins.spring.SpringPlugin;
SpringPlugin spring = SpringPlugin.create();
Genkit genkit = Genkit.builder()
.plugin(spring)
.build();
// Define your flows here...
// Start the server (blocks until stopped)
spring.start();
EndpointDescription
GET /healthHealth check
GET /api/flowsList all registered flows
POST /api/flows/{flowName}Execute a flow
OptionDefaultDescription
port8080Server port
host0.0.0.0Bind address
basePath/apiBase path for endpoints
contextPath/Application context path

Full Spring Boot ecosystem integration, including dependency injection, configuration, and middleware.

See the spring sample.