README.md

August 4, 2026 · View on GitHub

Atmosphere

Atmosphere

The real-time engine for AI agents on the JVM. Tokens flow from the LLM runtime to the client through a broadcaster you can filter, gate, and observe — over WebSocket, SSE, long-polling, or gRPC, and out through MCP, A2A, and AG-UI. A plain @Agent is a full deep agent, batteries-included, and Atmosphere handles reconnect, authorization, and governance.

Maven Central npm CI: Core CI: E2E CI: atmosphere.js


Atmosphere is built for teams that need AI agents to behave like production services: streaming over real transports, guarded before every tool call, observable by tenant and run, and portable across AI frameworks without rewriting the endpoint.

Why Atmosphere

NeedWhat Atmosphere provides
Stream to real clientsWebSocket, SSE, long-polling, and gRPC run through one broadcaster pipeline as always-on defaults; WebTransport over HTTP/3 is optional
Swap AI integrationsOne AgentRuntime SPI with twelve runtime adapters and contract-tested capability flags
Ship a deep agentA plain @Agent is batteries-included — memory, a plan (write_todos), a virtual filesystem, and sub-agent delegation (task), on by default via the harness
Govern executionPolicy admission, @AgentScope, human approval, plan-and-verify, cost ceilings, PII rewriting, and admin kill switches
Pause for humansDurable HITL approvals hibernate without holding a thread, persist workflow state, and resume through REST approval surfaces
Resume long runsDurable sessions, run IDs, replay buffers, checkpoints, and reconnect-safe continuation
Observe and replayAn opt-in session tape records session-boundary AI events (SQLite-durable) — reconstruct a run or a coordination tree with no model call, then distill a smaller model from it
Expose the same agent everywhereBrowser endpoints plus MCP (stateless RC on the MCP 2026-07-28 spec, sessions back to 2024-11-05), A2A, AG-UI, Slack, Telegram, Discord, WhatsApp, and Messenger modules

Scope

Atmosphere is a real-time, event-driven framework, not an agent-hosting platform. We ship the primitives your application uses at runtime; the host you choose (Tomcat, Jetty, Netty, Undertow, Quarkus, Spring Boot, or any servlet container) owns compute and scheduling. Payment rails and commerce primitives are out of scope. Compared to the agent-platform stack vocabulary that has emerged around offerings like Cloudflare Agents, AWS Bedrock Agents, and Vertex AI Agents:

LayerWhat Atmosphere shipsProvided by your stack
Streaming transportatmosphere-runtime over WebSocket, SSE, long-polling (always-on defaults), gRPC, plus optional WebTransport/HTTP-3 (needs jetty-http3-server or reactor-netty-http on the classpath plus a dev cert)
Runtime dispatchatmosphere-ai AgentRuntime SPI + 12 adapters with contract-tested capability flagsModel hosting (we call providers; we do not host weights)
Orchestration@Coordinator, AgentFleet, handoffs, conditional routing, an event-sourced coordination journal with causal lineage, result evaluation, and durable hibernating Workflow<S> over CheckpointStore (Temporal-backed if you add atmosphere-checkpoint-temporal) — durable step execution, not wall-clock triggeringCron / wall-clock scheduling (your container scheduler or a dedicated scheduler fires the workflow)
MemoryAiConversationMemory per-conversation history and LongTermMemory per-user facts — in-memory, or durable SQLite/Redis via atmosphere-durable-sessions{-sqlite,-redis} — plus SemanticRecallInterceptor for BYO vector-store recallManaged vector stores (use Spring AI's VectorStore, LangChain4j embeddings, or your own)
GovernancePolicy admission, @AgentScope, plan-and-verify, PII redaction, cost ceilings, durable HITL approvals, admin kill switches
Protocol surfaceMCP, A2A, AG-UI, Slack/Telegram/Discord/WhatsApp/Messenger channel adapters
Code executionatmosphere-sandbox SandboxProvider SPI + DockerSandboxProvider defaultBrowser automation, headless Chromium
SDKatmosphere.js (React, Vue, Svelte, React Native, vanilla TS), wasync (JVM client)

The differentiator is the streaming + JVM + governance combination: long-lived stateful agent sessions over real-time transports, with policy admission on the critical path. For stateless, bursty, autonomous agents that should hibernate when idle, a serverless agent platform is usually the better fit. For human-in-the-loop, multi-channel, governed agents inside an existing JVM stack, Atmosphere is the right fit.

Quick Start

Run a sample

brew install Atmosphere/tap/atmosphere

# Or:
curl -fsSL https://raw.githubusercontent.com/Atmosphere/atmosphere/main/cli/install.sh | sh

atmosphere run spring-boot-multi-agent-startup-team

Create an app

atmosphere new my-agent --template ai-chat
cd my-agent
LLM_API_KEY=your-key ./mvnw spring-boot:run

Swap the runtime adapter

# Built-in is the default. --runtime spring-ai scaffolds the app against the
# Spring AI adapter instead (a CLI overlay injects its Maven dependencies).
atmosphere new my-agent --template ai-chat --runtime spring-ai

# Use --force when a sample already pins a runtime adapter.
atmosphere new my-agent --template ai-tools --runtime langchain4j --force

Import a skill

atmosphere import https://github.com/anthropics/skills/blob/main/skills/frontend-design/SKILL.md
cd frontend-design
LLM_API_KEY=your-key ./mvnw spring-boot:run

@Agent

One annotation declares the agent. Modules on the classpath decide which endpoints and integrations are registered.

@Agent(name = "my-agent", description = "What this agent does")
public class MyAgent {

    @Prompt
    public void onMessage(String message, StreamingSession session) {
        session.stream(message);
    }

    @Command(value = "/status", description = "Show status")
    public String status() {
        return "All systems operational";
    }

    @Command(value = "/reset", description = "Reset data",
             confirm = "This will delete all data. Are you sure?")
    public String reset() {
        return dataService.resetAll();
    }

    @AiTool(name = "lookup", description = "Look up data")
    public String lookup(@Param("query") String query) {
        return dataService.find(query);
    }
}
Module on classpathWhat gets registered
atmosphere-agentBrowser endpoint at /atmosphere/agent/my-agent, streaming AI dispatch, memory, commands, /help
atmosphere-mcpMCP endpoint at /atmosphere/agent/my-agent/mcp — session protocol plus the stateless RC on the MCP 2026-07-28 spec (Tasks, MCP Apps, OAuth resource server)
atmosphere-a2aA2A endpoint at /atmosphere/agent/my-agent/a2a with Agent Card discovery
atmosphere-aguiAG-UI endpoint at /atmosphere/agent/my-agent/agui
atmosphere-channelsSlack, Telegram, Discord, WhatsApp, and Messenger dispatch
atmosphere-adminAdmin dashboard and /api/admin/* control surfaces
built-in consoleConsole UI at /atmosphere/console/

Deep agents, batteries-included

A plain @Agent is a deep agent out of the box. The harness defaults to the full set, so a bare annotation already carries:

  • Memory — long-term facts recalled across sessions, plus conversation history with a compaction seam.
  • A plan it maintains — the built-in write_todos tool (or a runtime's native plan surface), streamed to the client as it changes.
  • A virtual filesystem — six bounded, conversation-scoped tools (ls, read_file, write_file, edit_file, glob, grep).
  • Sub-agent delegation — on a @Coordinator, delegate_task for pre-declared fleet members and task to spawn an ephemeral, isolated sub-agent on demand.
  • Prompt caching, skills, and large-tool-output disk offload — on by default, tuned by config.

Narrow the set per agent (@Agent(harness = {Harness.MEMORY})) or opt down to a bare loop (harness = {}); @AiEndpoint is opt-in. Every primitive reports its actual attached state at /api/console/info — runtime truth, never configuration intent. This is the same deep-agent capability set as LangChain deepagents, hosted by a JVM framework — see the comparison.

Terminology

TermMeaning in AtmosphereExamples
Model providerThe model/API vendor or endpoint that serves tokensOpenAI, Gemini compatibility endpoint, Ollama, DashScope, local OpenAI-compatible proxies
Runtime adapterThe Atmosphere integration that implements AgentRuntimeBuilt-in, Spring AI, LangChain4j, Google ADK, Embabel, Koog, Semantic Kernel, AgentScope, Spring AI Alibaba, Anthropic, Cohere, CrewAI
CapabilityA feature advertised by a runtime adapter and pinned by contract teststool calling, embeddings, streaming, structured output, prompt caching

Use provider for model vendors and runtime adapter for Atmosphere integrations. Not every runtime adapter exposes every capability.

AI Runtime Adapters

atmosphere-ai ships the AgentRuntime SPI plus the Built-in OpenAI-compatible adapter. Eleven additional adapters live in separate modules — nine wrap a third-party framework, and two (atmosphere-anthropic, atmosphere-cohere) are native HTTP+SSE clients for the Anthropic Messages API and the Cohere v2 chat API respectively. Drop one runtime adapter on the classpath and the same @Agent code dispatches through it.

Atmosphere does not replace these frameworks. You keep the native framework for what it does best — its models, tools, planners, memory, and vector stores — and Atmosphere adds the service layer around it: real-time transports, governance, HITL approval, durable sessions, replay, and MCP/A2A/AG-UI exposure. The adapter is a bridge, not a replacement; the Notes column below says which native framework each one is the best fit for.

Capabilities are intentionally not identical. The authoritative matrix is pinned by AbstractAgentRuntimeContractTest.expectedCapabilities(), so a runtime cannot drift from its declared feature set without breaking tests.

Runtime adapterBacking frameworkSpring BootCapability highlightsNotes
atmosphere-ai (Built-in)OpenAI-compatible HTTP client3.5 / 4.0tool calling, JSON mode, vision, audio, prompt caching, token usage, native retry, tool-call deltasDefault. Works with OpenAI-compatible endpoints such as OpenAI, Gemini compatibility endpoints, Ollama, and local proxies.
atmosphere-spring-aiSpring AI 2.0.04.0tool calling, structured output, vision, audio, prompt caching, token usageBest fit for Spring Boot applications already using Spring AI.
atmosphere-langchain4jLangChain4j 1.17.04.0tool calling, structured output, vision, audio, prompt caching, token usageBest fit for LangChain4j tool ecosystems and non-Spring services.
atmosphere-adkGoogle ADK 1.5.04.0agent orchestration, tool calling, multi-modal, prompt cachingMulti-agent runtime with AGENT_ORCHESTRATION.
atmosphere-koogJetBrains Koog 1.0.04.0agent orchestration, tool calling, multi-modal, prompt caching, cancellationMulti-agent runtime.
atmosphere-semantic-kernelMicrosoft Semantic Kernel 1.5.04.0tool calling, structured output, vision, token usageNo audio path through the SK Java SDK today.
atmosphere-agentscopeAlibaba AgentScope 1.0.124.0tool calling, structured output, vision, audio, conversation memory, token usage, cancellationAgentScopeToolBridge routes every @AiTool invocation through ToolExecutionHelper.executeWithApproval.
atmosphere-embabelEmbabel 0.5.03.5 onlyagent orchestration, tool calling, vision, conversation memoryRequires atmosphere-spring-boot3-starter and the -Pspring-boot3 profile.
atmosphere-spring-ai-alibabaSpring AI Alibaba 1.1.2.33.5 onlytool calling, structured output, vision, audio, conversation memory, token usageBuffered streaming (the upstream ReactAgent.call() returns one AssistantMessage); UsageCapturingChatModel decorator threads token usage. For token-by-token streaming, use another adapter until Alibaba ships a Spring AI 2.x-aligned agent framework.
atmosphere-anthropicAnthropic Messages API (no third-party SDK)3.5 / 4.0tool calling, structured output, conversation memory, token usage, per-request retryNative HTTP+SSE client; tool loop capped at five rounds, cancellation-aware. Configure via anthropic.api.key (system property or AiConfig.LlmSettings); custom headers (Helicone-Auth, tenant IDs, tracing) are passthrough with reserved-header filtering.
atmosphere-cohereCohere v2 chat API (no third-party SDK)3.5 / 4.0tool calling, structured output, vision, multi-modal, conversation memory, token usage, per-request retryNative HTTP+SSE client against POST /v2/chat; tool dispatch routes through ToolExecutionHelper.executeWithApproval. Configure via cohere.api.key (system property or AiConfig.LlmSettings).
atmosphere-crewaiCrewAI 1.14+ sidecar bridge3.5 / 4.0agent orchestration, tool calling, structured output, token usage, cancellationJava HTTP+SSE bridge to a Python CrewAI sidecar. Availability is gated by a live /health probe, not classpath presence.

See the full capability matrix for text streaming, tool calling, structured output, system prompts, agent orchestration, conversation memory, tool approval, vision, audio, multi-modal, prompt caching, token usage, retry, passivation, and tool-call deltas.

Enterprise Controls

Atmosphere keeps governance on the critical path rather than as an afterthought.

ControlModuleWhat it does
Policy admissionatmosphere-aiGovernancePolicy, PolicyRing, allow/deny lists, rate limits, time windows, metadata requirements
Scope enforcementatmosphere-ai@AgentScope blocks out-of-purpose prompts before runtime dispatch
Human approvalatmosphere-agent, atmosphere-aicommand confirmations, permission modes, tool approval policies
Durable HITL workflowsatmosphere-checkpoint, atmosphere-durable-sessionscheckpointed approval gates, REST approve/reject/resume endpoints, and reconnect-safe replay for long-running agent work
Stateful interactionsatmosphere-interactionsstateful agent turns with a durable steps[] log, background runs retrievable after disconnect, conversation chaining via previous_interaction_id, and live step streaming over WebSocket; REST surface at /api/interactions (mutations default-deny)
Plan-and-verifyatmosphere-verifierverifies LLM-emitted tool workflows before execution; six structural verifiers run today (control-flow gate, allowlist, well-formedness, capability, taint, automaton); a seventh SMT backend ships as atmosphere-verifier-smt (SMTInterpol pure-JVM default, Z3 opt-in via native libs) proving numeric invariants over symbolic tool-call data flow; the no-op default applies only when that module is absent. It implements Erik Meijer's Guardians of the Agents (CACM, Jan 2026) pattern in native Java
PII and cost controlsatmosphere-aistream-level PII redaction, token usage, per-tenant cost ceilings
Admin control planeatmosphere-admindashboard, REST/MCP control surfaces, kill switches, journal flow viewer, governance decisions, workflow authoring UI (authoring + persistence; manifest execution runtime not yet wired), eval dashboard
Enterprise console bundleatmosphere-admin-bundlesingle Maven dep aggregating spring-boot-starter + admin + ai + coordinator + agent + rag + checkpoint + durable-sessions
Compliance evidenceatmosphere-ai, atmosphere-adminOWASP Agentic Top 10, EU AI Act, HIPAA, SOC 2 matrices, admin-console evidence views, and AGT-compatible verification output
Sandbox executionatmosphere-sandboxDockerSandboxProvider default and SandboxProvider SPI for isolated code execution

Governance policy can be YAML-driven:

version: "1.0"
policies:
  - name: deny-destructive-sql
    type: deny-list
    config:
      phrases: ["DROP TABLE", "TRUNCATE", "DELETE FROM"]
  - name: tenant-cost-ceiling
    type: cost-ceiling
    config:
      ceilingDollars: 50.0

Or annotation-driven:

@AiEndpoint(path = "/support")
@AgentScope(
    purpose = "Customer support: orders, billing, store hours",
    forbiddenTopics = {"code", "programming", "medical advice"},
    onBreach = AgentScope.Breach.POLITE_REDIRECT)
public class SupportAgent { /* @Prompt method */ }

See the governance policy plane reference, governance docs, and spring-boot-ms-governance-chat sample.

Client Libraries

Install the TypeScript client:

npm install atmosphere.js

Use React, Vue, Svelte, React Native, or the low-level client directly:

import { useStreaming } from 'atmosphere.js/react';

function Chat() {
  const { fullText, isStreaming, send } = useStreaming({
    request: {
      url: '/atmosphere/agent/my-agent',
      transport: 'webtransport',
      fallbackTransport: 'websocket',
    },
  });

  return <p>{fullText}</p>;
}

For Java/Kotlin clients, use wAsync for async WebSocket, SSE, long-polling, and gRPC clients.

Flagship Samples

SampleShows
startup team@Coordinator with A2A specialists, governance, checkpoints, skills, admin control plane
ai-chatStreaming AI chat with auth, caching, and runtime adapter portability
ai-toolsFramework-agnostic @AiTool methods and approval gates
checkpoint-agentCheckpointed @Coordinator workflow with REST approval/resume
ai-classroomMulti-room collaborative AI with React Native / Expo client
guarded-email-agentPlan-and-verify taint protection before any email tool fires
ms-governance-chatMicrosoft Agent Governance Toolkit-compatible YAML and decision endpoint
mcp-serverMCP tools, resources, prompts, and an MCP App (SEP-1865) with a bidirectional bridge, rendered in the console
rag-chatRetrieval-augmented generation with ContextProvider
channels-chatSlack, Telegram, Discord, WhatsApp, and Messenger channel dispatch
coding-agentDocker sandbox provider for clone/read/stream coding workflows

All samples · cli/samples.json · atmosphere install for the interactive picker.

Add Atmosphere to an App

<!-- Spring Boot 4.0 starter -->
<dependency>
    <groupId>org.atmosphere</groupId>
    <artifactId>atmosphere-spring-boot-starter</artifactId>
    <version>${atmosphere.version}</version>
</dependency>

<!-- Agent module: @Agent, @Prompt, @Command, @AiTool -->
<dependency>
    <groupId>org.atmosphere</groupId>
    <artifactId>atmosphere-agent</artifactId>
    <version>${atmosphere.version}</version>
</dependency>

Add only what you need:

For Spring Boot 3.5 deployments, including Embabel or Spring AI Alibaba, use atmosphere-spring-boot3-starter and build with -Pspring-boot3.

Requirements: Java 21+ · Spring Boot 4.0.7 or Spring Boot 3.5 via -Pspring-boot3 · Quarkus 3.36.3+ · current release from the Maven Central badge above.

Documentation

Tutorial · Full docs · CLI · Javadoc · Samples

TopicReference docs
Architecture & transportsArchitecture · Transports · Broadcaster · WebTransport · Clustering
AI runtimesAI adapters · Runtime selection · AI reference
Agents & protocols@Agent · MCP · A2A · AG-UI · Coordinator · Channels
Governance & verificationGovernance · Agent scope · Plan-and-verify (Meijer) · Tool approval · OWASP Agentic matrix
Durability & stateDurable sessions · Durable HITL · Checkpoints · Interactions
OperationsAdmin & control plane · Observability · Benchmarks
ClientsJavaScript · React Native · Java / wAsync

Commercial Support

Production support tiers, compliance attestation, Microsoft Agent Governance Toolkit interop, plan-and-verify adoption, A2A v1.0.0 alignment, and legacy Atmosphere 2.x / 3.x long-term support are available from Async-IO. Book a 30-minute architecture call: async-io.live/contact.

Companion Projects

ProjectDescription
atmosphere-skillsCurated agent skill files: personality, tools, guardrails
homebrew-tapHomebrew formulae for the Atmosphere CLI

License

Apache 2.0 - Copyright 2008-2026 Async-IO.org