Server Setup
The Soliplex server is a FastAPI-based backend that forwards requests to OpenAI and provides RAG functionality.
Prerequisites
-
Python 3.12+
-
Access to LLM:
-
OpenAI - an API key is required to use OpenAI
-
Ollama (https://ollama.com/)
-
Logfire (optional):
A token from logfire (login here) allows for visibility into the application. See:
Installation
- Clone the repository:
- Set up a Python3 virtual environment:
- Install
soliplexand its dependencies:
- Set up environment variables:
An environment file (.env) can be used to configure secrets, e.g.:
Running the example
The example configuration provides an overview of how a soliplex application is assembled. It contains four top-level installation configurations:
-
example/minimal.yamlis a minimal example using Ollama: it requires no secrets. -
example/installation.yamlis a more fleshed-out example using Ollama: it requires secrets for the external Model-Control Protocol (MCP) client toolsets for the roommcptest. -
example/minimal-openai.yamlis a minimal example using OpenAI: it requires no secrets beyond theOPENAI_API_KEY. -
example/installation-openai.yamlis a more fleshed-out example using OpenAI: in addition to theOPENAI_API_KEYsecret, it requires secrets for the external Model-Control Protocol (MCP) client toolsets for the roommcptest.
Each installation configuration includes a number of rooms that
- Configure resources:
The example needs access to a model server using either openapi or ollama as well as access to example MCP services.
The example uses https://smithery.ai/ but others can be configured.
a. OIDC configuration: TODO
-
Configure the LLM (Ollama / OpenAI):
-
For the Ollama veriants, export the URL of your model server as
OLLAMA_BASE_URL. This url should not contain the/v1suffix. E.g. if you are running Ollama on your own machine: -
The example configuration uses the
gpt-ossmodel. If using either Ollama variant, install that model via: -
Check for missing secrets / environment variables:
This command will check the server for any missing variables or invalid configuration files.
The secrets used in the your chosen configuration should be exported as environment variables, e.g.:
Note that the alternate installation configurations, example/minimal.yaml
and example/minimal-openai.yaml, requires no additional secrets
The example/minimal.yaml configuration still expects
the OLLAMA_BASE_URL environment variable to be set (or present in
an .env file):
-
Configure any missing secrets, e.g. by sourcing a
.envfile, or by exporting them directly. -
Configure any missing environment variables, e.g. by editing the installation YAML file, adding them to a
.envfile in the installation path, or exporting them directly.
Running the Server
Start the FastAPI server:
The server will be available at http://localhost:8000 by default.
See the soliplex-cli reference for the full list of
subcommands, options, and common usage examples.
Verifying the Server
To confirm your room configuration:
To check server health:
Running Behind a Load Balancer
Several features of an installation configuration require special handling when running multiple Soliplex server instances behind a load balancer:
-
The SQLAlchemy DBURI used to store AGUI threads and runs should not be configured to use the
sqliteengine, using either the RAM-based storage (the default), or a filesystem-based storage (sqlitedoes not support multiple writers to a shared filesystem database). Instead, configure the SQLAlchemy using a supported relational database server, as described here. -
The SQLAlchemy DBURI used to store authorization data should not be configured to use the
sqliteengine, using either the RAM-based storage (the default), or a filesystem-based storage (sqlitedoes not support multiple writers to a shared filesystem database). Instead, configure the SQLAlchemy using a supported relational database server, as described here. -
The secret used to manage session encryption should not be configured to use a
random_charssecret source, because that value cannot be shared across Soliplex server instances. -
The secret used to generate bearer tokens for MCP clients should not be configured to use the
random_charssecret source, because that value cannot be shared across Soliplex server instances.
API Endpoints
If the soliplex-cli server is running, you can browse the
live OpenAPI documentation.