Skip to content

Jakarta Agentic AI: use released API 1.0.0-M1 and EE11 TCK branch - #8331

Open
luiseufrasio wants to merge 49 commits into
mainfrom
main-with-Jakarta-Agentic-AI
Open

Jakarta Agentic AI: use released API 1.0.0-M1 and EE11 TCK branch#8331
luiseufrasio wants to merge 49 commits into
mainfrom
main-with-Jakarta-Agentic-AI

Conversation

@luiseufrasio

Copy link
Copy Markdown
Contributor

Description

This PR brings the Jakarta Agentic AI integration branch up to date and switches the API dependency to a released version:

  • Merge latest payara/main into the branch.
  • Use the released Jakarta Agentic AI API 1.0.0-M1 (available on Maven Central) instead of the 1.0.0-SNAPSHOT version.
  • Point the Jakarta Agentic AI TCK stage in the Jenkinsfile at the EE11 branch of the jakartaee-10-tck-runners repository.

Dependency

This PR depends on payara/jakartaee-10-tck-runners#213 and should be merged together with it.

Testing performed

CI / Jenkins pipeline (including the Jakarta Agentic AI TCK stage).

luiseufrasio and others added 30 commits June 10, 2026 10:05
…jakarta-agentic-ai-1-0-tck-support-in-payara-server
…croProfile Config

Evolve the internal LlmBackend SPI to carry role-tagged conversation turns and an optional system prompt, and store assistant replies in LargeLanguageModelImpl so per-workflow conversational state is complete and providers receive a correctly alternating history.

Add Ollama and Anthropic backends (raw java.net.http + JSON-B, no SDK) and an LlmBackendFactory that selects the provider from MicroProfile Config under payara.agentic.llm.*. The Anthropic backend marks the system prompt with cache_control for prompt caching across workflow phases. The no-op backend remains the default when no provider is configured.

Wire the factory into AgenticAIExtension and add the microprofile-config-api dependency.
…generator

quickstart: a minimal @agent that answers a question, exercising the @Trigger/@Decision/@Action/@outcome phases. Selects a small local Ollama model via MicroProfile Config and ships a CI-safe Arquillian IT that uses a stub LargeLanguageModel, so it runs without a live model.

tutorial generator: an agent that writes a field-by-field guide for a Customer registration form (contract Azul Payara Server) and refines it through a chat loop, passing the current HTML plus the instruction each turn. Uses the Anthropic provider, ships a side-by-side form/guide UI, and a CI-safe IT with a stub model.

Register both modules in the payara-samples reactor.
… configurable LLM backends) into the samples branch
… sample

- Add VertexLlmBackend: authenticates via ADC (gcloud subprocess) or
  GOOGLE_ACCESS_TOKEN env var; builds the rawPredict endpoint URL handling
  the 'global' pseudo-region; sends anthropic_version in the request body
  as required by Vertex AI
- Register 'vertex' provider in LlmBackendFactory; project-id and region
  fall back to the ANTHROPIC_VERTEX_PROJECT_ID / CLOUD_ML_REGION env vars
- Switch sample config to vertex provider with claude-sonnet-4-6 model
- Update system prompt to suppress the form-level title/intro in generated HTML
- Redesign index.html with Azul brand tokens: navy header, white cards,
  Inter font, pill buttons (#0055cc), and chat bubbles styled after the brand

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… chat

- Redesign UI: form centred on the left; clicking a field slides in a
  contextual panel on the right showing only that field's AI explanation
- Add POST /api/tutorial/refine-field endpoint: isolates one field's
  description, refines it via the agent, and merges the result back into
  the full guide JSON (other fields preserved)
- Switch agent prompts and system prompt to return structured JSON
  (fieldName → plain-text explanation) instead of a free-form HTML fragment
- Per-field chat history: each field keeps its own conversation thread,
  restored when the user switches between fields
- Toast notification after generation guides the user to click a field
- Guide panel styled to match the form card (white, clean border); removed
  metallic gradient
- Graceful handling of non-JSON agent responses in the chat

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…erge

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…nt-samples-with-jakarta-agentic-ai-on-payara-server
…ON_JSON

The test requests TEXT_HTML and the store holds HTML; the wrong @produces
annotation caused HTTP 406 on every CI run.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…lAgent

The stub checked for "Apply this change requested" but TutorialAgent sends
"Apply this change to the explanations", so refine always returned GENERATED.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Rename local variable `html` to `content` in TutorialAgent.render() to
  avoid confusion with JSON output
- Add Logger to TutorialResource and log caught exceptions in extractField
  and mergeField instead of silently discarding them
- Add Javadoc to TutorialStore explaining why @ApplicationScoped + volatile
  is intentional (guide must persist across generate/refine requests)
- Add refinesField IT test covering the /api/tutorial/refine-field endpoint

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…to FISH-13709-create-agent-samples-with-jakarta-agentic-ai-on-payara-server
…/ai/agent/engine/ClassMethodOrder.java

Co-authored-by: Alfonso Valdez <alfonso.altamirano@payara.fish>
…/ai/agent/engine/ClassMethodOrder.java

Co-authored-by: Alfonso Valdez <alfonso.altamirano@payara.fish>
…/ai/agent/engine/WorkflowEngine.java

Co-authored-by: Alfonso Valdez <alfonso.altamirano@payara.fish>
…/ai/agent/engine/WorkflowEngine.java

Co-authored-by: Alfonso Valdez <alfonso.altamirano@payara.fish>
…/ai/agent/engine/WorkflowEngine.java

Co-authored-by: Alfonso Valdez <alfonso.altamirano@payara.fish>
…/ai/agent/extension/AgenticAIExtension.java

Co-authored-by: Alfonso Valdez <alfonso.altamirano@payara.fish>
…-jakarta-agentic-ai-1-0-tck-support-in-payara-server
luiseufrasio and others added 19 commits July 8, 2026 11:49
StringBuffer is synchronized; StringBuilder is the correct choice for
single-threaded local usage. Matcher.appendReplacement/appendTail accept
StringBuilder since Java 9, and this project targets JDK 21.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…/ai/agent/cdi/WorkflowScopeContext.java

Co-authored-by: Alfonso Valdez <alfonso.altamirano@payara.fish>
…/ai/agent/engine/WorkflowEngine.java

Co-authored-by: Alfonso Valdez <alfonso.altamirano@payara.fish>
…/ai/agent/llm/AnthropicLlmBackend.java

Co-authored-by: Alfonso Valdez <alfonso.altamirano@payara.fish>
…/ai/agent/engine/WorkflowEngine.java

Co-authored-by: Alfonso Valdez <alfonso.altamirano@payara.fish>
…/ai/agent/engine/WorkflowEngine.java

Co-authored-by: Alfonso Valdez <alfonso.altamirano@payara.fish>
…-jakarta-agentic-ai-1-0-tck-support-in-payara-server
…ta-agentic-ai-1-0-tck-support-in-payara-server

FISH-13708 implement jakarta agentic ai 1 0 tck support in payara server
…to FISH-13709-create-agent-samples-with-jakarta-agentic-ai-on-payara-server
…mples-with-jakarta-agentic-ai-on-payara-server

FISH-13709 Add Jakarta Agentic AI samples (quickstart and tutorial generator)
Update the jakarta.agentic-ai-api dependency from 1.0.0-SNAPSHOT to the
released 1.0.0-M1 version available on Maven Central.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Point the Jakarta Agentic AI TCK stage at the EE11 branch of the
jakartaee-10-tck-runners repository.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant