Skip to content

Framework Comparison & Adoption Guide ​

The JVM ecosystem already provides capable LLM client libraries such as Spring AI, LangChain4j, and Google ADK (Java). OpenHusky targets a distinct architectural layer: a framework-agnostic, embeddable Agent Runtime microkernel designed for stateful, steerable, fail-closed agent execution on Java 21 Virtual Threads.


Objective Architecture Comparison ​

CapabilityOpenHusky (0.3.0)Spring AILangChain4jGoogle ADK (Java)
Primary Architectural RoleEmbeddable Agent Runtime microkernel (durable loop, live control, permissions, sandboxes, protocols)Spring-native AI integration layer (ChatClient, Advisors, VectorStore, Boot Starters)LLM / RAG / AiServices toolkit and model/embedding ecosystemAgent orchestration SDK aligned with Gemini & Google Cloud workflows
Framework CouplingZero in core, AI gateway, session, and protocol modules (ArchUnit-enforced) + optional openhusky-spring-boot-starterTightly coupled to Spring Framework / Spring BootLightweight core with dedicated Spring Boot / Quarkus integrationsIndependent Java SDK (RxJava / Vert.x / Spring integrations vary by module)
Concurrency ModelNative JDK 21 Virtual Threads with ReentrantLock I/O guards and explicit ToolContext / AbortSignalServlet / WebFlux (Flux) depending on stackSynchronous / streaming callbacks (TokenStream)Reactive / async flow abstractions
Session Persistence ModelEvent-sourced append-only tree (fork, rewindTo, StatePatchEntry, cut-point-safe compaction)Flat ChatMemory message listFlat ChatMemory message listSessionService (in-memory / DB event list)
Mid-Run Control (steer / followUp / abort)First-class dual-queue control at tool boundaries + cooperative AbortSignalNot built-inNot built-inInterrupts via callback / runner controls
Tool Authorization & HITLFail-closed PermissionPolicy + race-free ApprovalDecision.Handler + AG-UI /approve brokerManual / custom AdvisorsManual / custom interceptorsCallback / tool confirmation hooks
Multi-Tenant IsolationBuilt-in Principal(id, tenantId) + SessionAccessPolicy (TENANT_ISOLATED default) + HTTP 401/403 SPIApplication-managedApplication-managedApp / user / session scoping
Streaming UI ProtocolNative AG-UI v1.0 SSE + RFC 6902 STATE_DELTA + progress eventsCustom SSE / FluxTokenStream (custom schema)ADK Web / SSE event stream
Execution Sandbox PlaneBuilt-in L0–L4 AgentSandbox (InMemory, LocalHost, LocalOs bwrap/Seatbelt, Docker)External / customExternal / custom (CodeExecutionEngine)Container / code executor plugins
Agent Skills (agentskills.io)Native 3-stage progressive SKILL.md + AGENTS.md loaderNot built-inNot built-inNot built-in
MCP ClientNative MCP 2025-11-25 (Stdio & Streamable HTTP, OAuth 2.1 PKCE)Supported (via MCP Java SDK)SupportedSupported (MCPToolset)
RAG / Vector StoresIntentionally outside core (expose any retriever as a PARALLEL_SAFE @Tool)Rich built-in VectorStore ecosystemRich built-in EmbeddingStore ecosystemRetrieval tools / Vertex RAG

Decision Guide ​

When OpenHusky Is the Best Fit ​

Choose OpenHusky when building interactive, stateful, multi-step AI agents with strict operational guarantees:

  • Live user intervention: Callers need to redirect (steer()), queue (followUp()), or cancel (abort()) an active agent mid-run while preserving valid tool-call history.
  • High-stakes actions & compliance: Financial transactions, refunds, workspace edits, or external mutations require fail-closed allowlists, audit trails, and interactive HITL approvals.
  • Multi-tenant B2B / SaaS: Shared deployments require enforced tenant boundaries across persistence, tool injection (Principal), and HTTP endpoints (401/403).
  • Branching, compaction & observability: You require non-destructive fork() / rewindTo(), cut-point-safe compaction, and OpenTelemetry GenAI spans across virtual threads.
  • Framework freedom: You want one runtime core that embeds cleanly into Spring Boot, Micronaut, Quarkus, Ktor, Vert.x, or standalone JDK 21 services without Reactor/Netty dependency conflicts.

When Spring AI or LangChain4j May Fit Better ​

Choose Spring AI or LangChain4j as your primary library when:

  • Your workload consists of stateless single-turn completions, document ingestion, or RAG pipelines where a broad catalog of VectorStore / EmbeddingStore integrations is the main requirement.
  • You prefer Spring's ChatClient Advisor pipeline and do not need tree-structured sessions, mid-run steering, execution sandboxes, or AG-UI state deltas.

Hybrid Architecture Patterns ​

OpenHusky is explicitly designed to compose with existing Spring Boot infrastructure and vector databases:

  1. OpenHusky + Spring Boot 3.4+: Use openhusky-bom and openhusky-spring-boot-starter (0.3.0) to expose @OpenHuskyTools beans (with @Transactional / @Cacheable AOP proxies preserved) and Spring MVC AG-UI SSE endpoints. See Embedding in Spring Boot.
  2. OpenHusky + Existing VectorStore / RAG: Retain your Spring AI VectorStore, LangChain4j EmbeddingStore, or PostgreSQL pgvector / Elasticsearch retriever and expose it as a ToolExecutionMode.PARALLEL_SAFE, readOnly = true @Tool method. OpenHusky governs the agent loop, authorization, context compaction, and streaming while your retriever executes hybrid search.

Released under the MIT License. Built with Java 21 Virtual Threads.