x-pack/solutions/security/packages/security-ai-prompts/README.md
Utility library for Security AI Prompt management.
x-pack/solutions/security/plugins/elastic_assistant/server/lib/prompt/local_prompt_object.tsx-pack/solutions/security/plugins/elastic_assistant/server/lib/prompt/tool_prompts.tsx-pack/solutions/security/plugins/elastic_assistant/server/lib/prompt/defend_insight_prompts.tsci:security-genai-run-evals-local-prompts.When updating Security AI Prompts saved objects in the elastic/integrations repository, follow these steps to regenerate content, update the integration package, and bump its version. Here is an example PR: https://github.com/elastic/integrations/pull/14171
elastic-package is installedClone the elastic-package repo:
git clone https://github.com/elastic/elastic-package.git
cd elastic-package
make build
Add the binary to your path in .zshrc:
export PATH="/usr/local/go/bin:$PATH:/Users/stephmilovic/dev/elastic-package"
In a new terminal, the which command should be able to find it:
➜ ~ which elastic-package
/Users/stephmilovic/dev/elastic-package/elastic-package
Build elastic-package from the root before you begin:
➜ ~ pwd
/Users/stephmilovic/dev/elastic-package
➜ ~ make build
Generate the latest prompt files in Kibana:
cd $KIBANA_HOME/x-pack/solutions/security/plugins/elastic_assistant
yarn generate-security-ai-prompts
Copy the generated prompt files into the integration package:
cd $INTEGRATIONS_HOME/packages/security_ai_prompts/kibana/security_ai_prompt
cp $KIBANA_HOME/target/security_ai_prompts/*.json .
Open the manifest.yml for the integration:
cd $INTEGRATIONS_HOME/packages/security_ai_prompts
Increment the version: field in manifest.yml following semantic versioning
(e.g., 0.0.1 → 0.0.2)
Use a patch bump for content-only changes like updated saved objects.
Run linting and build the package:
➜ ~ pwd
/Users/stephmilovic/dev/integrations/packages/security_ai_prompts
elastic-package lint
elastic-package build
Restart your local Elastic Stack with the updated package:
elastic-package stack down
elastic-package stack up -d -v --services package-registry
Confirm the saved objects are included and working as expected by navigating to your Kibana instance and testing the integration. Ensure the following settings are in kibana.dev.yml:
xpack.fleet.internal.registry.kibanaVersionCheckEnabled: false
xpack.fleet.registryUrl: https://localhost:8080
# Must match format_version in manifest.yml
xpack.fleet.internal.registry.spec.max: '3.4'
Start Kibana with:
NODE_EXTRA_CA_CERTS=~/.elastic-package/profiles/default/certs/kibana/ca-cert.pem yarn start --no-base-path
Visit the Integration page and find Security AI Prompts (you may need to toggle Display beta integrations). Install it. Then go to the saved objects are to verify the saved objects have been installed and are what you expect. At this time, you can test your AI flow to ensure the updated prompt is being used, or use dev_tools to query for the prompt. For example:
GET .kibana/_search
{
"query": {
"bool": {
"must": [
{ "term": { "type": "security-ai-prompt" }},
{ "term": { "security-ai-prompt.promptId": "defendInsights-incompatibleAntivirusRefine" }}
]
}
}
}
manifest.yml.changelog.yml (if your integration has one).changelog.yml EntryIf your integration uses a changelog.yml, add an entry like this:
- version: "0.0.2"
changes:
- description: "Updated defend insights Security AI prompts."
type: enhancement