Agents can delegate to typed subagents and run across several machines, credentials are secrets, and the Kotlin API is on Maven Central for the first time.
What is new
- Subagents:
TypedAgent[I, O]specialists offered throughAgentBuilder.withSubagents, each in its own child thread with a token budget, supervision, cancellation with its parent and nested streams (#2044). The delegation guide walks through them. - Agents across machines:
PostgresCheckpointershares threads between runtimes, a durable run queue andAgentWorkertake and recover runs, and each run is one OpenTelemetry trace (#2129); see several machines. - Credentials and data protection: credentials are
Secrets, a key can come from a file (apiKeyFile) or anApiKeyProvider, and console and OpenTelemetry tracing withhold message content unless you opt in (data protection guide). - Providers: xAI, Perplexity’s Agent API, keyless Microsoft Entra ID for Azure OpenAI, web search for Anthropic
and Gemini, one proxy and CA setting for every client, your own HTTP client or sttp 4 backend (
llm4s-sttp), a key read from HashiCorp Vault (llm4s-secrets-vault), andllm4s-jlama, a small model run inside the JVM so a first answer needs no key and no server (providers guide). - Honest usage and options: a
Completionlists the options its provider could not honour (adjustments, also on the agent’sModelCallCompleted), and thinking tokens are counted once in usage and cost, whichever way the provider reports them. - Java and Kotlin: a Java agent builder, streaming, annotated tools, declarative AI services (an annotated
interface llm4s implements), structured output into records and a RAG facade (
llm4s-java-rag); more Spring Boot starter beans, Spring AI interop both ways (llm4s-spring-ai), and guides for Micronaut, Helidon and Quarkus; andllm4s-kotlin-apiis published (Java guide). - New experimental modules:
llm4s-ox(direct style),llm4s-reactor,llm4s-capabilities,llm4s-prompt,llm4s-schema-iron,llm4s-tapirandllm4s-repl, plus the Elasticsearch/OpenSearch and Redis vector stores and thellm4s-doctorsetup checker.
Upgrading
llm4s is still stabilising before 1.0, and 0.6.0 sets no binary-compatibility baseline: any release may break (compatibility policy). 0.6.0 has more breaking changes than usual. The ones most code meets:
- Credentials are
Secret, notString(migration note). - Many data types are growth-safe: a private constructor and
copy, withwith*setters instead, which breaks.copy(...)and positional patterns. The migration guide lists each type. - Console tracing prints no content by default (migration note).
llm4s-java-apiand the Spring Boot starter no longer bring the provider modules: add the one you use (migration note).TokenUsage.completionTokensno longer includes thinking tokens, and every output token count does (migration note).- A Gemini or Vertex AI reply a content filter stopped is a
ContentFilteredError, not a partial answer (migration note).
The Scalafix rule Llm4sMigrate_1_0 rewrites most of the mechanical source breaks; it is not published yet
(#2330, Scalafix). Which releases get fixes, and for how long,
is in the support policy.
Install
libraryDependencies ++= Seq(
"org.llm4s" %% "llm4s-core" % "0.6.0",
"org.llm4s" %% "llm4s-openai" % "0.6.0" // or the provider module you use
)
Every artifact, with its tier: installation guide.
Full list of changes: CHANGELOG · GitHub release