Skip to content

Deployment Config Reference

LlamaDeploy reads configuration from your repository to run your app. This appears in either a pyproject.toml, or a llama_deploy.yaml/llama_deploy.toml

If a UI is configured, values can also be extended from the UI’s package.json.

[tool.llamadeploy]
name = "my-app"
env_files = [".env"]
# specify only one of app or workflows.
# Use an app to configure your workflow names
# in code.
# app = "my_package.app:app"
[tool.llamadeploy.workflows]
my_workflow = "my_package.my_workflow:workflow"
[tool.llamadeploy.ui]
directory = "ui"
build_output_dir = "ui/static"

You can also create a yaml or toml configuration file that contains the same keys and values under the tool.llamadeploy

llama_deploy.yaml
name: my-app
env_files:
- .env
workflows:
my_workflow: "my_package.my_workflow:workflow"
ui:
directory: "ui"
build_output_dir: "ui/static"
llama_deploy.toml
name = "my-app"
env_files = [".env"]
[workflows]
my_workflow = "my_package.my_workflow:workflow"
[ui]
directory = "ui"
build_output_dir = "ui/static"

You can also define the UI attributes in your package.json. Note however that you must still configure the ui > directory, otherwise the package.json won’t be discovered.

{
"name": "my-ui",
// ...
"llamadeploy": {
"build_output_dir": "static"
}
}
FieldTypeDefaultDescription
namestring"default"URL-safe deployment name. In pyproject.toml, if omitted it falls back to project.name.
appstring "module.path:app_name"Single app entrypoint. Mutually exclusive with workflows.
workflowsmap<string,string>Map of workflowName -> "module.path:workflow". Do not use with app.
env_fileslist<string>[".env"]Paths to env files to load. Relative to the config file. Duplicates are de-duplicated.
envmap<string,string>{}Environment variables injected at runtime.
uiUIConfignullOptional UI configuration. directory is required if ui is present.
FieldTypeDefaultDescription
directorystringPath to UI source, relative to the config directory. Required when ui is set.
build_output_dirstring${directory}/distBuilt UI output directory. If set in TOML/pyproject, path is relative to the config file. If set via package.json llamadeploy.build_output_dir, it is resolved as ${directory}/${build_output_dir}.
package_managerstring"npm" (or inferred)Package manager used to build the UI. If not set, inferred from package.json packageManager (e.g., pnpm@9.0.0pnpm).
build_commandstring"build"NPM script name used to build.
serve_commandstring"dev"NPM script name used to serve in development.
proxy_portinteger4502Port the appserver proxies to in development.
  • You must set either app or at least one entry in workflows.
  • You cannot set both app and workflows at the same time.

Example package.json snippet in ui.directory:

{
"name": "my-ui",
"packageManager": "pnpm@9.7.0",
"scripts": { "build": "vite build", "dev": "vite" },
"llamadeploy": {
"build_output_dir": "dist",
"package_manager": "pnpm",
"build_command": "build",
"serve_command": "dev",
"proxy_port": 5173
}
}
  • config.build_output_path() returns ui.build_output_dir when set; otherwise ${ui.directory}/dist.
  • Use build_output_dir for production builds; the default is suitable for typical Vite/React build layouts.