Skip to main content
Use relai learning-env to create or upload repeatable scenarios.

create

Create a learning environment from a prompt or from a run log plus feedback.
relai learning-env create [OPTIONS] --prompt {PROMPT}
relai learning-env create [OPTIONS] --log-file {PATH} --feedback {TEXT}
Learning environment generation can take a while when the prompt, run log, or agent context is complex.
OptionDescription
--prompt {TEXT}Behavior to turn into a learning environment.
--log-file {PATH}Agent run log. Requires --feedback.
--feedback {TEXT}Feedback about the run. Requires --log-file.
--name {NAME}Stable generated file name and environment id.
relai learning-env create --prompt "{describe the behavior to test}"
relai learning-env create --log-file {path/to/run-log} --feedback "{describe the behavior to preserve}"
relai learning-env create --prompt "{describe the behavior to test}" --name {name}
Creates a Python file under .relai/learning-envs/. Interactive successful flows may offer to commit and upload it. Non-interactive flows print follow-up commands. After upload, open the Agents page, select your agent, and use the Learning Environments tab. Common failures: prompt or feedback over 8 KB, log file over 48 KB, missing paired --feedback, backend generation failure, validation failure, duplicate explicit name, or dirty generated paths.

upload

Upload an existing committed learning environment.
relai learning-env upload --learning-envs {name}
relai learning-env upload --learning-envs {name-a},{name-b}
Uploads the exact source and git metadata to the RELAI backend. Common failures: file missing, invalid Python environment, file not tracked or not committed at current HEAD, uncommitted changes, detached HEAD, or backend branch conflict.