Skip to content

About

Enterprise Agentic AI: Architecting Autonomous Java Systems for Production — Hands-On Workshop

Topics

Resources

Stars

4 stars

Watchers

0 watching

Forks

Repository files navigation

Workshop cover

Deploy docs to GitHub Pages

Enterprise Agentic AI: Architecting Autonomous Java Systems for Production

Hands-On Workshop
Part 1: 90 minutes (10 min intro · 80 min hands-on), plus an optional 15-minute bonus
Part 2: 90-minute event slot (75 min labs · 10 min introduction/transitions · 5 min troubleshooting)
Part 3: 90-minute event slot (75 min labs · 15 min introduction/transitions/troubleshooting)
Lab site: https://danieloh30.github.io/agentic-ai-java-workshop/ (short URL: bit.ly/agents-labs)
Intro deck: intro-deck.pdf

Build an agentic incident management platform for Apex Systems, a fictional enterprise IT services company, using Quarkus, Quarkus LangChain4j, and OpenCode CLI or another AI coding assistant. Part 1 introduces agents, tools, orchestration, governance, and observability. Part 2 extends those foundations with MCP-grounded planning, bounded conversational memory and eviction, majority-or-review voting, and persisted event-processing outcomes. Part 3 carries an incident response through runtime skills, guardrails, durable approval, restart recovery, deterministic regression checks, and quality evaluation.

Learning path

Part 1 — Fundamental patterns

Build the foundations of agentic incident management for Apex Systems through seven short exercises. Start with a declarative agent that calls a tool, then add prompt-based policies, parallel specialists, and supervisor orchestration. Apply coding-assistant governance, introduce human approval and tracing, and delegate impact assessment to a remote agent over A2A.

Designed for a 90-minute session, with 80 minutes of hands-on work and a 10-minute introduction. Exercise 8 is an optional 15-minute bonus that adds a report-quality loop after the core session.

Exercise and guide What you will build and verify Working project Reference solution
1. Agent + tool A declarative triage agent that calls a tool to update an incident's status Shared lab Solution
2. Policy as prompt A diagnostic agent whose behavior changes through its system message Shared lab Solution
3. Parallel agents Concurrent incident analyses combined into a structured result Shared lab Solution
4. Supervisor orchestration A supervisor coordinating specialist agents within an incident-processing workflow Shared lab Solution
5. AI governance Project rules in AGENTS.md that guide an AI coding assistant and support code and prompt audits Shared lab Documentation only
6. Human gate + tracing Human approval for escalation and OpenTelemetry traces of agent execution Run + read Solution
7. Remote agents (A2A) Impact assessment delegated over A2A; optional WildFly runtime Main app + remote agent Solution
8. Quality loop (bonus) A declarative @LoopAgent that drafts, critiques, and revises a report within three iterations; optional builder comparison Start lab Solution

Work through the guides in order. Exercises 1–4 share the root lab/ project; Exercises 2 and 3 use their reference solutions for end-to-end checks. Exercise 5 audits the current lab, Exercises 6 and 7 use runnable solutions, and Exercise 8 has a separate starter.

Part 2 — From Patterns to Production

Six short exercises, one running application. Choose part2/lab/ for code-along or part2/solution/ for the completed run-and-read route. Start Quarkus dev mode once and stay in that folder through Exercises 9–14. Select the exercise mode in the dashboard; save code/configuration edits for automatic hot reload. No reset commands, project copies, branch switches, or manual restarts are part of the walkthrough.

The six exercises provide 75 minutes of hands-on work in a 90-minute session. PostgreSQL, Kafka, and the bundled MCP fixture start up front. Existing incident, conversation, and processing records remain available through dev-mode reloads.

Exercise and guide Time What you build and verify Dashboard mode
9. Structured Planning 15 min Validated specialist plans, bounded review, and explicit recommendation readiness Planning / MCP
10. Required MCP Evidence 10 min A required tool lookup before planning; fail closed when evidence is unavailable Planning / MCP
11. Memory Boundaries 10 min Conversation isolation and observable eviction from the PostgreSQL-backed window Memory
12. Voting and Disagreement 15 min Parallel specialist ballots and deterministic majority-or-review policy Voting
13. Event-Driven Processing 10 min A sequential agent workflow triggered by Kafka, with correlated outcomes Events / Replay
14. Persistent Outcomes and Replay 15 min Reuse completed work after hot reload and inspect durable, duplicate-safe outcomes Events / Replay

Missing MCP evidence stops planning; eviction removes messages from the store; disagreement can require review; a completed recommendation is not proof of incident recovery. Part 3 follows a pending approval across full application shutdown. Optional challenges are outside the core timebox.

Part 3 — Reliable Response and Evaluation

Six short exercises provide 75 minutes of hands-on work in a 90-minute session. Choose part3/lab/ for code-along or part3/solution/ for completed code, then stay in that folder throughout. The same Apex incident response moves from a runtime skill to a guarded recommendation, asynchronous approval, restart recovery, regression checks, and a measured quality experiment.

The supplied launcher starts persistent PostgreSQL before Quarkus dev mode. Edits use hot reload; Exercise 18 deliberately restarts the JVM once to prove a pending approval survives. No reset commands or per-exercise project switches are needed. Evaluation plumbing, the fixed dataset and scripted test server are supplied; learner tasks stay small.

Exercise Time Workspace
15. Runtime Skills 10 min Skills & guardrails
16. Runtime Output Guardrails 10 min Skills & guardrails
17. Asynchronous Approval 15 min Approval & recovery
18. Restart Recovery 15 min Approval & recovery
19. Deterministic Regression Tests 10 min Tests & evaluation
20. Quality Evaluation 15 min Tests & evaluation

Start with Exercise 15 and preflight dependency/container downloads before the event. Live evaluation uses paid model calls; automated regression tests use a local scripted model and an isolated test database.

Repository layout

Path Purpose
lab/ Shared starter project for Exercises 1–4, with TODO stubs
docs/ All lab instructions (Markdown) and images
solutions/ Reference solution projects for each exercise
solutions/08-quarkus-flow/lab/ Starter project for the optional quality-loop exercise
part2/lab/ Shared runnable starter for all six Part 2 exercises
part2/solution/ Completed shared Part 2 application
part3/lab/ Shared starter for Exercises 15–20
part3/solution/ Completed Part 3 application

For Part 2, use part2/lab/ or part2/solution/ for all Exercises 9–14 and edit only the files listed in each guide.

Start here:

  1. docs/index.md — lab landing page with exercise table
  2. solutions/README.md — exercise → solution mapping

Quick start

Clone the repository and set the API key:

git clone https://github.com/danieloh30/agentic-ai-java-workshop.git
cd agentic-ai-java-workshop
export OPENAI_API_KEY=sk-your-key-here

For Part 1, start Exercise 1:

cd lab
./mvnw quarkus:dev

For Part 2, start Exercise 9 from the repository root:

cd part2/lab
./mvnw quarkus:dev

Follow the matching guide, then open http://localhost:8080. For Part 2, keep the same terminal and project through Exercise 14 and choose the dashboard mode for each exercise. Use part2/solution/ instead if you prefer the completed run-and-read route.

For Part 1, stop the current application before switching projects. For Part 2, leave dev mode running between exercises and stop it only when finished. Quarkus manages Dev Services; preflight dependency and container downloads before the event. The shared Part 2 application starts PostgreSQL and Kafka once, and its idempotent seed preserves existing data through hot reload.

Optional practice resets

The Part 2 event path never requires a reset. Continue editing the same part2/lab/ project while dev mode runs.

For separate Part 1 practice sessions, ./reset-labs.sh lab restores the root starter and ./reset-labs.sh ex08 restores the bonus starter. These optional commands discard edits to their listed files. Part 2 uses one cumulative application and does not require resets between exercises.

For Part 3, start from the repository root:

cd part3/lab
export OPENAI_API_KEY=your-key
./dev.sh

Choose part3/solution for completed code. Keep that folder through Exercises 15–20; use a second terminal there for ./mvnw test. The launcher provisions a dedicated database container/volume. See Part 3 setup and pacing for preflight and the single deliberate restart experiment.

Prerequisites

  • Java 25+
  • Maven 3.9+ (or use ./mvnw in each exercise)
  • OpenCode CLI or any AGENTS.md-compatible AI coding assistant
  • OpenAI API key in OPENAI_API_KEY; the exercises default to gpt-4o
  • Free port 8080; Exercise 7 also uses 8888 for its remote A2A agent
  • Docker or Podman running for Quarkus Dev Services, including PostgreSQL, observability services, and Part 2's Kafka broker

Quarkus and extension dependencies are declared in each project's pom.xml. See the setup guide for Java and Maven installation instructions.

Quarkus 4 compatibility monitoring

The workshop's current runtime remains Quarkus 3.40.1.2 with the Quarkus MCP Server extension (io.quarkiverse.mcp:quarkus-mcp-server-http). Quarkiverse maintains that extension; it is not a separate runtime.

The Quarkus 4 MCP compatibility workflow runs daily at 06:30 America/New_York, after Dependabot's scheduled 06:00 check. It also supports Run workflow and runs for relevant dependency/monitor PRs.

It checks out the exact head commit of draft migration PR #418 in an isolated directory. It selects the latest stable Quarkus 4 and MCP Server releases, then prefers the latest stable LangChain4j extension whose declared Quarkus baseline is compatible; if only a compatible preview is available, the report explicitly identifies it. Both Part 2 lab and solution must run their full test suites, including successful MCP discovery/execution tests, before reporting COMPATIBLE.

Open the run's Summary or download its artifact for the candidate versions, migration commit, candidate POMs, Maven logs, and JUnit results. BLOCKED identifies the known removed Jackson-customizer API; REGRESSION identifies a different test/build failure; ERROR identifies missing evidence or infrastructure/monitor failures. Daily/manual checks fail while blocked and turn green only when both suites pass. Relevant PR checks allow the known upstream blocker while validating the monitor; their summary still says BLOCKED, and unexpected regressions/errors still fail.

The monitor does not change main, update PR #418, or auto-merge an upgrade. Clearing this MCP blocker still requires validation of the rest of the workshop, including A2A and Flow, and review of any preview dependencies. Retire or retarget the monitor after the full migration is merged.

Run the monitor's safeguard tests locally without a model key, Maven, or containers:

python3 -m unittest discover -s scripts -p 'quarkus4_readiness_test.py' -v

About

Enterprise Agentic AI: Architecting Autonomous Java Systems for Production — Hands-On Workshop

Topics

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages