How to Use the AI Workbench Build Assistant#

Overview#

The build assistant analyzes and fixes failed container builds.

It is part of the Workbench application that can read the build log and environment files if the build fails. You can use it selectively to do the analysis and edit the files to attempt a fix.

It goes through a limited round of analysis and reasoning so as to not get stuck and at least make incremental progress.

The build assistant edits the environment files but does not trigger a rebuild.

You are required to inspect the assistant’s changes in the Git Changes tab before you can rebuild the container.

The build assistant has restricted access to the project repository.

The assistant doesn’t have access to a building or running environment. Read access is limited to the spec.yaml file and environment configuration files, and it can only write to the preBuild.bash and postBuild.bash files.

Actual package changes go through AI Workbench managed tools to make sure everything conforms to how Workbench builds environments.

The build assistant uses the free NVIDIA Endpoints for inference.

The assistant is available after you configure the NVIDIA Endpoints integration. You can see and select from a set of provided endpoints in Settings > Inference Settings.

The models are set by a configuration file that is periodically updated to provide the best models for the feature.

Key Concepts#

Endpoint

The cloud hosted endpoint that runs the LLM used for the assistant’s inference. Free and available through https://build.nvidia.com.

Endpoints Integration

The card in Settings where you enter the appropriate API key to get access to the free endpoints. See the Endpoints Integration section for how to configure it.

Build Log

AI Workbench provided information from the managed container build that includes inputs and outputs from the container file, as well as any outputs from commands running in the container during build. Also available for direct analysis by you or another agent.

Build Context

The limited set of files AI Workbench uses during the build process. Includes the environment files (preBuild.bash, postBuild.bash, requirements.txt, apt.txt), spec file metadata about the base image, and knowledge of how AI Workbench renders the container file and runs the build. See here and here for more information on how the build context works.

Inference Settings

A Settings tab to select the endpoint used by the build assistant. The model selector is disabled until you configure the Endpoints integration. A default model is pre-selected and works immediately after you connect the integration.

Build Warning Modal

A modal that appears the first time you try to build the container after the build assistant edits files. Requires you to review the changes and acknowledge them before starting the build.

Enable and Start the Build Assistant#

When a container build fails, the Build Output widget will open in the Project Tab. This lets you enable and start the build assistant.

Step One (one-time): Enable the Build Assistant
  1. Select the Enable Assistant CTA to go the the Endpoints Integration

  2. Follow the steps to configure the integration (see Endpoints Integration)

Step Two: Start the build assistant.
  1. Go back to Project Tab > Build Output and select Build Agent CTA > Start

  2. Review the disclaimer and guidance in the Start Confirmation modal

  3. Commit any changes you want to keep before proceeding

  4. Select Start Agent

Step Three: Monitor the build assistant in the Build Output Widget.

The text box shows status messages as the agent works through three stages:

  • Analyzing: Agent is reviewing the log and environment files to determine a fix

  • Executing: Agent is editing environment files per the plan

  • Complete: Agent has finished editing. You should rebuild the container.

Step Four: Stop the agent if needed.
  1. Select Build Agent CTA > Running

  2. Review guidance on stopping and discarding changes in the Stop Agent modal

  3. Select Stop Agent

The Build Agent CTA transitions back to Start.

Step Five: Review changes and rebuild.
  1. Select Build to start a container build

  2. The Build Warning modal appears with a disclaimer and the files the agent changed

  3. Select View Changes to review the agent’s edits in the Git Changes tab

  4. Check I Acknowledge Changes to enable the build button

  5. Select Build Container

Success: The container builds with the agent’s fixes applied. The Build Warning modal does not appear again until the next time the build assistant runs.

Select an Inference Model#

A default model is pre-selected and works immediately after you connect the Endpoints integration. You only need to follow these steps if you want to change the model.

Change the model in the Desktop App.
  1. Select Settings > Inference Settings

  2. Select a model from the list

  3. Select Confirm to test and activate it

Your model choice follows you across local and remote contexts.

Change the model in the CLI.
  1. List available models: nvwb internal build-assistant models

  2. Set the model: nvwb internal build-assistant config --model=<model-id>

Each context’s model configuration is independent in the CLI.

The Desktop App overrides CLI model settings.

If you set a model through the CLI and then open the Desktop App, the Desktop App pushes its own stored preference to the service. If you primarily use the CLI, be aware that opening the Desktop App may change your model configuration.

If a model is removed from the NVIDIA endpoint API, select a different one.

The build assistant reports a 410 error when this happens. The Desktop App directs you to Settings > Inference Settings to select a replacement. The CLI surfaces the error in build-assistant start output.

The model list updates automatically.

AI Workbench fetches the available models from a hosted catalog on startup and refreshes periodically. When a model is removed or added, the catalog is updated independently of AI Workbench releases. If your selected model is no longer available, AI Workbench falls back to the catalog default and shows a notice.