CheckpointerConfigLoader

org.llm4s.config.CheckpointerConfigLoader
@Experimental

Opens the checkpoint store application.conf chooses, at the application's edge (design 4.54).

llm4s.agent.checkpointer.kind names the store - memory (the default, built into llm4s-agent), sqlite (llm4s-agent-checkpoint-sqlite), postgres (llm4s-agent-checkpoint-postgres) or the kind of any other CheckpointerBackend on the classpath - and the backend for that kind opens it from its own block, llm4s.agent.checkpointer.<kind>, which its module's reference.conf fills with defaults and ${?VAR} bindings:

llm4s.agent.checkpointer {
 kind = "postgres"
 postgres { url = "jdbc:postgresql://db:5432/app", user = "agents", schema = "agents" }
}
for
 store   <- CheckpointerConfigLoader.open()
 runtime <- RuntimeConfigLoader.runtime(store.checkpointer)
 agent   <- Agent.builder("assistant", client).withRuntime(runtime).build()
yield (store, agent)   // store.close() when the application stops

Only the selected kind's block is read, and only a load is affected by a missing module: a kind whose backend is not on the classpath fails open with a ConfigurationError naming the module to add, and nothing else. No setting's value reaches an error or a log line.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

The store the configuration chooses, opened by a backend found on the classpath.

The store the configuration chooses, opened by a backend found on the classpath.

Attributes

The store the configuration chooses, opened by one of backends.

The store the configuration chooses, opened by one of backends.

Attributes

The selected kind and its block, from system properties, application.conf and every reference.conf.

The selected kind and its block, from system properties, application.conf and every reference.conf.

Attributes

Concrete fields

val Path: String

The configuration path of the store settings.

The configuration path of the store settings.

Attributes