[Agent Builder] Adds Integration Knowledge platform tool
Summary
Adds an integration knowledge tool to Agent Builder that retrieves documentation from Fleet-installed integrations using semantic search on the .integration_knowledge index. The tool uses the conditional availability pattern and is only available when the integration knowledge index exists.
Changes
- Added
platform.core.integration_knowledgebuiltin tool toagent_builder_platformthat searches Fleet integration documentation - Tool is registered in plugin
setup()with conditional availability using theavailabilityconfiguration pattern - Availability is checked at runtime via ES search on
.integration_knowledgeindex (usingsize: 0query) - Returns structured resource results with package name, version, filename, and content
Technical Details
- Tool registration added to
registerTools()in pluginsetup()phase, following the same pattern asproductDocumentationTool - Uses
availabilityconfiguration withcacheMode: 'space'to conditionally show/hide the tool based on index availability - Searches using Elasticsearch semantic search on the
contentfield esClient.asInternalUseris used for both handler execution and availability checking (index permissions require internal user)- Results include reference URLs to integration detail pages (
/app/integrations/detail/{package_name})
Considerations
- Tool requires Fleet to have indexed integration knowledge into
.integration_knowledge - Tool availability is checked per-space and cached for performance
- No Kibana restart required - tool appears/disappears dynamically based on index availability
- This is the onechat/Agent Builder equivalent of the existing
IntegrationKnowledgeToolin Security Solution's Assistant (https://github.com/elastic/kibana/pull/236197) and Observability Solution's Assistant (https://github.com/elastic/kibana/pull/237085) added in9.2.
Testing
[!NOTE] You must enable the
xpack.fleet.enableExperimental: ["installIntegrationsKnowledge"]feature flag until this PR enabling it by default is merged (https://github.com/elastic/kibana/pull/245080).
- Upload this sample system-2.3.3-NEXT.zip package via Integrations > Create new integration
- The test package just copies the existing
docs/README.mdtodocs/knowledge_base/README.mdso that Fleet ingests it into.integrations_knowledge
- The test package just copies the existing
- Create new Agent with the new Integration Knowledge tool and ask questions related to system integrations, such as:
- How can I collect CPU and memory data for my windows host?
- What OS can I run the system integration on?
- What does the system integration do?
- Observe that the responses returned contain relevant information that is cited from the system integration.
PR developed with Cursor + Opus 4.5
Pinging @elastic/security-solution (Team: SecuritySolution)
:green_heart: Build Succeeded
- Buildkite Build
- Commit: 9bf4a743ecdac107951df53a2bc805831fcbc0a2
Metrics [docs]
Async chunks
Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app
| id | before | after | diff |
|---|---|---|---|
onechat |
477.3KB | 477.4KB | +49.0B |
History
- :broken_heart: Build #371554 failed ae46a5d13399006232dc9b5106cbd18f9bc59d90
- :green_heart: Build #370269 succeeded 5e48bee14df5031975664d4e3f3f38a28cfb6ce0
- :yellow_heart: Build #369111 was flaky 669dc85038d941f3eb10cd0d6a31cbc032f9d7bb
cc @spong