Adapters

ADK stores use the same adapters as the rest of SQLSpec. Configure your database with a standard config class, then pass it to the ADK store.

Choosing an Adapter

Use async adapters for best performance with ADK runners:

  • PostgreSQL: asyncpg (recommended), psycopg (async mode)

  • SQLite: aiosqlite

  • MySQL: asyncmy

Sync adapters work but require wrapping with anyio for async ADK runners.

Example

adk backend config
from sqlspec.adapters.adbc import AdbcConfig

adk_config = {
    "session_table": "adk_sessions",
    "events_table": "adk_events",
    "memory_table": "adk_memory_entries",
    "memory_use_fts": True,
}

gizmo = AdbcConfig(
    connection_config={"driver_name": "gizmosql", "gizmosql_backend": "duckdb"},
    extension_config={"adk": adk_config},
)

See Also