AG-UI, Skills, MCP, Sandbox & OTel
OpenHusky's outer ring connects your core agent runtime to external protocols, domain instructions, isolated execution planes, and observability backends—all in pure JDK 21.
1. AG-UI v1.0 Streaming (openhusky-agui)
openhusky-agui adapts openhusky-core to the open AG-UI v1.0 protocol without Spring, Servlets, Netty, or Reactor.
<dependency>
<groupId>dev.openhusky</groupId>
<artifactId>openhusky-agui</artifactId>
<version>0.2.0</version>
</dependency>implementation("dev.openhusky:openhusky-agui:0.2.0")- Full 21-Event Model (
AgUiEvent):RUN_*,STEP_*,TEXT_MESSAGE_*,REASONING_*,TOOL_CALL_*,STATE_SNAPSHOT, RFC 6902STATE_DELTA,MESSAGES_SNAPSHOT, andCUSTOM(openhusky:tool_progress, approvals). - Container-Agnostic
AgUiRunner+AgUiApprovalBroker: Manages thread-keyed sessions, mid-runsteer(),abort(), andCompletableFuture-backed HITL approvals. - Built-in
AgUiJdkHttpHandler: Mounts directly ontocom.sun.net.httpserver.HttpServer(POST /run,/steer,/abort,/approve), with configurable heartbeats and client-disconnectAbortSignalpropagation.
2. Progressive Skills & AGENTS.md (openhusky-skills)
openhusky-skills implements the open agentskills.io SKILL.md specification and hierarchical AGENTS.md loading with zero SnakeYAML dependency.
<dependency>
<groupId>dev.openhusky</groupId>
<artifactId>openhusky-skills</artifactId>
<version>0.2.0</version>
</dependency>implementation("dev.openhusky:openhusky-skills:0.2.0")3-Stage Progressive Disclosure preserves prompt cache stability and avoids bloating system prompts:
<available_skills>compact XML catalog injected viaSkillContextComposerload_skill(readOnly = true,PARALLEL_SAFE) returns fullSKILL.mdinstructions + relative reference pathsread_skill_resource(readOnly = true,PARALLEL_SAFE) lazily loads UTF-8references/*.mdfiles with symlink/traversal guards
Sources include DirectorySkillSource, ClasspathSkillSource, and InMemorySkillSource (ideal for per-tenant SaaS SOPs).
3. MCP Client & Tool Bridge (openhusky-mcp)
openhusky-mcp implements the Model Context Protocol (2025-11-25) client over both Stdio (StdioMcpTransport) and Streamable HTTP (StreamableHttpMcpTransport with SSE, Mcp-Session-Id, HTTP 404 re-init, and OAuth 2.1 PKCE).
try (McpToolkit mcp = McpToolkit.fromJsonFile(Path.of("mcp.json"))) {
AgentRuntime runtime = AgentRuntime.builder()
.provider(provider)
.model(model)
.tools(mcp.tools())
.permissionPolicy(PermissionPolicy.failClosed()
.allow("mcp__weather__*")
.build())
.build();
}McpToolAdapter preserves multimodal ImageBlocks, structuredContent, progress tokens, and readOnlyHint -> ToolExecutionMode.PARALLEL_SAFE mapping.
4. Unified Sandbox Plane (openhusky-sandbox)
Decouple your agent's file and shell primitives ("Hand") across 5 isolation tiers (AgentSandbox):
| Tier | Implementation | Isolation | supportsExec() |
|---|---|---|---|
| L0 | InMemorySandbox | ConcurrentHashMap<String, byte[]> virtual workspace | false |
| L1 | LocalHostSandbox | Host directory (toRealPath() jail) + JDK 21 ProcessBuilder | true |
| L2 | LocalOsSandbox | Linux bubblewrap (bwrap) / macOS Seatbelt (sandbox-exec), fail-closed | true |
| L3 | DockerSandbox | Pure JDK 21 docker CLI lifecycle (zero docker-java/Netty) | true |
| L4 | Custom AgentSandbox | Cloud sandboxes (E2B, Modal, Daytona, Kubernetes Pods) | Implementation-defined |
SandboxToolkit.tools(sandbox) exposes read_file, glob_files, grep_files (PARALLEL_SAFE) and write_file, edit_file, shell_exec (SEQUENTIAL).
5. OpenTelemetry GenAI Tracing (openhusky-otel) v0.2.0
Availability
openhusky-otel is available on main and in the upcoming 0.2.0 release.
Instrument AgentRuntime in one call with zero OpenTelemetry contamination inside openhusky-core:
AgentRuntime.Builder builder = AgentRuntime.builder()
.provider(myProvider)
.model(myModel)
.toolsFrom(myTools);
OpenHuskyOtel.install(builder, GlobalOpenTelemetry.get(),
OpenHuskyOtelConfig.builder()
.agentName("support-desk")
.captureContent(false)
.build());
AgentRuntime runtime = builder.build();OpenHuskyOtel.install(...) records invoke_agent run spans, chat <model> step spans, and execute_tool <tool> spans—propagating parent context cleanly across virtual-thread parallel tools and nested SubagentTool delegations—plus lifecycle Span Events (CompactionApplied, SteeringApplied, ApprovalRequested, ApprovalResolved, DoomLoopDetected, ModelRetryScheduled).