Skip to content

SQL Storage

The current DI entry point is:

AddAgentCircuitsSqlStorage(...)

Some older README content still shows AddAgentCircuitsSql, but the source uses AddAgentCircuitsSqlStorage.

The SQL storage options include a connection string, schema settings, schema creation behavior, and migration control.

The server currently binds these keys:

AgentCircuits:Storage:Mode
AgentCircuits:Storage:ConnectionString
AgentCircuits:Storage:Schema
AgentCircuits:Storage:EnsureSchema
AgentCircuits:Storage:Migrations:Enabled

The migration runner currently:

  • takes an advisory lock
  • optionally creates the schema
  • sets search_path to the configured schema
  • tracks applied migrations in <schema>._migrations

Several repository implementations persist structured data as JSONB, including:

  • provider settings and enabled model lists
  • remote-agent auth config
  • channel settings and routing
  • channel conversation context

SqlStorageOptions.CommandTimeout exists in source, but the current server config does not bind a dedicated Storage:CommandTimeout setting.