{"slug": "tabforge-ai-a-complete-platform-for-building-java-web-ai-apps", "title": "TabForge AI: a complete platform for building Java Web + AI apps", "summary": "TabForge AI, a new platform for building AI-powered Java web applications on Jakarta EE and PrimeFaces, was released. It provides a multi-tab UI shell, a provider-agnostic AI layer built on LangChain4j, and features such as tool-calling agents, structured extraction, and proactive suggestions. The platform includes a library, live demo, starter project, and a drop-in UI template.", "body_md": "Modern AI UX — chat panels, tool-calling agents, assistants that remember context and even suggest your next step — has lived in JavaScript SaaS for years. The Java enterprise stack has been left doing it the hard way.\n\n**TabForge AI closes that gap**. It's a complete platform for building AI-powered web apps on Jakarta EE + PrimeFaces — from the multi-tab UI shell down to a clean, provider-agnostic AI layer. Library, live demo, starter project, and a drop-in UI template — all shipped.\n\nHere's the whole thing, top to bottom.\n\n## 1. Tabs as annotated beans — DynTabs\n\nYou describe a tab; the framework handles opening, closing, lifecycle, and state. Each open tab gets its own isolated CDI bean via a custom `@TabScoped`\n\nscope.\n\n```\n  @Named\n  @TabScoped\n  @DynTab(name = \"OrdersDynTab\", uniqueIdentifier = \"Orders\",\n          title = \"Orders\", includePage = \"/WEB-INF/orders.xhtml\",\n          trackActivity = true)\n  public class OrdersBean extends BaseDyntabCdiBean {\n      // open the same tab twice → two independent instances\n  }\n```\n\njava\n\nNo manual navigation, no page-state juggling. Open a tab, get a bean; close it, it's gone.\n\nOne fluent entry point over LangChain4j. Chat, tools, agents, and structured extraction — provider-agnostic, so the model behind it is a config detail.\n\n```\n  // A typed assistant with a business service exposed as tools\n  OrdersAssistant ai = EasyAI.assistant(OrdersAssistant.class)\n          .withTools(orderService)\n          .build();\n\n  String reply = ai.ask(\"cancel order ORD-002\");\n```\n\nYou opt methods in as tools explicitly — no accidental exposure:\n\n```\n  @EasyTool(\"Cancels an active order\")\n  public String cancelOrder(String orderId) { ... }\n```\n\nAgents are powerful but unpredictable. When you want a repeatable, testable process, flow() lets you own the steps and call the model only at the edges that actually need language:\n\n``` php\n EasyAI.flow()\n      .step(\"understand\", ctx -> EasyAI.extract(OrderRequest.class).from(ctx.inputText()))\n      .step(\"checkStock\", ctx -> inventory.check(ctx.get(\"understand\", OrderRequest.class)))\n      .step(\"place\",      ctx -> orders.place(ctx.get(\"understand\", OrderRequest.class)))\n      .build()\n      .run(userText);\n```\n\nYour logic stays in plain Java. The LLM does one job: turn language into structure.\n\nThe framework quietly records what the user does in the app — opening a record, running a search — and makes that timeline available to the assistant. So deixis just works:\n\n```\n  @ActivityTracked(type = BUSINESS_ACTION, verb = \"view\",\n                   entityType = \"order\", entityIdParams = \"orderId\")\n  public String viewOrder(String orderId) { ... }\n```\n\nNow the user can open an order and type \"cancel this\" — no id — and the assistant resolves \"this\" from what it just\n\nsaw them do.\n\nThis is the piece you normally only see in Copilot, Gmail's Smart Compose, or Notion AI — and almost never as a first-class pattern in a Java web framework.\n\nBuilt on Ambient Memory, the app can offer the next useful step before you ask. Open two orders for the same customer, and a dismissible chip appears: \"*Looking at several Acme orders — want a quick account summary?*\"\n\nThe important part: it's not a black-box agent watching you. A small, deterministic rule — plain Java you write and unit-test — decides if and what to suggest. The model only phrases the sentence.\n\n```\n  public interface SuggestionRule {\n      Optional<Suggestion> evaluate(List<UserActivityEvent> recent);\n  }\n```\n\nDetect synchronously (cheap, predictable), phrase-and-push asynchronously, with a per-user cooldown so it's helpful and never naggy. Deterministic code decides; the model is reserved for the one thing it's good at.\n\nA self-contained PrimeFaces template: responsive layout, light/dark/dim themes, a transport-agnostic AI panel (chat + live activity over SSE), a command palette, and now proactive suggestion chips. Drop-in — no build dependency.\n\nGetting started\n\nThe fastest path is the starter — a pre-wired WAR you clone and deploy. Or add the library to an existing Jakarta EE 11+ project:\n\n```\n  <dependency>\n      <groupId>io.github.tabforgeai</groupId>\n      <artifactId>tabforge-ai</artifactId>\n      <version>3.1.0</version>\n  </dependency>\n```\n\nChat- and tools-only apps stay lean; RAG and vector-store integrations are optional add-ons you pull in only if you use them.\n\nThe philosophy\n\nOne idea runs through all of it: let deterministic code decide, and reserve the model for the irreducible — language. That's what makes AI in a serious enterprise app predictable, testable, and safe.\n\nProactive UX just arrived, first-class, in the Java stack.\n\nThe library\n\n[demo app](https://github.com/tabforgeai/tabforge-ai-demo)\n\n[ready to use starter](https://github.com/tabforgeai/tabforge-ai-starter-)\n\n[See it in action](https://youtu.be/qNDD9mfFEJk)\n\nAll OpenSource", "url": "https://wpnews.pro/news/tabforge-ai-a-complete-platform-for-building-java-web-ai-apps", "canonical_source": "https://dev.to/java_freepascal_dev/tabforge-ai-a-complete-platform-for-building-java-web-ai-apps-4ian", "published_at": "2026-08-11 12:18:56+00:00", "updated_at": "2026-08-11 12:49:59.710058+00:00", "lang": "en", "topics": ["ai-tools", "ai-agents", "developer-tools", "artificial-intelligence"], "entities": ["TabForge AI", "Jakarta EE", "PrimeFaces", "LangChain4j", "EasyAI", "DynTabs", "Ambient Memory"], "alternates": {"html": "https://wpnews.pro/news/tabforge-ai-a-complete-platform-for-building-java-web-ai-apps", "markdown": "https://wpnews.pro/news/tabforge-ai-a-complete-platform-for-building-java-web-ai-apps.md", "text": "https://wpnews.pro/news/tabforge-ai-a-complete-platform-for-building-java-web-ai-apps.txt", "jsonld": "https://wpnews.pro/news/tabforge-ai-a-complete-platform-for-building-java-web-ai-apps.jsonld"}}