Provides an H2 database implementation for persisting agent checkpoints using the Exposed framework.
// Source: https://github.com/JetBrains/koog | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
package ai.koog.agents.features.sql.providers
import ai.koog.agents.snapshot.providers.PersistenceUtils
import kotlinx.coroutines.Dispatchers
import kotlinx.serialization.json.Json
import org.jetbrains.exposed.v1.jdbc.Database
import org.jetbrains.exposed.v1.jdbc.transactions.experimental.newSuspendedTransaction
import org.jetbrains.exposed.v1.jdbc.transactions.transaction
/**
* H2 Database-specific implementation of [ExposedPersistenceStorageProvider] for managing
* agent checkpoints in H2 databases.
*/
public class H2PersistenceStorageProvider(
database: Database,
tableName:
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key