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 (recommended): asyncpg, psycopg (async mode), psqlpy

  • CockroachDB: cockroach_asyncpg, cockroach_psycopg (full FTS support)

  • MySQL/MariaDB: aiomysql, asyncmy

  • SQLite: aiosqlite (development and single-process)

  • Oracle: oracledb

  • DuckDB: duckdb (analytics; reduced-scope for ADK)

  • ADBC: adbc (Arrow-native portability; reduced-scope for ADK)

  • Spanner: spanner (Google Cloud, globally distributed)

Sync adapters (psycopg sync mode, sqlite, mysqlconnector, pymysql) work but require wrapping with anyio for async ADK runners.

Each Adapter Provides

Every adapter with ADK support ships session/event and memory stores:

  • Session store (e.g., AsyncpgADKStore) -- sessions and events.

  • Memory store (e.g., AsyncpgADKMemoryStore) -- long-term memory with FTS.

Import from the adapter's adk subpackage:


Artifact service base classes live under sqlspec.extensions.adk.artifact. They require a concrete metadata-store implementation and are not exported from adapter adk packages.

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