CheckpointerConfigLoader
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 Objecttrait Matchableclass Any
- Self type