Spring Boot
Installation
Section titled “Installation”<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();Endpoints
Section titled “Endpoints”| Endpoint | Description |
|---|---|
GET /health | Health check |
GET /api/flows | List all registered flows |
POST /api/flows/{flowName} | Execute a flow |
Configuration
Section titled “Configuration”| Option | Default | Description |
|---|---|---|
port | 8080 | Server port |
host | 0.0.0.0 | Bind address |
basePath | /api | Base path for endpoints |
contextPath | / | Application context path |
Features
Section titled “Features”Full Spring Boot ecosystem integration, including dependency injection, configuration, and middleware.
Sample
Section titled “Sample”See the spring sample.