> ## 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.

# Agent Client

> Portable Java API for autonomous CLI agents — Claude Code, Codex, Gemini, Amazon Q, and Amp

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

<Info>
  This project has moved from `spring-ai-community/agent-client` to
  `markpollack/agent-client`. The Maven groupId changed from
  `org.springaicommunity.agents` to `io.github.markpollack`.
</Info>

Portable Java API for autonomous CLI agents. No Spring Boot required — build a model, create a client, run a goal. Optional Spring Boot starters for auto-configuration.

Agent Client is the bridge between raw SDK calls ([Claude Agent SDK](/projects/claude-agent-sdk)) and higher-level orchestration ([Agent Workflow](/projects/agent-workflow)).

**Version 0.25.0** — [Maven Central](https://central.sonatype.com/search?q=g:io.github.markpollack+a:agent-client-core)

**0.25.0:** Fixes Spring Boot auto-configuration for all providers — the org migration had left the auto-config registration files pointing at the old `org.springaicommunity` package, so the starters failed to auto-configure (`ClassNotFoundException`) at boot. No public API changes.

**0.24.0:** Compatibility fix — `agent-claude` now builds against agent-journal 1.6.0, restoring Claude trace-wiring for Spring Boot consumers on agentworks-bom 1.12.0+ (journal 1.5.0 had relocated `TraceContentMode`). No public API changes.

**0.23.0 highlights:** Upgraded to Spring AI 2.0.0 GA on Spring Boot 4.0.7, clearing transitive Boot and Spring AI CVEs. Spring AI 2.0 moves to Jackson 3, so Jackson 2 usage is now declared explicitly. Default Gemini model is now `gemini-3.5-flash`. Still current from 0.21.0: portable reasoning effort (`low`/`medium`/`high`) via `AgentOptions.getEffort()`, with provider-native overrides for Claude (`--effort`, up to `max`) and Codex (`model_reasoning_effort`, up to `xhigh`). Dependency: `claude-code-sdk` 1.4.0.

## Architecture

Three layers, each usable independently:

| Layer                       | Module                                   | Framework Deps    |
| --------------------------- | ---------------------------------------- | ----------------- |
| **Core API**                | `agent-client-core`                      | None — plain Java |
| **Spring Boot Auto-Config** | `agent-client-spring-boot-autoconfigure` | Spring Boot       |
| **Starters**                | `agent-starter-claude`, etc.             | Spring Boot       |

```java theme={null}
// Plain Java — no Spring Boot needed
ClaudeAgentModel model = ClaudeAgentModel.builder()
    .defaultOptions(ClaudeAgentOptions.builder().yolo(true).build())
    .build();
AgentClient client = AgentClient.create(model);
AgentClientResponse response = client.run("Create hello.txt");
```

## Providers

Claude Code, Codex (OpenAI), Gemini CLI, Amazon Q, Amp. Provider selection at construction time — everything after `AgentClient.create(model)` is portable.

## LOOSE / STRICT Modes

`AgentClientMode` controls default permissiveness. LOOSE (default) bypasses sandbox restrictions and git checks for frictionless evaluation. STRICT requires explicit opt-in.

## Documentation

<CardGroup cols={2}>
  <Card title="Getting Started" icon="rocket" href="/docs/agent-client/howto/getting-started">
    Plain Java quick start — create your first agent task
  </Card>

  <Card title="Tutorial" icon="graduation-cap" href="/docs/agent-client/tutorial/index">
    Step-by-step lessons from first task to multi-provider
  </Card>

  <Card title="Claude Reference" icon="terminal" href="/docs/agent-client/reference/claude-reference">
    18 configuration options, trace files, authentication
  </Card>

  <Card title="Portable Options" icon="sliders" href="/docs/agent-client/reference/portable-options">
    Configuration precedence, LOOSE/STRICT modes
  </Card>
</CardGroup>

## Source

<Card title="GitHub" icon="github" href="https://github.com/markpollack/agent-client">
  Source code, examples, and getting started guide
</Card>

## Related

<CardGroup cols={2}>
  <Card title="Agent Sandbox" icon="shield" href="/projects/agent-sandbox">
    Isolated execution — local, Docker, or E2B cloud
  </Card>

  <Card title="Agent Workflow" icon="rotate" href="/projects/agent-workflow">
    Uses Agent Client for `ClaudeStep` and `AgentClientStep`
  </Card>
</CardGroup>
