Skip to main content
This project has moved to markpollack/claude-agent-sdk-java. Current documentation is at lab.pollack.ai/projects/claude-agent-sdk. The content below may be outdated.
A Java SDK for integrating with Claude Code CLI, enabling programmatic control of Claude as an AI coding agent.

Overview

The Claude Agent SDK allows Java applications to:
  • Execute queries and receive responses from Claude
  • Maintain multi-turn conversation sessions
  • Control tool permissions and safety settings
  • Integrate with MCP (Model Context Protocol) servers
  • Intercept and customize tool execution with hooks

Three-API Architecture

Both ClaudeSyncClient and ClaudeAsyncClient support the full feature set: multi-turn conversations, hooks, MCP integration, and permission callbacks. They differ only in programming paradigm (blocking vs non-blocking).

Quick Start

Add the dependency to your project:

Simple Query

Multi-Turn Conversation

Both clients support multi-turn conversations with full context preservation. Choose based on your programming paradigm preference:

Documentation

API Reference

Complete API documentation for all classes, methods, and types

Tutorial

Step-by-step guide from basics to advanced patterns

Resources