> ## Documentation Index
> Fetch the complete documentation index at: https://lab.pollack.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Claude Agent SDK (Java)

> Java SDK for Claude Code CLI integration — three-API architecture, sessions, MCP, multi-agent orchestration

**[What's New →](/docs/claude-agent-sdk/whats-new)**

<Info>
  This project has moved from the `spring-ai-community` GitHub organization to
  `markpollack`. New releases are published under the Maven groupId
  `io.github.markpollack`, and Java packages now use the `io.github.markpollack`
  namespace. If you previously used `org.springaicommunity`, update your
  dependency coordinates and imports to the current values shown below.
</Info>

Java SDK for programmatic access to Claude Code. Three APIs at different abstraction levels: `Query` (one-liner fire-and-forget), `ClaudeSyncClient` (blocking sessions), and `ClaudeAsyncClient` (reactive with Project Reactor). Pure Java — no native dependencies. Full Spring Boot auto-configuration.

This is the SDK that powers `ClaudeStep` in [Agent Workflow](/projects/agent-workflow) — each step runs a full multi-turn Claude session internally.

**What's new in 1.4.0:** Bumps the MCP SDK from 0.15.0 to 2.0.0 (mcp-core 2.0.0), clearing CVE-2026-35568. Builds on 1.3.0, which aligned to Claude CLI 2.1.162 and added a lossless `rawJson` escape hatch on `ParsedMessage.RegularMessage`. See [What's New →](/docs/claude-agent-sdk/whats-new) for the full history.

## Tutorials

23 progressive modules from fundamentals to multi-agent orchestration:

<CardGroup cols={3}>
  <Card title="Query & Clients" icon="graduation-cap" href="https://github.com/markpollack/claude-agent-sdk-java-tutorial/tree/main/module-02-query-api">
    Query API, sync client, async client, message types
  </Card>

  <Card title="Configuration" icon="gear" href="https://github.com/markpollack/claude-agent-sdk-java-tutorial/tree/main/module-06-cli-options">
    CLI options, tool permissions, permission modes, structured outputs
  </Card>

  <Card title="Sessions" icon="comments" href="https://github.com/markpollack/claude-agent-sdk-java-tutorial/tree/main/module-10-multi-turn">
    Multi-turn conversations, session resume, session fork
  </Card>

  <Card title="Safety & Hooks" icon="shield" href="https://github.com/markpollack/claude-agent-sdk-java-tutorial/tree/main/module-14-permission-callbacks">
    Permission callbacks, pre/post tool-use hooks, interrupt handling
  </Card>

  <Card title="MCP Integration" icon="plug" href="https://github.com/markpollack/claude-agent-sdk-java-tutorial/tree/main/module-18-mcp-external">
    External MCP servers, multiple servers, MCP with hooks
  </Card>

  <Card title="Multi-Agent" icon="users" href="https://github.com/markpollack/claude-agent-sdk-java-tutorial/tree/main/module-21-subagents-intro">
    Subagent definitions, parallel subagents, orchestrator pattern
  </Card>
</CardGroup>

## Source

<CardGroup cols={2}>
  <Card title="SDK Source" icon="github" href="https://github.com/markpollack/claude-agent-sdk-java">
    SDK implementation
  </Card>

  <Card title="Tutorial Code" icon="github" href="https://github.com/markpollack/claude-agent-sdk-java-tutorial">
    23 runnable tutorial modules
  </Card>
</CardGroup>

## Role in the Lab

* **[Agent Workflow](/projects/agent-workflow)** uses `ClaudeStep` which wraps `ClaudeSyncClient` — each workflow step runs a full multi-turn Claude session
* **[Agent Client](/projects/agent-client)** uses the SDK for Claude Code integration with Spring Boot lifecycle and sandbox isolation
* All [experiments](/experiments/index) invoke Claude through this SDK via the experiment driver's `ClaudeSdkInvoker`
