Quarkus Flow Workshop

Welcome to the Quarkus Flow Workshop! This is a guided, hands-on path through the core features of the engine.

Each lab builds on the previous one, but you can also run them independently. By the end of this workshop, you will have built a fully reactive, event-driven, and AI-enabled orchestration.

You will:

  • Bootstrap a Quarkus project and run your first workflow using the Java DSL.

  • Explore the Flow developer experience: Dev UI visualizers, logs, and tracing.

  • Call external HTTP and OpenAPI services natively from your workflows.

  • React to and emit CloudEvents using Kafka.

  • Orchestrate LangChain4j AI agents using Agentic workflow patterns.

Prerequisites

  • Java 17+ and Maven (or the Quarkus CLI) installed.

  • A recent Quarkus version compatible with Quarkus Flow.

  • For the optional integration labs:

    • Messaging: Docker running locally (Quarkus Dev Services will automatically spin up a Kafka broker for you).

    • Agentic AI: A LangChain4j backend (like a local Ollama instance or an OpenAI API key).

The Labs

This workshop is split into five focused labs. Each takes roughly 15 minutes to complete.

  1. Lab 1 – Hello Flow & Dev UI
    Create a Quarkus app, add Quarkus Flow, write a minimal workflow using the Java DSL, and visualize it in the Dev UI.

  2. Lab 2 – Call HTTP & OpenAPI services
    Extend the app with HTTP tasks, configure the REST client, and observe automatic RFC 7807 error mapping.

  3. Lab 3 – Events with YAML workflows
    Introduce a YAML-based workflow that pauses to wait for Kafka messages and emits CloudEvents back out.

  4. Lab 4 – Agentic workflows (Java DSL)
    Wire standard LangChain4j agents into a Java DSL Flow, adding a simple critique/approve Human-in-the-Loop (HITL) pattern.

  5. Lab 5 – Agentic workflows (Annotations)
    Learn the "Auto-Generation Magic" by letting Quarkus Flow compile LangChain4j @SequenceAgent annotations directly into workflows.

Where to find the code

The snippets in these labs reference the same example code used across the documentation:

You can copy-paste them directly into your project as you follow along. Let’s get started!