SQLAlchemy DBURI Configuration
Soliplex uses SQLAlchemy to store persistent data in two separate databases:
-
One database holds history for AG-UI threads and runs, created by clients interacting with its AG-UI endpoints. See below.
-
Another database holds authorization information: a list of administrative users, and a list of room authorization policies and the access control list (ACL) entries they contain. See below.
Configuration for these databases uses SQLAlchemy database URLs, in two flavors:
-
Synchronous URLs, used by code which is not written to run using Python's
asyncmechanisms (e.g., the CLI and TUI modules). This style of database URLs is the default described in the SQLAlchemy docs. -
Asynchronous URLs, used by code which does use Python's
asyncmechanisms (e.g., FastAPI endpoint functions). See this SQLAlchemy page for details on the extension which addsasyncsupport to SQLAlchemy.
Because of the requirement for async support, Soliplex cannot use
all possible SQLAlchemy engines. Known to work:
Untested:
-
Oracle via its built-in async dialect
-
Microsolt SQL Server via the
aioodbcasync dialect
thread_persistence_dburi
Soliplex uses this pair of URLs to record and query information about AG-UI threads and runs initiated by clients. If this sections is not configured, Soliplex uses an in-memory Sqlite database, e.g.:
To use an on-disk SQLite database for thread persistence (note the four forward-slashes!):
thread_persistence_dburi:
sync: "sqlite:////path/to/thread_persistence.sqlite"
async: "sqlite+aiosqlite:////path/to/thread_persistence.sqlite"
To use a Postgres server, assuming the login is "soliplex" and the
password is defined as a secret named "POSTGRES_PASSWORD":
thread_persistence_dburi:
sync: "postgresql://soliplex:secret:POSTGRES_PASSWORD@/soliplex_threads"
async: "postgresql+asyncpg://soliplex:secret:POSTGRES_PASSWORD@/soliplex_threads"
authorization_dburi
Soliplex uses this pair of URLs to record and query authorization information: a list of administrative users, and a list of room authorization policies and the access control list (ACL) entries they contain. If this sections is not configured, Soliplex uses an in-memory Sqlite database, e.g.:
To use an on-disk SQLite database for thread persistence (note the four forward-slashes!):
authorization_dburi:
sync: "sqlite:////path/to/authorization.sqlite"
async: "sqlite+aiosqlite:////path/to/authorization.sqlite"
To use a Postgres server, assuming the login is "soliplex" and the
password is defined as a secret named "POSTGRES_PASSWORD":