What's New in 4.0
What’s New in Atmosphere 4.0
Section titled “What’s New in Atmosphere 4.0”Atmosphere 4.0 is the JDK 21+ rewrite of the framework. The 4.0.0 release shipped the core platform migration (Jakarta EE 10, virtual threads, Jetty 12 / Tomcat 11, native image support, rooms, AI streaming SPI, MCP, TypeScript client). Since then the 4.0.x line has grown into a full multi-agent runtime — unified agent annotations, twelve pluggable AI runtimes, orchestration primitives, WebTransport/HTTP3, React Native support, and major compatibility refreshes.
The latest build tracks Spring Boot 4.0.6, Quarkus 3.36.0, Jackson 3.1.1, and atmosphere.js 5.0.24, and requires JDK 21 as a minimum.
This page is a highlights reel. For the per-patch history, see the CHANGELOG.
4.0.51 — MCP 2026-07-28 release candidate
Section titled “4.0.51 — MCP 2026-07-28 release candidate”Atmosphere’s MCP server now speaks the 2026-07-28 revision — the largest change to
the Model Context Protocol since launch — alongside the session-based protocol it
already supported (2024-11-05 through 2025-11-25). It is a stateless dialect chosen
per request, so every existing MCP client keeps working unchanged while new clients get:
- Stateless transport — no session id, no handshake; the server runs behind a plain round-robin load balancer with no session affinity.
- Operability —
Mcp-Method/Mcp-Namerouting headers, cacheabletools/list/resources/read(ttlMs,cacheScope), and W3C trace context bridged into OpenTelemetry. - Tasks extension — a
@McpTool(longRunning = true)call returns a handle the client polls viatasks/get; multi-round-trip lets the server ask for more input mid-call. - MCP Apps (SEP-1865) — a tool can ship a
ui://HTML UI that a host renders in a sandboxed iframe. The bundled console is a working host with a bidirectional App Bridge (apps call server tools through the host under governance; the host lists and calls the app’s own tools) and a separate-origin sandbox proxy for isolation. - Authorization — the server acts as an OAuth 2.0 Resource Server (RFC 9728 metadata +
WWW-Authenticate); a request authenticates via a configuredTokenValidatoroverAuthorization: Bearer, or a servlet filter’s principal (e.g. Spring Security). End-to-end tested on the embedded server, Spring Boot, and Quarkus (JVM).
The outbound atmosphere-mcp-client still tracks the official MCP Java SDK and negotiates
the session protocol; stateless client negotiation waits on upstream SDK support. See the
MCP reference.
4.0.50-SNAPSHOT — Code-as-action sandbox
Section titled “4.0.50-SNAPSHOT — Code-as-action sandbox”A model can now accomplish a task by writing code rather than negotiating
many fine-grained tool calls. The code_exec tool runs that code — bash,
JavaScript, or Python — in an isolated, ephemeral container and streams the
logs, exit code, and any screenshots back as observations, so the agent
iterates: write → run → observe → revise.
- Default-deny, container-isolated. Code execution is off unless
org.atmosphere.ai.code.enabled=true, and the tool is offered only when a container engine is confirmed present at runtime (not merely configured). Each session gets one ephemeral container —--network noneby default, non-root,--cap-drop ALL,no-new-privileges, read-only rootfs + a bounded writable workspace, with memory/cpu/pid caps — provisioned lazily and torn down on every terminal path (success, error, cancel, timeout). - Live in the Console. When
code_execis enabled the tool-loop ceiling lifts to many write→run→observe rounds, and each round streams an agent-step event plus any screenshots the code produced — rendered inline in the Atmosphere Console as you watch. spring-boot-browser-agentsample. The agent drives a headless browser with Playwright in the sandbox and streams the page screenshots back live (Cohere-backed; requires Docker).
Executing model-written code is the largest boundary Atmosphere exposes. It is opt-in, container-isolated, and default-deny — choose the network policy deliberately, pin the image, and size the resource caps before enabling it in production.
4.0.49-SNAPSHOT — Event-sourced coordination journal
Section titled “4.0.49-SNAPSHOT — Event-sourced coordination journal”The coordinator gains a full event-sourced runtime contract — every
CoordinationJournal event now carries causal lineage in an
EventEnvelope(eventId, parentEventId, event), and four additive primitives
let consumers project, persist, and branch coordinations without breaking
the existing journal surface.
- Causal lineage.
JournalingAgentFleetthreads parent IDs through everyparallel()/pipeline()/route()/proxy.call()dispatch path:CoordinationStarted→AgentDispatched→AgentCompleted/AgentFailed→AgentEvaluated. Legacyjournal.record(event)callers continue to work unchanged — events get wrapped as root envelopes with no parent. CoordinationProjection.from(journal, coordinationId). Pure read-only causal DAG built from the stored envelopes. Exposesroots(),children(eventId),walk(visitor),agents(),failedDispatches(),evaluations(). No execution, no LLM, no side effects — useful for debugging tools and post-hoc analysis.FileCoordinationJournal(Path). Append-only NDJSON file backend. One JSON object per line; replays onstart()into an in-memory index for queries; tolerates a truncated final line from a JVM kill mid-append; single-writer locked appends. Polymorphic ser/deser of the sealedCoordinationEventhierarchy via a Jackson 3 mix-in so the event records themselves stay annotation-free.CoordinationFork+ForkCreatedevent. What-if branching:fork.from(coordId, eventId).reason(...).with(altCall).execute(fleet)creates a new coordination, records aForkCreatedenvelope linking back to the parent event, and runs the alternate viaJournalingAgentFleet.withCoordinationId(...). The parent coordination is immutable; the fork is a peer with its own future.
Backed by 38 tests including a three-process integration test that runs a parallel coordination, replays from disk on restart, projects the DAG, forks an alternate, replays again, and verifies both branches survive. See the Coordinator reference for the full surface.
4.0.46-SNAPSHOT — Enterprise console + capability parity
Section titled “4.0.46-SNAPSHOT — Enterprise console + capability parity”The current development line closes the seven gist gaps that the
feat/ai-gap-fixes review flagged. Highlights:
- Spring AI Alibaba: unconditional
TOOL_CALLING/TOOL_APPROVAL/TOKEN_USAGE.UsageCapturingChatModelwraps the configured Spring AIChatModelbean at auto-configuration time; the per-thread accumulator capturesChatResponseMetadata.getUsage()across every step of the ReAct graph and emits oneTokenUsagerecord per dispatch. Tool calling is no longer gated onstaticChatModel != null—SpringAiAlibabaToolBridgeruns on every tool-bearing request. Token-basedAiBudgetbreaches now trip uniformly alongside wall-clock budgets. - RAG vector-store matrix. Three new direct connectors —
PgVectorContextProvider(JDBC + pgvector),QdrantContextProvider(REST),PineconeContextProvider(REST) — ship as zero-dep alternatives to the Spring AI / LangChain4j SPI bridges. See RAG reference for the full matrix including Weaviate, Milvus, Chroma, Elasticsearch, Redis Stack, MongoDB Atlas, OpenSearch, and Cassandra reachable via the bridges. - Workflow authoring inside the admin control plane. New
WorkflowManifest+WorkflowStoreSPI +WorkflowControllerplus a vanilla-JS authoring UI at/atmosphere/admin/workflow.html. Saves throughControlAuthorizer+ audit log; optimistic concurrency viaversionfield rejects stale writes with409. - Eval dashboard inside the admin control plane. New
EvalRun+EvalRunStoreSPI +EvalControllerplus dashboard UI at/atmosphere/admin/evals.htmlthat aggregates pass-rate perGoldenEvalBaselineand tabulates recent runs submitted by CI. atmosphere-admin-bundlesingle-dep aggregator. One Maven dependency pulls inspring-boot-starter+admin+ai+coordinator+agent+rag+checkpoint+durable-sessions, giving operators the dashboard, journal flow viewer, workflow authoring, eval dashboard, and governance decision viewer in a single drop-in artifact.- Five flagship templates promoted (
rag,ai-tools,guarded-agent,coding-agent,ms-governance) insamples/README.mdandcli/README.md— the canonical enterprise agent shapes most teams reach for first. docs/runtime-selection.mddecision tree. Question-by-question walkthrough for picking among the twelveAgentRuntimeadapters, mirrored on the website at Runtime Selection.
4.0.43 — 2026-05-06
Section titled “4.0.43 — 2026-05-06”- Cross-tab
@AiEndpointisolation fix —AiEndpointHandler.onRequestnow dispatches POST/frame prompts to the originating client only, routing viaSUSPENDED_ATMOSPHERE_RESOURCE_UUID(WebSocket) orX-Atmosphere-tracking-id(SSE / long-polling). Pre-fix, the handler calledbroadcaster.broadcast(msg)on the per-path broadcaster, so two open Console tabs each received both prompts. Pinned by 15 Playwright cases driving real Chromium with two browser contexts (every AI-shaped sample with a Console UI), plus contract tests inAiEndpointHandlerCrossTabIsolationTest. - Bundled Atmosphere Console auto-detects
aivs.broadcastmode —/api/console/infoadds amodefield and the Vue frontend swaps empty-state copy + default subtitle.@ManagedServicechats (spring-boot-mcp-server,spring-boot-otel-chat) now read “Multi-client broadcast chat” instead of borrowing the AI-assistant copy. Detection is class-name based (org.atmosphere.{ai,agent,coordinator}.*→ ai, everything else → broadcast) so it stays compile-time independent ofmodules/aiandmodules/agent. - Quarkus parity for
/api/console/info— newAtmosphereConsoleInfoServlet(registered viaregisterConsoleInfoServletbuild step inAtmosphereProcessor) gives Quarkus apps the samesubtitle / endpoint / runtime / modepayload Spring Boot apps get. Two new config keys —quarkus.atmosphere.console-subtitleandquarkus.atmosphere.console-endpoint— mirror the Spring side.
AI, Agents & Orchestration
Section titled “AI, Agents & Orchestration”@Agent + @Command — one annotation, every channel
Section titled “@Agent + @Command — one annotation, every channel”@Agentis the single entry point that wires@AiEndpoint, commands, tools, skill files, conversation memory, and multi-protocol exposure (MCP, A2A, AG-UI) based on classpath detection. Conversation memory is on by default. See @Agent.@Commanddefines slash commands once and routes them across Web (WebSocket), Slack, Telegram, Discord, WhatsApp, and Messenger whenatmosphere-channelsis on the classpath. Confirmation flow for destructive actions and auto-generated/helpare included.skill.mdfiles act as both the LLM system prompt and agent metadata. Sections like## Skills,## Tools,## Channels, and## Guardrailsare parsed into A2A Agent Cards, MCP tool manifests, and channel validation. See Skills.atmosphere-agentis the module hosting the annotation processor,CommandRouter,SkillFileParser, andAgentHandler.
AgentRuntime SPI — the Servlet model for AI agents
Section titled “AgentRuntime SPI — the Servlet model for AI agents”AgentRuntimereplaces the earlierAiSupportSPI. It dispatches the entire agent loop — tool calling, memory, RAG, retries — to whichever AI framework is on the classpath. Write your@Agentonce, run it on any runtime. Switch runtimes by changing a single Maven dependency.- Twelve runtimes share a unified capability baseline (text streaming,
structured output, progress events, conversation memory, per-request retry):
Built-in, LangChain4j, Spring AI, Google ADK, Embabel,
JetBrains Koog, Microsoft Semantic Kernel, Alibaba AgentScope,
Spring AI Alibaba, Anthropic, Cohere, and CrewAI
(CrewAI via an out-of-process Python sidecar, the first non-Java
adapter in the project). Tool calling now reaches all twelve runtimes —
each ships a dedicated tool bridge (
AgentScopeToolBridge,SpringAiAlibabaToolBridge, and the CrewAIToolCallbackServerclose the matrix) that routes every invocation throughToolExecutionHelper.executeWithApproval. The built-in runtime gained full OpenAI-compatible tool calling (max 5 rounds), so@AiToolworks with zero framework dependencies. - Auto-detection via
ServiceLoader— the highest-priority()runtime that reportsisAvailable()wins. The AI Console subtitle and/api/console/inforeport the active runtime. - Usage metadata (
ai.tokens.input,ai.tokens.output,ai.tokens.total) is reported by every runtime that exposes it, and flows intoMicrometerAiMetrics. AiCapabilitynegotiation —@AiEndpoint(requires = {TOOL_CALLING})fails fast at startup if the active runtime can’t satisfy required capabilities.
Orchestration primitives for multi-agent systems
Section titled “Orchestration primitives for multi-agent systems”@Coordinator+@Fleet+@AgentRef— declarative multi-agent coordinators. Parallel fan-out, sequential pipelines, optional agents, weighted routing, and circular-dependency detection are built in. See @Coordinator.AgentFleetAPI — injected into@Promptmethods.fleet.parallel(...)fans out concurrently;fleet.pipeline(...)chains sequentially. Results are returned asAgentResultrecords with text, metadata, duration, and success status.- Local + Remote transport — coordinators transparently call local agents via
direct invocation or remote agents via A2A JSON-RPC. The
AgentProxyabstraction hides the transport layer. - Agent handoffs —
session.handoff("billing", message)transfers a conversation with its full history, with a cycle guard and anAiEvent.Handoffemitted for observability. - Approval gates —
@RequiresApprovalparks the virtual thread until a client approves or denies the action via the/__approval/protocol. - Conditional routing —
fleet.route(result, spec)uses first-match evaluation with journal recording. - Long-term memory —
LongTermMemoryInterceptorwith pluggable extraction strategies (on-session-close, per-message, periodic). - Eval assertions —
LlmJudgeexposesmeetsIntent(),isGroundedIn(), andhasQuality()for LLM-as-judge testing.
Streaming, tools, and events
Section titled “Streaming, tools, and events”AiEventsealed interface — 15 structured event types (TextDelta,ToolStart,ToolResult,AgentStep,EntityStart,StructuredField,Handoff, and more) delivered viaStreamingSession.emit(), powering rich real-time UIs.@AiToolframework-agnostic tool calling — declare tools once with@AiTool/@Param, portable across every backend via bridge adapters (SpringAiToolBridge,LangChain4jToolBridge,AdkToolBridge,AtmosphereToolBridgefor Koog).ToolRegistry.execute(name, args, session)auto-emitsToolStart/ToolResultthrough the streaming session.- Per-endpoint model override —
@AiEndpoint(model = "gpt-4o")selects a model per endpoint without touching global config. - Multi-backend routing —
@AiEndpoint(fallbackStrategy = FAILOVER)wiresDefaultModelRouterfor failover, round-robin, or content-based routing. - Auto-detected
ConversationPersistence—conversationMemory = truediscovers Redis or SQLite backends viaServiceLoader; falls back to in-memory. - Memory strategies — pluggable
MemoryStrategySPI withMessageWindowStrategy,TokenWindowStrategy, andSummarizingStrategy. StructuredOutputParserSPI — generate JSON Schema instructions from Java classes, parse LLM output into typed objects.JacksonStructuredOutputParserworks with any model.- Enhanced RAG —
ContextProvider.transformQuery(),filter(),rerank(), andpostProcess()cover query rewriting, metadata/tenant filtering, result re-ranking, and final context shaping without a custom pipeline. Prompt injection usesContextProvider.formatCitation()so chunk metadata (source_document,chunk_index,chunk_start,chunk_end) is visible to the model;InMemoryContextProvidergives a zero-dependency provider for development. - First-class identity fields —
AiRequestcarriesuserId,sessionId,agentId, andconversationIdas explicit fields instead of an untypedhints()map. - AiMetrics SPI —
MetricsCapturingSessionrecords first-streaming-text latency, streaming text usage, and errors via a pluggable, ServiceLoader- discoveredAiMetricsinterface. - Cache replay coalescing — reconnecting clients receive coalesced missed streaming texts in a single batch.
- Streaming text budget management —
StreamingTextBudgetManagerenforces per-session and per-endpoint limits. - Cost metering UI — per-message cost badges in the chat frontend via
StreamingSessionrequest attributes. atmosphere-ai-test—AiTestClient,AiResponse, and fluentAiAssertionsfor testing AI endpoints in JUnit 5. See AI Testing.
Governance & Compliance
Section titled “Governance & Compliance”Introduced in 4.0.40. A declarative layer over the guardrail SPI plus the wire surfaces, samples, and CI gates that make it adoptable. See the governance reference for the full story.
Policy plane
Section titled “Policy plane”GovernancePolicySPI — admit / transform / deny vocabulary aligned with OPA/Rego and Microsoft Agent Governance Toolkit; stable identity (name/source/version) for audit-trail pinning.- YAML
PolicyParser(default) — dropatmosphere-policies.yamlon the classpath, restart, governance changes. Built-in types:pii-redaction,cost-ceiling,output-length-zscore,deny-list,allow-list,message-length,rate-limit,concurrency-limit,time-window,metadata-presence,authorization. SnakeYAML declared as an explicit runtime dep so bare-JVM and Quarkus deployments get the parser out-of-the-box. - Microsoft schema parity —
YamlPolicyParserauto-detects MS Agent Governance Toolkit YAML (top-levelrules:sequence) and produces anMsAgentOsPolicyhonoring all nine operators (eq/ne/gt/lt/gte/lte/in/contains/matches) and four actions (allow/deny/audit/block). Conformance tests load MS’s own examples byte-for-byte. - Optional plug-in parsers —
atmosphere-ai-policy-rego(OPA, shells toopa eval) andatmosphere-ai-policy-cedar(AWS, shells tocedar authorizeor plugs incedar-java).
Goal-hijacking prevention
Section titled “Goal-hijacking prevention”@AgentScopeannotation — declarative purpose + forbidden topics per@AiEndpoint. Three tiers: rule-based (sub-ms, ships with built-in hijacking probes for code / medical / legal / financial), embedding-similarity (default), and LLM-classifier (opt-in for high-stakes scopes). Breach behavior:POLITE_REDIRECT/DENY/CUSTOM_MESSAGE.- System-prompt hardening —
AiPipelineprepends an unbypassable scope-confinement preamble to everyexecute()call so a sample author can’t accidentally drop it. - Sample-hygiene CI lint —
SampleAgentScopeLintTestwalkssamples/and fails the build on any@AiEndpointor@Coordinatormissing@AgentScope(or lacking a non-blankjustificationwhenunrestricted = true). 12 existing endpoints retrofitted. ScopePolicy.postResponseCheck— re-classify the streamed response against the declared purpose; OUT_OF_SCOPE responses become Deny with apost-response:prefix.- Per-request scope install — interceptors can write a
ScopeConfigfor a single turn (one@AiEndpointhosts four classroom personas, each with its own scope).
Tool-call admission
Section titled “Tool-call admission”PolicyAdmissionGate.admitToolCall—ToolExecutionHelperconsults the gate on every@AiTooldispatch. The canonical MS rule{field: tool_name, operator: eq, value: drop_database, action: deny}fires before the executor runs. OWASP A02 (Tool Misuse): COVERED.
Plan-and-verify (atmosphere-verifier)
Section titled “Plan-and-verify (atmosphere-verifier)”- Static verification of LLM-emitted tool-call workflows — the LLM
emits a JSON workflow describing the entire intended sequence; a
deterministic verifier chain runs over the AST against a declarative
Policy; only verified plans dispatch. Atmosphere’s implementation of Erik Meijer’s Guardians of the Agents pattern (CACM, January 2026), modelled on the metareflection/guardians Python reference implementation. - Six built-in verifiers auto-discovered via
ServiceLoader:AllowlistVerifier(priority 10) catches deployment drift between policy and registry;WellFormednessVerifier(20) blocks forward binding references;CapabilityVerifier(25) enforces least-authority via@RequiresCapabilitygrants;TaintVerifier(30) refuses dataflow into@Sink-marked parameters incl. transitive flow;AutomatonVerifier(40) executes plans againstSecurityAutomatonsequences;SmtVerifier(200) proves numeric invariants over symbolic tool-call data flow via theSmtCheckerSPI — a real SMT backend ships asatmosphere-verifier-smt(SMTInterpol pure-JVM default, Z3 opt-in; the no-op default applies only when that module is absent). - Co-located policy —
@Sink(forbidden = {"fetch_emails"})on a tool parameter is the entire dataflow declaration;SinkScannerderives theTaintRuleat startup. Renaming a tool or parameter without updating both ends is impossible because the rule travels with the code. PlanAndVerifyorchestrator runs the runtime in plan mode (empty tool list, LLM emits JSON), parses viaWorkflowJsonParser, runs the verifier chain viaVerificationResult.merge, and dispatches viaWorkflowExecutoronly on green. Refusal throwsPlanVerificationExceptioncarrying the offending workflow plus the full violation list — and crucially, no tool fires on that path.verifyCLI — offline plan inspection against any policy JSON, exits 0/1/2 for shell pipelines and CI corpora.- Sample:
spring-boot-guarded-email-agentruns the canonical inbox-exfiltration scenario end-to-end; the malicious goal is refused with a typed taint violation onsteps[1].arguments.body. Spring Boot test + 6 Playwright e2e tests pin the headline guarantee.
Cross-runtime-adapter contract
Section titled “Cross-runtime-adapter contract”AbstractAgentRuntimeContractTest.policyDenyBlocksRuntimeExecuteis inherited by all twelve runtime adapters (Built-in, Spring AI, LangChain4j, ADK, Embabel, Koog, Semantic Kernel, AgentScope, Spring AI Alibaba, Anthropic, Cohere, CrewAI). The “deny before runtime” guarantee is a build-time invariant for each runtime adapter; a regression breaks the build, not production.
Commitment records
Section titled “Commitment records”- Ed25519-signed commitment records (
@Experimental) — extend W3C Verifiable Credentials + Google AP2 delegated-authority semantics to cross-agent dispatch logs. Emitted fromJournalingAgentFleetwhen a signer is installed. - Flag-off by default —
atmosphere.ai.governance.commitment-records.enabled=false. Schema is subject to revision while the W3C CCG / AP2 / Visa TAP standards-track convergence settles; opt-in operators acknowledge potential migration.
Compliance evidence
Section titled “Compliance evidence”- Self-assessment matrices — OWASP Agentic Top 10 (Dec 2025) plus
EU AI Act / HIPAA / SOC2 mappings live in
OwaspAgenticMatrixandComplianceMatrix. Each row carries evidence class, test class, and a consumer-grep pattern. EvidenceConsumerGrepPinTest— walkssrc/mainunder modules + samples and fails the build if any row claims coverage with no production consumer. No marketing-grade overclaim survives a CI run.agt verify-shaped JSON export atGET /api/admin/governance/agt-verify— wire-compatible with Microsoft Agent Compliance so cross-vendor compliance pipelines round-trip both.
Audit trail + persistent sinks
Section titled “Audit trail + persistent sinks”GovernanceDecisionLog— thread-safe ring buffer (default 500 entries) with redaction-safe context snapshots (truncated message, primitive-only metadata). Surfaced atGET /api/admin/governance/decisions.AuditSinkSPI +AsyncAuditSink— bounded drop-on-full queue so the admission thread never blocks on IO. Two reference modules ship:atmosphere-ai-audit-kafkaandatmosphere-ai-audit-postgres(JSONB on Postgres, CLOB elsewhere; works against anyDataSource). JSON shape matches MS Agent Governance Toolkit’saudit_entry.
Admin surfaces
Section titled “Admin surfaces”- 12 governance endpoints under
/api/admin/governance/— read endpoints (policies,summary,health,decisions,owasp,compliance,agt-verify,commitments) and write endpoints (check,reload,kill-switch/{arm,disarm}). - Triple-gate authorization — feature flag → Principal →
ControlAuthorizer. Spring Boot and Quarkus ship symmetric implementations; Quarkus adds a fourth principal source (constant-time-comparedX-Atmosphere-Authtoken) for ops tooling not yet on Jakarta Security. - Admin Console tabs — three Vue views (Policies, Decisions, OWASP) poll the read endpoints on live intervals; tabs auto-hide when governance is not installed.
Sample
Section titled “Sample”spring-boot-ms-governance-chat— chat gated by Microsoft Agent Governance Toolkit YAML, verbatim. Demonstrates 9 MS-schema rules (destructive SQL, legal/media/exec escalation, PII shapes, password disclosure, discount-limit enforcement) plus@AgentScopefor customer-support confinement.
Runtime & Transport
Section titled “Runtime & Transport”- WebTransport over HTTP/3 — Atmosphere now ships an HTTP/3 + WebTransport transport, sitting alongside WebSocket, SSE, long-polling, and gRPC on the same Broadcaster. See WebTransport Reference.
- gRPC transport — bidirectional streaming on the same Broadcaster as the classic transports.
- Virtual threads on by default —
ExecutorsFactoryusesExecutors.newVirtualThreadPerTaskExecutor(), andDefaultBroadcasterplus 16 other core classes migrated fromsynchronizedblocks toReentrantLockto avoid pinning. Opt out withApplicationConfig.USE_VIRTUAL_THREADS=false. - Rooms & presence —
RoomManagerwith join/leave, presence events, message history, AI virtual members, and a room protocol backed by sealed records (Join,Leave,Broadcast,Direct). RawMessageAPI — first-class public wrapper for pre-encoded messages that bypass@Messagedecoder/encoder pipelines, used by the room protocol to avoid JSON envelope mangling.ManagedAtmosphereHandler.Managedis deprecated in favor ofRawMessage.- Backpressure —
BackpressureInterceptorprotects against slow clients with a configurable high-water mark (default 1000 pending messages) anddrop-oldest,drop-newest, ordisconnectpolicies.
Cloud, Persistence & Observability
Section titled “Cloud, Persistence & Observability”- Clustering — Redis (Lettuce 6.x, non-blocking pub/sub) and Kafka broadcasters for multi-node deployments.
- Durable sessions — survive restarts with InMemory, SQLite, or Redis-backed
SessionStoreimplementations; room memberships and broadcaster subscriptions are restored on reconnection. - Micrometer metrics (
AtmosphereMetrics) — gauges, counters, and timers for active connections, broadcasters, broadcast latency, room-level gauges, cache hit/miss/eviction, and backpressure drop/disconnect. - OpenTelemetry tracing (
AtmosphereTracing) — per-request spans withatmosphere.resource.uuid,atmosphere.transport,atmosphere.action,atmosphere.broadcaster, andatmosphere.roomattributes. - Health check (
AtmosphereHealth) — framework-level snapshot exposed via the Spring Boot ActuatorAtmosphereHealthIndicator. - MDC interceptor — sets
atmosphere.uuid,atmosphere.transport, andatmosphere.broadcasterin the SLF4J MDC for structured logging. - Governance policy plane — declarative
GovernancePolicySPI layered on top ofAiGuardrail.YamlPolicyParserloads Atmosphere-native (policies:/type:) or Microsoft Agent Governance Toolkit (rules:/condition:) YAML verbatim — all nine MS operators and four actions ported faithfully, conformance pinned against MS’s own example YAMLs.PolicyAdmissionGateextends governance to non-pipeline code paths;GovernanceControllerexposes/api/admin/governance/policies,/summary, and a Microsoft-/check-compatible decision endpoint so external gateways (Envoy, Kong, Azure APIM) can point at Atmosphere as their policy provider without code changes. See Governance Policy Plane tutorial and reference.
Integrations
Section titled “Integrations”- Spring Boot 4.0.6 — auto-configuration, Actuator
health indicator (
AtmosphereHealthIndicator), and GraalVM AOT runtime hints (AtmosphereRuntimeHints). Spring Boot 4.0 is modularized, so the starter now depends explicitly onspring-boot-servlet,spring-boot-web-server, andspring-boot-healthwhere needed. The starter overrides the parent POM’s old SLF4J 1.x/Logback 1.2.x pins in<dependencies>so upgrades don’t regress. See Spring Boot Reference. - Quarkus 3.36.0 — build-time Jandex annotation scanning, Arc CDI
integration, custom
QuarkusJSR356AsyncSupport, and@BuildStep-driven native image registration viaquarkus.atmosphere.*properties. See Quarkus Reference. - Kotlin DSL —
atmosphere { ... }builder and coroutine extensions (broadcastSuspend,writeSuspend). Requires Kotlin 2.1+. atmosphere-channels— bridges@Agentto Slack, Telegram, Discord, WhatsApp, and Messenger with zero per-channel code.ChannelFilterchain for message processing, plus built-inMessageSplittingFilter(auto-truncates to channel max length) andAuditLoggingFilter.
MCP (Model Context Protocol)
Section titled “MCP (Model Context Protocol)”- MCP server — expose tools, resources, and prompt templates to AI agents
with
@McpTool/@McpResource/@McpPromptannotations on any class marked@Agent(there is no dedicated@McpServerannotation — the MCP module reuses@Agentfromatmosphere-agent). Supports Streamable HTTP (MCP 2025-11-25 spec), WebSocket, or SSE, with a stdio bridge for Claude Desktop and a programmaticMcpRegistryAPI. See MCP Reference. - OpenTelemetry tracing —
McpTracingauto-instruments tool, resource, and prompt calls with span propagation.
Client Libraries
Section titled “Client Libraries”- atmosphere.js 5.0.24 — TypeScript client with no runtime dependencies. ESM + CJS + IIFE bundles, WebSocket with configurable fallback to SSE, HTTP streaming, or long-polling. See atmosphere.js.
- React, Vue, Svelte hooks —
useAtmosphere,useRoom,usePresence,useStreaming, and AI-SDK-style chat state viauseChat/createChatStore. Shared chat components ship throughatmosphere.js/chat. - React Native / Expo —
useAtmosphereRN,useStreamingRN, anduseChatRNwith anEventSourcepolyfill, NetInfo injection, and markdown rendering for mobile AI chat. See React Native. - wAsync 4.0 — the Java client rewritten on
java.net.httpwith gRPC support. See Java Client.
Samples
Section titled “Samples”Atmosphere 4.0 ships with a wide set of runnable samples covering every
major feature area — real-time chat, AI streaming with multiple runtime adapters,
tool calling, multi-agent orchestration, MCP, RAG, clustering, durable
sessions, and channel integrations. The full catalogue lives at
samples/ on GitHub.
Highlights:
| Sample | Feature area |
|---|---|
spring-boot-ai-chat | Streaming AI chat via the AgentRuntime SPI (auto-selects runtime adapter) |
spring-boot-ai-tools | Portable @AiTool tool calling across all runtimes |
spring-boot-ai-classroom | Multi-room AI with a React Native / Expo client |
spring-boot-rag-chat | Retrieval-augmented generation with ContextProvider |
spring-boot-mcp-server | MCP server exposing tools, resources, and prompts |
spring-boot-a2a-agent | A2A protocol agent-to-agent communication |
spring-boot-agui-chat | AG-UI protocol with progressive UI streaming |
spring-boot-dentist-agent | Dr. Molar emergency dental agent with Slack + Telegram channels |
spring-boot-multi-agent-startup-team | @Coordinator multi-agent workflow |
spring-boot-checkpoint-agent | Durable HITL workflow with CheckpointStore |
spring-boot-orchestration-demo | Support desk with live handoff and @RequiresApproval |
spring-boot-durable-sessions | Session persistence across restarts |
spring-boot-channels-chat | Multi-channel (Slack/Telegram/Discord/WhatsApp/Messenger) chat |
spring-boot-otel-chat | OpenTelemetry tracing with Jaeger |
spring-boot-ms-governance-chat | Microsoft Agent Governance Toolkit demo with @AgentScope policy chain |
spring-boot-coding-agent | Sandboxed coding agent — clones a repo, reads files, proposes a patch |
spring-boot-browser-agent | Code-as-action agent — the model writes Playwright driving a headless browser in an isolated sandbox container; screenshots stream to the Console live (requires Docker) |
spring-boot-guarded-email-agent | Plan-and-Verify (atmosphere-verifier) inbox-exfiltration demo |
spring-boot-personal-assistant | Long-lived @Coordinator assistant with memory + delegation |
spring-boot-reattach-harness | Mid-stream reattach harness (@AiEndpoint reattach contract) |
quarkus-chat | Quarkus extension chat |
quarkus-ai-chat | Five @AiEndpoint demos on Quarkus + LangChain4j bridge (port 18810) |
spring-boot-chat | Real-time WebSocket chat with Spring Boot |
grpc-chat | Standalone gRPC transport |
chat | Classic Atmosphere chat (WAR deployment) |
embedded-jetty-websocket-chat | Embedded Jetty WebSocket chat (no framework) |
Developer Experience
Section titled “Developer Experience”- Architectural validation — CI gate detects NOOP/dead code, placeholder stubs, DI bypass, and fluent builder misuse via TOML-configured patterns.
atmosphere-generator— CLI scaffolding with--toolsflag to generate@AiToolmethods.- 24-chapter tutorial — the full tutorial book at Chapter 1: Introduction walks from “install the CLI” through AI, MCP, clustering, and multi-channel deployment.
Breaking Changes
Section titled “Breaking Changes”Heads up before you upgrade:
- Token → Streaming Text rename (4.0.11). Every AI API, javadoc entry, and
atmosphere.js client surface moved from “token” to “streaming text” to
describe LLM output chunks.
onToken→onStreamingText,totalTokens→totalStreamingTexts, and the wire protocol message type changed from"token"to"streaming-text". This is a breaking change for atmosphere.js consumers and customAiStreamBroadcastFilterimplementations. - Jackson 3.1.1 migration. The runtime now depends on Jackson 3.x, which
moved its packages from
com.fasterxml.jacksontotools.jackson. CustomJacksonEncoder/JacksonDecodersubclasses, any filters that constructObjectMapperdirectly, and any integration code importing fromcom.fasterxml.jackson.*need to be updated. AiSupport→AgentRuntime. Code that implemented the legacyAiSupportSPI should migrate toAgentRuntime. The capability baseline, tool calling, and usage metadata contracts are now unified across all twelve runtimes.- WebSocket HTML sanitization (4.0.11). HTML sanitization was disabled for
the WebSocket transport because encoding JSON in WebSocket frames broke the
AI streaming wire protocol. HTTP transports continue to sanitize write
methods, and cookies over HTTPS now default to
Secure. - JDK 21 minimum. No Java 8/11/17, no
javax.servlet, no legacy app servers (GlassFish 3/4, Jetty 6-11, Tomcat 6-10, WebLogic, JBoss AS 7, or Netty/Play/Vert.x integrations). - atmosphere.js package rename. The npm package is
atmosphere.js(no jQuery dependency). Update imports toimport { atmosphere } from 'atmosphere.js'.