Skip to content

OpenHuskyThe Durable, Embeddable Agent Runtime for Java

Pure Java 21 virtual-thread microkernel, streaming multi-provider LLM gateway, append-only tree sessions, steerable loop, fail-closed HITL permissions, and open protocol adapters (MCP, Skills, AG-UI).

OpenHusky Emblem
<dependency>
  <groupId>dev.openhusky</groupId>
  <artifactId>openhusky-core</artifactId>
  <version>0.1.0</version>
</dependency>
dev.openhusky:openhusky-core:0.1.0 (Maven Central · JDK 21+)·JDK 21+ · MIT License · Zero Spring lock-in
Real Java 21 API

Write your domain tools. Keep full runtime control.

No framework inheritance or proxy magic. Pure JDK 21 builders, records, and virtual threads.

OrderAgent.java
public class OrderTools {
    class=class="tok-str">"tok-ann">@Tool(name = class="tok-str">"lookup_order", description = class="tok-str">"Query order status",
          mode = ToolExecutionMode.PARALLEL_SAFE, readOnly = true)
    public ToolResult lookupOrder(
            ToolContext ctx,
            class=class="tok-str">"tok-ann">@ToolParam(name = class="tok-str">"orderId") String orderId) {
        ctx.emitProgress(class="tok-str">"Checking warehouse ledger for " + orderId);
        return ToolResult.ok(class="tok-str">"{\"orderId\":\"" + orderId + class="tok-str">"\",\"status\":\"SHIPPED\"}");
    }
}

try (SqliteSessionStore store = SqliteSessionStore.open(Path.of(class="tok-str">"sessions.db"));
     AgentRuntime runtime = AgentRuntime.builder()
             .llmClient(LlmClient.of(Providers.openai(System.getenv(class="tok-str">"OPENAI_API_KEY")))
                     .withInterceptor(RetryInterceptor.defaults()))
             .model(ModelCatalog.defaults().require(class="tok-str">"gpt-4.1"))
             .sessionStore(store)
             .toolsFrom(new OrderTools())
             .permissionPolicy(PermissionPolicy.failClosed()
                     .allow(class="tok-str">"lookup_order")
                     .requireApproval(class="tok-str">"refund_order")
                     .build())
             .approvalHandler((req, signal) -> ApprovalDecision.approveOnce())
             .build()) {

    AgentSession session = runtime.openSession(class="tok-str">"order-1042", Principal.of(class="tok-str">"buyer-42"));
    RunResult result = session.prompt(class="tok-str">"Check order #1042 and summarize delivery ETA.");
    System.out.println(result.finalText());
}
Pure Brain, Pluggable Hand · ArchUnit Enforced

Layered Microkernel Architecture

Every layer below the reference apps is independently consumable from Maven Central. Click any module to inspect its coordinates and APIs.

Live Interactive Portal · Zero-Key Offline & BYOK

Two Flagship Agents Running Live

Hosted on a pure JDK 21 virtual-thread server. Runs deterministically offline with zero API key, or switch to live LLM execution via in-browser BYOK.

Demo 01 · Live AG-UI State Sync

HuskyGear E-Commerce Copilot

10-SKU storefront synced in real time via AG-UI STATE_DELTA patches, parallel catalog/review/stock lookups, mid-run steering, HITL checkout, and typed ProductComparison matrices.

HuskyGear Pace Runner
Pace Carbon Runner
HG-RUN-PACE · $149
HuskyGear Studio ANC
Studio ANC Pro
HG-AUD-STUDIO · $229
HuskyGear Key80
Key80 Tactile
HG-DSK-KEY80 · $139
STATE_DELTA/storefront/cart → items: 2 · total: $378.00
PARALLEL_SAFE ToolsRFC 6902 STATE_DELTAMid-Run steer()HITL CheckoutTyped ProductComparison
Demo 02 · Multi-Tenant & Observability

Enterprise Support Desk

Switch live between NimbusCloud B2B and TrailPeak Retail tenants with strict 401/403 isolation, progressive Skills SOPs, supervisor HITL queue, cross-session memory, and OTel waterfalls.

Bearer nimbus-cloud:aliceBearer trail-peak:bobCross-Tenant → 403
invoke_agent support-desk
execute_tool load_skill
execute_tool issue_refund [HITL]
TENANT_ISOLATED Sessions401/403 Principal SPIProgressive SkillsMemory SidecarOTel GenAI Waterfall

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