Jetty Server
Installation
Section titled “Installation”<dependency> <groupId>com.google.genkit</groupId> <artifactId>genkit-plugin-jetty</artifactId> <version>1.0.0-SNAPSHOT</version></dependency>import com.google.genkit.plugins.jetty.JettyPlugin;import com.google.genkit.plugins.jetty.JettyPluginOptions;
JettyPlugin jetty = new JettyPlugin(JettyPluginOptions.builder() .port(8080) .build());
Genkit genkit = Genkit.builder() .plugin(jetty) .build();
// Define your flows here...
// Start the server (blocks until stopped)jetty.start();All defined flows are automatically exposed as HTTP endpoints.
Calling flows via HTTP
Section titled “Calling flows via HTTP”curl -X POST http://localhost:8080/api/flows/tellJoke \ -H "Content-Type: application/json" \ -d '{"data": "pirates"}'