Skip to content

Using AI in HDevelopEVOđź”—

HDevelopEVO offers AI-assisted prototyping via chats and agents. You can either use assistants provided by MVTec, commonly available LLMs, or both.

First, enable the AI features in general (see below). Then, configure and use the MVTec-provided assistants (HALCONSearch, HScriptCoder) or a third-party LLM directly.

Enabling the AI assistantsđź”—

Before you can use any of HDevelopEVO’s AI Assistants, you need to enable them in your settings:

  • Go to File > Preferences > Settings > AI Assistants, select Enable AI, and accept the disclaimer.

Working with AI assistantsđź”—

How to use code completionđź”—

Code Completion can be used in manual and automatic mode.

By default, the automatic Code Completion is enabled, which executes continuous requests to the underlying LLM while coding, providing suggestions on the go as you’re typing. In manual mode, suggestions will be displayed when pressing Ctrl+Alt+Space. This gives you greater control over the appearance of AI suggestions. The requests are then canceled when moving the cursor.

The code completion can be enabled in your settings: Settings > AI Assistants > Chat > Automatic Code Completion.

There are two prompt variants available for the code completion. You can select them in Code Completion > Prompt Templates, and the used prompt template to your personal preferences or to the LLM you want to use.

You can also specify Excluded File Extensions, for which the AI-powered code completion will be deactivated.

The setting Strip Backticks will remove surrounding backticks that some LLMs might produce, depending on the prompt.

The setting Max Context Lines allows you to configure the maximum number of lines used for AI code completion context. This setting can be adjusted to customize the size of the context provided to the model, which is especially useful when using smaller models with limited token capacity.

How to use the chatđź”—

HDevelopEVO provides a global chat interface where users can interact with a chat agent.

The context of the chat includes information about the current editor state, such as the selected range or the cursor location, which helps the AI provide more relevant responses. This approach is particularly useful when you need assistance with specific code segments.

Starting a chatđź”—

You can initiate a chat sessions directly from the editor context. To start a session, right-click anywhere in a file, either at the cursor position or with a selection—and choose the Ask AI option.

Alternatively, to open the chat, go to View > Chat or press Ctrl+Alt+I.

The chat panel opens on the right hand side. Use to send a request to a designated agent, and use to attach files that you have a question about for the chat.

Your chat query is sent to an chat agent which then provides the corresponding answer. By default, the Orchestrator Chat Agent is set and it chooses the best fitting agent. You can also send your query directly to a specific agent by typing @<name-of-agent>into your chat window. For example, type @coder for queries around coding, or type @command to find the right command according to all possible commands that can be executed at that stage.

Chat session historyđź”—

HDevelopEVO automatically preserves your chat sessions, allowing you to access your conversation history even after restarting the application.

To access your chat history, click Show Chats in the chat view toolbar, located in the top area of the chat view. This opens a dialog displaying all available chat sessions, including both your currently active sessions and previously archived sessions.

Agent pinningđź”—

Agent pinning reduces the need for repeated agent references.

More Info

For more information, see also About agents.

When you mention an agent in a prompt and no agent is pinned, the mentioned agent is automatically pinned. If an agent is already pinned, mentioning a different agent will not change the pinned agent. Instead, the newly mentioned agent will be used only for that specific prompt. You can manually unpin an agent through the chat interface if needed.

Image supportđź”—

HDevelopEVO supports multimodal large language models (MLLM), which enables you to provide visual context that can help the AI understand and address your questions more effectively. All you need for this to work is an LLM that can handle images.

You can add images to chat sessions in several ways, including from a graphics window during a debug session, or from your workspace:

  • In the chat input area, click the icon, and then select the corresponding entry from the drop-down list (for example: Current Graphics Window).
  • Conversely, to add an image from within the graphics window, hover over the image, and then click the icon. Alternatively, use the context menu (right-click > Add to AI Chat).
  • Drag and drop images directly into the chat from the workspace explorer.
  • Copy and paste images from your clipboard.

When an image is included in your request, it will be sent to the LLM along with your text if the selected model supports image inputs.

Context variablesđź”—

You can augment your requests in the chat with context by using variables.

Do one of the following:

  • To refer to the currently selected text, use #selectedText in your request.
  • To further specify the scope of your request, pass context files into the chat. You can also drag and drop a file into the chat view.
  • To use the autocompletion, type #file or directly type #<file-name>.

Here are some of the most frequently used variables:

#file:src/my-code.ts
In the user message is replaced to the workspace-relative path, alongside attaching the file to the context. This allows adding the file content to the context and then referring to the file in the chat input text efficiently in one go.
#file:filePath
Inserts the path to the specified file relative to the workspace root. After typing #file:, auto-completed suggestions will help you to specify a file. The suggestions are based on the recently opened files and on the file name you’re typing. After typing # followed by the file name you can directly start your search for the file you want to add and reference in your message.
#filePath
Is the shortcut for #file:filePath.
#currentRelativeFilePath
Is used for the relative file path of the currently selected file in the editor or explorer.
#currentRelativeDirPath
Is used for the directory path of the currently selected file.
#selectedText
Use this for the currently highlighted text in the editor. This does not include the information from which file the selected text originates.

You can see the full list of available variables when typing # in the chat input field.

How to use task contextđź”—

Task Context introduces a structured, reproducible way to work with AI agents ensuring clearer intent, better planning, and far more accurate results. It is a powerful approach for structured, reproducible AI-assisted development in HDevelopEVO. This feature transforms how you work with AI agents by externalizing your intent into dedicated files that serve as persistent, editable records of what you want the AI to accomplish.

More Info

For more information, see also About agents.

Setting up task contextđź”—

Task context are stored as Markdown files.

You can set the directory in the settings under AI Assistants > Prompt Templates > Task Context Storage Directory. The default directory is .prompts/task-contexts.

Manually creating a task context fileđź”—

Instead of starting with a chat prompt, create a dedicated task context file that externalizes your requirements:

  1. Create a new file, for example, my_task.md, in a dedicated directory, by default .prompts/task-context/.
  2. Write your initial requirement in this file, like “add a reset button to the token usage view”.
  3. Initiate a session with this file using the command task context: Initiate Session.
  4. Select your desired agent to link the chat session to your externalized prompt file.
  5. Press Enter to start the request in the chat.

This approach makes your prompt reproducible and allows you to refine it before sending it to the LLM.

Planning with the architect agentđź”—

For complex tasks, it’s highly beneficial to use a planning agent before a coding agent:

  1. Select the “Architect” agent when initiating your chat session and describe your task.
    ⤷ The Architect will analyze your workspace and create a detailed plan of what should be coded.
  2. Use the Summarize this session as a task for coder button in the chat.

The system will send the plan to an underlying LLM, which summarizes it into a structured format and creates a task context file. This structured task context includes comprehensive details such as:

  • Problem description and scope
  • Detailed design and implementation steps with specific files
  • Testing strategy, both automated and manual
  • Deliverables and PR description

Note

You can adapt this template via modifying the prompt “architect-tasksummary”.

Implementing with the coder agentđź”—

After reviewing and refining the task context, do the following:

  1. Review the plan and make any necessary adjustments.
  2. If modifications are needed, return to the planning agent and provide feedback.
  3. Use the “Update Task Context” action to incorporate changes.
  4. When the plan is finalized, trigger the Coder agent with the updated task context.

Because the Coder agent is now working from a detailed and verified plan, it produces results of much higher quality.

Viewing AI historyđź”—

The AI history view allows you to review all communications between agents and underlying LLMs. Select the corresponding agent at the top to see all its requests in the section below.