server
The server group manages the runtime of the Constellab lab. Use it to start the FastAPI server for local development, run a brick's test suite, and execute a specific scenario or process by ID. These are the commands you reach for day-to-day when running and testing your code.
server run
Starts the lab server (FastAPI/uvicorn). This is the standard way to bring the platform up locally so you can develop and test against it.
gws server run [OPTIONS]
# Start the server on the default port
gws server run
# Start with debug logging and SQL tracing on a custom port
gws --log-level=DEBUG server run --port 8080 --show-sql
server test
Runs a brick's tests via pytest. Pass one or more test file names (without the .py extension), or all to run the whole suite. If --brick-name is omitted, the brick of the current folder is used.
gws server test ... [OPTIONS]
# Run a single test file from within a brick directory
gws server test test_table_copilot
# Run the whole suite in parallel with 4 workers
gws server test all --parallel -n 4
Tip: prefer running a specific test file (gws server test <file>) over all while iterating — it is much faster. Reach for all only when you need a full pass.
server test-all
Runs the test suites of several bricks sequentially, each in a fresh subprocess. Repeat --brick-name once per brick. Per-brick JUnit XML reports can be collected into a folder. The command exits with a non-zero status if any brick's tests fail.
gws server test-all --brick-name [--brick-name ...] [OPTIONS]
# Run the tests of two bricks, in parallel, collecting reports
gws server test-all --brick-name gws_core --brick-name gws_ai_toolkit --parallel --output-dir ./test-reports
server run-scenario
Executes a single scenario by its ID, as a given user. This runs the scenario in the current process (rather than queuing it on a running server) and is mainly used for local execution and debugging.
gws server run-scenario --scenario-id --user-id [OPTIONS]
gws server run-scenario --scenario-id abc123 --user-id user456
server run-process
Executes a single process (one node of a scenario's protocol) by ID, as a given user. Use this to run or debug an individual step of a workflow in isolation.
gws server run-process --scenario-id --protocol-model-id --process-instance-name --user-id [OPTIONS]
gws server run-process --scenario-id abc123 --protocol-model-id proto789 --process-instance-name my_task --user-id user456