Demo Settings And Commands¶
This reference describes the independently locked projects and Compose stack
under demo/. These commands and DEMO_* settings are not part of the
langgraph-openai-serve package API.
demo/.env.example
is the source of truth for demo environment values. Copy it to .env and
customize it before running the demo. This reference explains settings without
duplicating their defaults.
Projects¶
| Path | Purpose | Imports LGOS? |
|---|---|---|
demo/api |
Example FastAPI and LangGraph application | Yes, from PyPI by default |
demo/files_api |
OpenAI-compatible Files service and S3 adapter | No |
demo/ui/chainlit_ui |
Persistent OpenAI-protocol client | No |
demo/ui/openwebui |
Open WebUI Function sources and sync command | No |
demo/docker |
Compose gateway configuration and service data directories | No |
Each Python project has its own pyproject.toml, virtual environment, and
uv.lock; demo/ deliberately is not a uv workspace.
Common Commands¶
Run these from demo/ after copying .env.example to .env:
| Command | Purpose |
|---|---|
make run-postgres |
Start the demo PostgreSQL service on port 3001 |
make run-api / make run-api-a |
Run the published lgos-a container on port 3004 |
make run-api-b |
Run the published lgos-b container on port 3005 |
make run-files |
Run the published Files API container on port 3006 |
make run-bifrost |
Run Bifrost and its graph and Files API dependencies on port 3000 |
make run-litellm |
Run the LiteLLM UI edge and compatibility gateway with its API and Files dependencies on port 3007 |
make run-chainlit |
Run the published Chainlit container and its dependencies on port 3002 |
make run-api-local / make run-api-a-local |
Set up checkpoints and run the editable local lgos-a process |
make run-api-b-local |
Set up checkpoints and run the editable local lgos-b process |
make run-files-local |
Run the independently locked local Files API process |
make run-chainlit-local |
Apply Chainlit migrations and run the local UI process |
make sync-openwebui |
Sync the Open WebUI Functions and generated LGOS Workspace Models |
make compose |
Run the stack with published project-owned images |
make compose-dev |
Build the local API, Files API, and Chainlit images; overlay LGOS only into the graph API image |
make compose-otel |
Run published images with the OTEL overlay |
make compose-otel-dev |
Build the checkout and run it with the OTEL overlay |
make sync |
Synchronize all four projects from their lockfiles |
make test |
Test all four projects from their lockfiles |
make test-postgres |
Run the interrupt and Store persistence tests against PostgreSQL on port 3001 |
make lint |
Check all four projects with Ruff |
make check |
Run tests, lint, formatting checks, and Compose validation |
From the repository root, make test-litellm and make test-bifrost run the
focused OpenAI SDK checks. OPENAI_GATEWAY_TYPE=litellm|bifrost selects the
gateway used by both maintained UIs. Responses and Files use its normal
managed/native routes. A separate catalog-detail client retains LGOS model
extensions through authenticated pass-through; UI inference never does.
Stack Settings¶
| Setting | Purpose |
|---|---|
DEMO_IMAGE_TAG |
Tag selected for all project-owned demo images |
PUID |
Host user ID used by Compose services |
PGID |
Host group ID used by Compose services |
OPENAI_GATEWAY_TYPE |
Gateway used by both demo UIs: litellm or bifrost |
DEMO_LITELLM_MASTER_KEY |
Required LiteLLM bearer key shared by the two UI clients and local Admin UI password for username admin; replace it outside local demos |
DEMO_LITELLM_IMAGE |
Required image reference; change it in .env to select another compatible image. See Docker Compose |
RESTART_POLICY |
Restart policy for services configured by the OTEL overlay |
DEMO_OPENWEBUI_SECRET_KEY |
Open WebUI application secret; replace it outside local demos |
OpenTelemetry Settings¶
These settings apply when using make compose-otel or
make compose-otel-dev:
| Setting | Purpose |
|---|---|
OTEL_COLLECTOR_GATEWAY_ENDPOINT |
Required. OTLP/HTTP base URL for the host or platform gateway |
OTEL_SERVICE_NAMESPACE |
Namespace default for application and Collector signals |
OTEL_DEPLOYMENT_ENVIRONMENT |
Environment default for application and Collector signals |
OTEL_HOST_NAME |
Required. Stable host identity added by the local Collector |
The OTEL overlay uses the OpenTelemetry always_on sampler, so application
traces are exported without SDK sampling. The selected remote backend owns
retention.
The OTEL overlay requires both OTEL_COLLECTOR_GATEWAY_ENDPOINT and
OTEL_HOST_NAME; set them per machine in .env. The endpoint URL scheme
controls transport security: use https:// for TLS and http:// only when the
gateway intentionally accepts cleartext OTLP/HTTP.
Demo API Settings¶
| Setting | Purpose |
|---|---|
DEMO_API_PORT |
HTTP port used by lgos-demo-api |
DEMO_API_OPENAI_BASE_URL |
Upstream OpenAI-compatible base URL |
DEMO_API_OPENAI_API_KEY |
Upstream key for provider-backed graphs |
DEMO_API_OPENAI_MODEL |
Upstream generation model |
DEMO_API_OPENAI_EMBEDDING_MODEL |
Embedding model used by lgos-rag |
DEMO_API_POSTGRES_URI |
Database for LangGraph checkpoints, Store data, and interrupt coordination |
DEMO_API_FILES_BASE_URL |
Central Files API read by the file-input graph. |
The API also reads the package-owned LGOS_OPENAI_API_PREFIX,
LGOS_OPENAI_API_DOCS_ENABLED, and LGOS_ENABLE_LANGFUSE settings documented
in the package Reference. Its settings model supports
a local .env file; the installed LGOS package itself reads only process
environment values or explicit constructor arguments.
Files API Settings¶
These settings belong only to the independent demo/files_api project.
| Setting | Purpose |
|---|---|
DEMO_API_FILES_PORT |
HTTP port used by lgos-files-api. |
DEMO_API_FILES_BUCKET |
Required S3-compatible bucket. |
DEMO_API_FILES_S3_ENDPOINT |
Optional S3-compatible endpoint; required by the Compose demo. |
DEMO_API_FILES_AWS_ACCESS_KEY_ID |
Required S3 access key passed explicitly to boto3. |
DEMO_API_FILES_AWS_SECRET_ACCESS_KEY |
Required S3 secret key passed explicitly to boto3. |
DEMO_API_FILES_AWS_DEFAULT_REGION |
Required S3 signing region passed explicitly to boto3. |
Open WebUI Sync Settings¶
These settings configure the host-side Open WebUI synchronization command.
| Setting | Purpose |
|---|---|
DEMO_OPENWEBUI_URL |
Open WebUI API used by the sync command |
DEMO_OPENWEBUI_ADMIN_EMAIL |
Open WebUI sync account |
DEMO_OPENWEBUI_ADMIN_PASSWORD |
Open WebUI sync password |
OPENAI_GATEWAY_TYPE |
Exact global selector shared with Chainlit: litellm or bifrost |
DEMO_OPENWEBUI_OPENAI_GATEWAY_BASE_URL |
Optional root override; defaults to port 3007 for LiteLLM or 3000 for Bifrost |
DEMO_OPENWEBUI_API_KEY |
Gateway credential shared with the configured deployment |
See Chainlit settings, Open WebUI setup, and the example graph catalog for component-specific details.