Upgrade to Pro — share decks privately, control downloads, hide ads and more …

System Architecture in the AI Era - Devoxx Pola...

Sponsored · SiteGround - Reliable hosting with speed, security, and support you can count on.

System Architecture in the AI Era - Devoxx Poland 2026

Generating code has never been easier, but engineering a production-ready system remains hard. Surviving the clash with real users, strict budgets, compliance regulations, security risks and performance requirements demands more than just effective prompting—especially when AI stops being just a tool in your IDE and becomes a component in your architecture.

Join this session for an architect’s deep dive into the dual challenge of the AI revolution: building with AI and building for AI.

We will discuss the importance of engineering best practices in an era where more code is generated for us, shifting our role towards "architects of intent”. We’ll tackle the rise of agentic systems, manage the friction where deterministic logic meets probabilistic models, and redefine classic architectural quality attributes for the modern, AI-infused stack. All of this will be grounded in real-world examples leveraging low-level technologies and frameworks within the JVM ecosystem.

Avatar for Piotr Łaskawiec

Piotr Łaskawiec

June 21, 2026

More Decks by Piotr Łaskawiec

Other Decks in Programming

Transcript

  1. • Pragmatic Software Architect • Creating software for nearly 20

    years • Founder of • Helping companies to deliver real value • Occasional speaker and trainer @piotrl a sk a wiec @piotrl a sk a wiec.bsky.soci a l COMSENITY LET'S CONNECT Prompt: „Describe me in 5 concise bullet points” COMSENITY
  2. - Andrej Karpathy „You can outsource your thinking but you

    can't outsource your understanding.”
  3. AI

  4. Fuel for the machine • Architecture Decision Records (ADRs) •

    Di a gr a ms a nd context • Speci f ic a tions • AGENTS.md • Never trust, a lw a ys verify • ArchUnit • Fitness functions
  5. Completion REST API Prompt Roles User/System Not st a nd

    a rdized St a teless Ch a t Memory Structured Output Pre-tr a ined System Inter a ctions Context D a t a V a rious Input Types V a rious Output Types Request/Response Stre a ming Fr a mework Integr a tion Observ a bility Test a bility … Security
  6. • From pre- f in a l in 2025 to

    st a ble 1.1.8, 2.0.0 • Deep integr a tion with Spring ecosystem • Out-of-the-box support for building MCP servers • Spring AI Community GitHub org a niz a tion • Agents, Skills, gu a rdr a ils (vi a a dvisors) LangChain4j • From pre- f in a l in M a y 2025 to st a ble 1.16.2 • Spring Boot, Qu a rkus, Helidon integr a tions • Focused on MCP client-side, possible e.g. vi a Qu a rkus MCP Server • L a ngCh a in4j Community • Agents, Skills, gu a rdr a ils, E a syRAG
  7. • Don a ted to the Agentic AI Found a

    tion (hosted by the Linux Found a tion) • ~9400 public MCP servers a s of April 2026 (~1200 in Q1 2025) • 78% of enterprise AI te a ms report a t le a st one MCP-b a cked a gent in production • 41% of enterprise AI te a ms h a ve a t le a st one custom intern a l MCP server • MCP Register, MCP Bundles, MCP Apps… • 2 m a jor spec revisions since M a y 2025 (June a nd November 2025) • Structure tool output • Elicit a tion • OAuth overh a ul (MCP servers a re now OAuth Resource Servers) + OpenID Connect Discovery • T a sks (still experiment a l) Source of st a ts: https://www.digit a l a pplied.com/blog/mcp- a doption-st a tistics-2026-model-context-protocol
  8. • C a p a bilities • Resources - generic

    text/bin a ry d a t a ( f ile content, API responses, UI etc.) • Tools - execut a ble function a lities • Prompts - reus a ble templ a tes for users • Elicit a tion (new) - servers c a n p a use a nd a sk the user for missing input mid-c a ll • T a sks (new) - c a ll now, fetch l a ter - a sync h a ndles for long-running server work • S a mpling - f lips the f low - MCP server a sks the client's LLM for a completion, with the hum a n in the loop • Tr a nsports • Stdio • Stre a m a ble HTTP (new) • HTTP/SSE (leg a cy) • D a t a form a t - JSON-RPC 2.0
  9. Let LLM do the job Agentic AI • Agentic AI

    softw a re - pursue complex go a ls with a high level of a utonomy • Orchestr a tion str a tegies: • Work f low - LLMs a nd Tools a re progr a mm a tic a lly orchestr a ted (well-de f ined control f low) • P a tterns: sequenti a l, loop, p a r a llel, condition a l • „Predict a ble” output, e a sier to test, f its for well-de f ined t a sks, less f lexible • Pure Agents - LLMs fully control the f low • LLM is responsible for choosing how to solve a given problem using a v a il a ble tools • Flexible, even less predict a ble, h a rder to control
  10. Hype is loud. Production is harder. Agentic AI in 2026

    - Reality Check • 72% of enterprises a re a lre a dy using or testing AI a gents • 17% of org a niz a tions h a ve deployed AI a gents to prod, 60%+ pl a n to within two ye a rs • 46% s a y the #1 ch a llenge isn't model intelligence - it's integr a tion with existing systems • 38% still keep hum a ns-in-the-loop a s the def a ult control p a ttern Source of st a ts: G a rtner Hype Cycle for Agentic AI 2026 · Z a pier St a te of Agentic AI Adoption 2026 · 2026 St a te of AI Agents Report · Snyk 2026 St a te of Agentic AI Adoption
  11. Journey in the search of complexity Monoliths Microservices Modul a

    r Monoliths Non- Deterministic Interconnected Agents Too E a sy Too H a rd Too E a sy
  12. Agentic Frameworks Spring AI LLM-driven, Work f low P a

    tterns L a ngCh a in4j LLM-driven, Work f low P a tterns L a ngGr a ph4j Cyclic a l St a teful Gr a phs Google ADK LLM-driven, Hier a rchic a l Work f low/LLM Agents Emb a bel Go a l-Oriented Action Pl a nning (GOAP) a nd Observe-Orient-Decide-Act (OODA) Loop Koog LLM-driven, GOAP pl a nning, Finite St a te M a chines (FSMs)
  13. Security • Att a cks • Prompt Injection • Prompt

    Le a king • J a ilbre a king • DoS • Defense is in your h a nds • Gu a rdr a ils
  14. Access to Sensitive Data Exposure to Untrusted Content Ability to

    Externally Communicate Vulnerability Lethal Trifecta
  15. Performance • Perform a nce-Oriented Prompt Engineering (sic!) • SLAs

    in non-deterministic world m a y be h a rd to re a ch • Lot of moving p a rts
  16. Testability • Simple checks • All required inform a tion

    provided in the a nswer • Proper tools were invoked • Token counts • How to test something th a t is inherently not deterministic? • M a ke it more deterministic • Fight f ire with f ire - AI Model Ev a lu a tion - LLM- a s- a -Judge
  17. Correctness • H a llucin a tions • Writing a

    good prompt is a n a rt • Provide qu a lity context to the model • Retries • Rollb a cks (Compens a ting Actions) • HITL (Hum a n in the Loop)
  18. Observability • Support for metrics a nd tr a ces

    (Sem a ntic Tr a ces) • Follows OTel „Sem a ntic conventions for gener a tive AI systems” (still in development) • Cost-control