Intelligent Remediation: Action generation with AI
Instana Intelligent Remediation uses generative AI to accelerate incident or issue remediation. You can input the Instana event details to a large language model (LLM) as a prompt. The LLM can generate a manual action, which is a set of steps to diagnose or remediate the event, or a script action based on manual steps. You can further configure these actions and add them to the action catalog. These actions can also be applied to an automation policy to link the action to the event for convenient reference.
For some frequently-occurring built-in events, predefined curated actions are available for selection.
Artificial Intelligence (AI)-generated actions are not run automatically against a target system. In addition, AI can sometimes make mistakes. Therefore, you must always review, verify, and test these actions before using them in an automation policy or on production systems.
AI integration
Generative AI for manual action and script generation uses the ibm/granite-3-3-8b-instruct large language model (LLM) to generate manual actions and scripts. This model uses event data as input and recommends steps to diagnose or fix issues. The LLM also converts manual steps into bash or Ansible scripts by accepting the step as input and generating the required script to execute the instructions.
Prerequisites
To use Instana Intelligent Remediation with AI, you must meet the following prerequisites:
Permissions
You must enable the following Automation RBAC permissions:
-
- Access type: Owner (enables configuration of new automation actions)
- Configuration of automation policies (if policy creation is required)
SaaS environments
For SaaS environments, default LLM gateways for watsonx.ai are provided by Instana. No additional configuration is required to use this capability. You can configure separate gateways for your own watsonx.ai runtime if desired. For more information, see AI gateway.
Self-hosted environments
For Standard Edition and Custom Edition, you must enable the required feature flag and configure LLM gateways to use this capability. For more information, see AI gateway.
To configure the feature flag for AI action generation on {{site.data.keyword.self_se}}, see Enabling optional features in Standard edition.
To configure the feature flag for AI action generation on {{site.data.keyword.self_kub}}, see Enable optional features in Custom edition .
Self-Hosted Classic Edition (Docker) does not support action generation by using AI.
Generating manual actions with AI
For any occurrence of a built-in event, custom event, or Smart Alert, go to Recommended Actions in the Automation section. Click the link to Generate with AI.
To generate a manual action for any occurrence of a built-in event, custom event, or Smart Alert, complete the following steps:
- In the Instana UI, go to Events > Incidents or Events > Issues.
- Open an incident or issue.
- In the Recommended Actions table, click Generate action.
- Generate or select an action.
- Edit and save the remediation steps that are generated by AI to the action catalog as manual action.
- Optional: Generate an automation Bash script or Ansible playbook and export to GitHub or GitLab or save to the action catalog.
Step 1: Generate or select an action
When an incident includes a topology chart with a triggering event and probable root causes, Recommended Actions appear in the topology section. The fields that are displayed in Step 1 of 2 depend on the node clicked in the topology chart and whether AI action generation is enabled.
- If the Triggering Event node is clicked, configuration details such as Event Summary and Event Entity Type are automatically populated from the current event information.
- If a Probable Root Cause node is clicked, configuration details such as Root Cause Summary and Entity Type are automatically populated from the current root cause information.
If the Run Investigation button is clicked for a root cause, the Recommended Actions table appears based on the context of the investigation results.
When Generate action is clicked from the Recommended Actions table, configuration details such as Investigation Summary and Entity Type are automatically populated from the investigation results.
Live generation (when AI action generation feature is enabled)
- Review the event summary. You can enrich the details of the AI prompt or keep it as it is to generate the remediation steps.
- To generate remediation steps, click Generate.
- Review the generated results in Step 2 of 2.
Built-in actions (pre-generated actions)
For several commonly occurring built-in events, you see tabs for both Live generation and Built-in actions in Step 1.
- The Built-in actions tab contains a list of pre-generated and curated actions related to the event.
- These pre-generated actions are ready to use and can be saved to the action catalog.
- Select an action from the list to view and edit it in Step 2 of 2.
Step 2: Edit and save the recommended next steps
In Step 2 of 2, you can review and edit the recommended next steps, and then save them to the action catalog.
- Review the remediation steps displayed in the interface.
- Optional: Click the Edit icon to modify the content.
- Optional: Click the Save icon to save the action to the action catalog with a name, description, and tags.
- Optional: Click Copy to copy the steps to your clipboard.
When AI action generation is enabled: Additionally, you can generate these steps as automations by using the Optional actions section.
When AI action generation is disabled: The steps can be saved only to the action catalog.
Optional: Generate automation scripts
-
In the Optional actions section, select one of the following interpreters:
- Generate Bash script: Creates a Bash shell script
- Generate Ansible playbook: Creates an Ansible playbook
-
Review the generated code in the Generated code section.
-
Optional: Click the Edit icon to modify the script, then click Save to apply your changes.
-
Optional: You can edit remediation steps in step 2 and click Regenerate to generate a new version of the script.
-
Choose one of the following options to save or export the script:
- Click the Save icon to save the script to the action catalog as a script action.
- Click the GitHub icon to export the script to a GitHub repository. For more information on enabling the Github sensor, see Enabling and configuring Automation Action GitHub sensor.
Click the GitLab icon to export the script to a GitLab repository. For more information on enabling the Github sensor, see Enabling and configuring Automation Action GitLab sensor.

Viewing the action
- The new actions are available in the Action Catalog tab in the Automation section of Instana UI.
- Manual actions can be viewed from the Recommended Actions tab of the incident or issue.
- Script actions can be configured to run automatically through automation policies.

Generating script actions with AI
To select any manual action and generate a script, complete the following steps:
- From the navigation menu in the Instana UI, click Automation.
- On the Action Catalog tab, select any action with type Manual.
- To Generate script from manual action, do one of the following:
- Click action, and in the configuration tab, click Generate script.
- Click the Options overflow, and then click Generate script.
The Generate Script function is also available in the Recommended Actions table under the manual actions Options, based on event occurrences.
Generating a script action with AI involves two steps:
- Generate the script
- Create script action or export to external source
To generate a script from the manual action, complete the following steps:
Generating a script
In the Step 1: Generate a script page, modify the manual action content as required. The step details are used to form the AI prompt to generate a new script action.
To generate a script action, complete the following steps:
-
Select one of the following interpreters for script generation: Bash or Ansible.
-
Optional: In the Prompt field, modify the selected prompt text.
Note: Modify the prompt details to improve the results. -
Click Generate.
-
Review the generated code and click Next.
The following images display the generated bash and Ansible scripts:
Creating a script action
To create a script action, complete the following steps:
- On the "Step 3: Create action or export to external source" page, select "Create an action" option.
- Enter Name, Description, and Tags.
- Optional: Modify the script content before saving it to the catalog.
- Click Create action. The action is saved in the action catalog.
The following image displays how to create a script action:
Exporting the script to external source
You can export the generated script to a GitHub repository or GitLab project.
- On the "Step 3: Create action or export to external" page, select Export to GitHub or Export to GitLab.
- Select a target agent with action github or action gitlab sensor enabled.
- Enter Repository, Branch, Commit message, Target branch and File path.
- Optional: Modify the script content before exporting it.
- Click Export. The script is exported and a new pull request is created.
- Optional: Once the pull request is approved and merged, you can create an action script in action catalog by using the exported file URL.
The following image displays how to export script to a GitHub repository: