Skip to content

agent-centric connectors#267333

Merged
seanstory merged 1 commit into
mainfrom
seanstory/13759-agent-centric-connectors
May 8, 2026
Merged

agent-centric connectors#267333
seanstory merged 1 commit into
mainfrom
seanstory/13759-agent-centric-connectors

Conversation

@seanstory
Copy link
Copy Markdown
Member

@seanstory seanstory commented May 1, 2026

Summary

Enables scoping agents to a subset of configured connectors, and adjusts SML search to only the connectors that are enabled for the current Agent.

To test:

  1. enable the experimental feature flag
  2. create some connectors
  3. go to the Agent UI, and type @ (all your connectors auto-complete)
  4. update the agent to just a subset of connector IDs
PUT kbn://api/agent_builder/agents/elastic-ai-agent                                                                                                   
{
  "configuration": {
    "connector_ids": [
      "<connector-id-1>",
      "<connector-id-2>"
    ]
  }
}
  1. then go to the Agent UI and type @ (only your configured connectors auto-complete)

Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

Release Notes

Introduces an optional configuration for Agent Builder Agents: connector_ids. If unset, a given agent has access to all configured kibana connectors. When set, the Agent will have access only to the listed connectors.

@elasticmachine
Copy link
Copy Markdown
Contributor

🤖 Jobs for this PR can be triggered through checkboxes. 🚧

ℹ️ To trigger the CI, please tick the checkbox below 👇

  • Click to trigger kibana-pull-request for this PR!
  • Click to trigger kibana-deploy-project-from-pr for this PR!
  • Click to trigger kibana-deploy-cloud-from-pr for this PR!
  • Click to trigger kibana-entity-store-performance-from-pr for this PR!
  • Click to trigger kibana-storybooks-from-pr for this PR!

@seanstory seanstory force-pushed the seanstory/13759-agent-centric-connectors branch from 1b8be32 to 2a3dea2 Compare May 4, 2026 19:24
@seanstory seanstory marked this pull request as ready for review May 4, 2026 20:50
@seanstory seanstory requested a review from a team as a code owner May 4, 2026 20:50
@kibanamachine
Copy link
Copy Markdown
Contributor

Flaky Test Runner Stats

🎉 All tests passed! - kibana-flaky-test-suite-runner#12097

[✅] x-pack/platform/test/agent_builder_functional/config.ts: 25/25 tests passed.

see run history

Comment on lines +43 to +45
// Cache connector_ids per request so repeated sml_search calls within
// the same agent run don't re-fetch the agent definition from ES.
const connectorIdsCache = new WeakMap<object, Map<string, string[] | undefined>>();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WeakMaps are always code smells. I think it would be better to use an LRU cache instead? (with max entries + TTL). We have an lru or lru-cache something module or something we commonly use.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL. I'd never heard of WeakMaps before claude spit this out, but my googling made them sound quite clever. Teach me to fish - what's wrong with them, when used for memoization/caching? This would have ensured that connectorIds didn't need to be looked up multiple times for a single request lifecycle, but that each request would have gotten a fresh lookup.

Comment on lines +83 to +88
try {
const agentsService = getAgentsService();
const registry = await agentsService.getRegistry({ request });
const agent = await registry.get(agentEntry.agentId);
connectorIds = agent.configuration.connector_ids;
} catch (error) {
Copy link
Copy Markdown
Contributor

@pgayvallet pgayvallet May 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This totally ignores the configuration_override layer (entry point (which we probably shouldn't).

I think I'd really prefer to expose the agent's config from the tool handler context somehow. This feels way more re-usable and generic if other tools / components needed to do the same thing, wdyt?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed (I think). I didn't expose overwriting connector_ids through the configuration_override, but I think that's ok for now?

Comment thread x-pack/platform/plugins/shared/agent_context_layer/server/services/sml/types.ts Outdated
Comment thread x-pack/platform/plugins/shared/agent_context_layer/server/routes/search.ts Outdated
@elastic-vault-github-plugin-prod elastic-vault-github-plugin-prod Bot requested a review from a team as a code owner May 6, 2026 23:36
@seanstory seanstory force-pushed the seanstory/13759-agent-centric-connectors branch from cf4c484 to bcf9f1d Compare May 6, 2026 23:55
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

feat(agent-builder): add connector_ids to agent storage mapping

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

feat(agent-builder): plumb connector_ids through agent converters

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

feat(agent-builder): add connector_ids to agent CRUD API schemas

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

feat(agent_context_layer): add connectorIds filter to SmlService.search()

Adds optional `connectorIds` param to `SmlService.search()` and
`AgentContextLayerPluginStart.search()`. When provided, builds an ES
bool filter that restricts connector-type SML results to those with a
matching `origin_id`, while non-connector results pass through
unaffected. Exports `buildConnectorFilter` for unit-test coverage.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

feat(agent-builder): sml_search tool filters connectors by agent connector_ids

Resolves the executing agent's connector_ids from the run context at
search time and forwards them to agentContextLayer.search(), enabling
per-agent connector scoping in SML search results.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

feat(agent-context-layer): accept connector_ids in SML HTTP search endpoint

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

feat(agent-builder): frontend SML search passes connector_ids for agent-scoped filtering

Threads the active agent's connector_ids through SmlService.search(), useSmlSearch hook,
the SML command menu component, and the prefetch hook so that SML results are filtered
to the agent's configured connectors.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

fix(agent-builder): make getAgentsService optional in SmlToolsOptions and apply lint fixes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Refactor connector_ids under a top-level 'filters'

Ensure that we can configure agents to not allow any connectors

Types fixing

Pass AgentConfiguration through ToolHandlerContext

Ensure agentConfiguration considers configurationOverrides for tool context

Changes from make api-docs
@seanstory seanstory force-pushed the seanstory/13759-agent-centric-connectors branch from dff6ac8 to c00c45e Compare May 7, 2026 18:19
@kibanamachine
Copy link
Copy Markdown
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #37 / integrations When in the Fleet application and on the Endpoint Integration details page should show the Trusted Apps page when link is clicked
  • [job] [logs] Scout Lane #8 - stateful-classic / default / local-stateful-classic - APM integration not installed but setup completed - Admin user
  • [job] [logs] Scout Lane #8 - stateful-classic / default / local-stateful-classic - Collector integration is not installed - collector integration missing
  • [job] [logs] Scout Lane #8 - stateful-classic / default / local-stateful-classic - Collector integration is not installed - Symbolizer integration is not installed
  • [job] [logs] Scout Lane #8 - stateful-classic / default / local-stateful-classic - Maps - maps telemetry - should return the correct telemetry values for map saved objects
  • [job] [logs] Scout Lane #8 - stateful-classic / default / local-stateful-classic - Observability Landing Page (discover.isEsqlDefault enabled) - redirects to onboarding when no logs data exists
  • [job] [logs] Scout Lane #8 - stateful-classic / default / local-stateful-classic - Profiling is setup and data is loaded - Admin user
  • [job] [logs] Scout Lane #8 - stateful-classic / default / local-stateful-classic - Profiling is setup and data is loaded - Viewer user

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
agentBuilder 1508 1509 +1

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
agentContextLayer 61 62 +1

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
agentBuilder 1.1MB 1.1MB +646.0B

Public APIs missing exports

Total count of every type that is part of your API that should be exported but is not. This will cause broken links in the API documentation system. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats exports for more detailed information.

id before after diff
agentContextLayer 1 2 +1

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
agentBuilder 46.8KB 46.8KB +36.0B
agentContextLayer 1.7KB 1.8KB +88.0B
total +124.0B
Unknown metric groups

API count

id before after diff
@kbn/agent-builder-common 706 707 +1
@kbn/agent-builder-server 528 529 +1
agentContextLayer 108 113 +5
total +7

History

Copy link
Copy Markdown
Contributor

@pgayvallet pgayvallet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (did not look at the browser-side code)

Copy link
Copy Markdown
Contributor

@lorenabalan lorenabalan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and works as expected!

@seanstory seanstory enabled auto-merge (squash) May 8, 2026 16:26
Copy link
Copy Markdown
Member

@nastasha-solomon nastasha-solomon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

API doc updates look good, but it might be worth getting a quick check from @leemthompo since he's more familiar with agent builder than I am.

@seanstory seanstory merged commit 10ee4f9 into main May 8, 2026
33 checks passed
@seanstory seanstory deleted the seanstory/13759-agent-centric-connectors branch May 8, 2026 18:13
Apmats added a commit to Apmats/kibana that referenced this pull request May 8, 2026
Builds on Peter's merged elastic#266573 by adding the schema fields the team
converged on and refactoring title/description/content for BM25 + a
single unified vector retrieval surface.

Fields added:
- origin (keyword, URI form `{type}://{id}`, auto-populated by indexer)
- tags (keyword[], free-form)
- payload (flattened, type-specific opaque data)
- title_autocomplete (search_as_you_type, copy target of title)
- unified_semantic (semantic_text, copy target of title/description/content)

Behavior changes:
- title becomes `text` with copy_to fanning into title_autocomplete and
  unified_semantic. Three retrieval modes (BM25/lexical, prefix/typeahead,
  semantic) from one producer-set field.
- description and content become `text` with copy_to: 'unified_semantic'.
  One inference pass per record instead of three; recall doesn't
  fragment across overlapping content.
- buildSmlSearchQuery: SAYT field paths move from title.* to
  title_autocomplete.*; the should-block uses match: { unified_semantic }
  in place of separate matches on content and description.
- Indexer auto-populates origin = `{attachmentType}://{originId}` on every
  record alongside origin_id.

Kept for back-compat:
- origin_id retained alongside origin until the connector_ids filter
  (elastic#267333) and the search HTTP response migrate to origin.

Type writers need no changes: they keep returning the same SmlChunk
shape; the indexer constructs origin and ES copy_to handles the rest.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Apmats added a commit to Apmats/kibana that referenced this pull request May 8, 2026
Builds on Peter's merged elastic#266573 by adding the schema fields the team
converged on and refactoring title/description/content for BM25 + a
single unified vector retrieval surface.

Fields added:
- origin (keyword, URI form `{type}://{id}`, auto-populated by indexer)
- tags (keyword[], free-form)
- payload (flattened, type-specific opaque data)
- title_autocomplete (search_as_you_type, copy target of title)
- unified_semantic (semantic_text, copy target of title/description/content)

Behavior changes:
- title becomes `text` with copy_to fanning into title_autocomplete and
  unified_semantic. Three retrieval modes (BM25/lexical, prefix/typeahead,
  semantic) from one producer-set field.
- description and content become `text` with copy_to: 'unified_semantic'.
  One inference pass per record instead of three; recall doesn't
  fragment across overlapping content.
- buildSmlSearchQuery: SAYT field paths move from title.* to
  title_autocomplete.*; the should-block uses match: { unified_semantic }
  in place of separate matches on content and description.
- Indexer auto-populates origin = `{attachmentType}://{originId}` on every
  record alongside origin_id.

Kept for back-compat:
- origin_id retained alongside origin until the connector_ids filter
  (elastic#267333) and the search HTTP response migrate to origin.

Type writers need no changes: they keep returning the same SmlChunk
shape; the indexer constructs origin and ES copy_to handles the rest.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Apmats added a commit to Apmats/kibana that referenced this pull request May 8, 2026
Builds on Peter's merged elastic#266573 by adding the schema fields the team
converged on and refactoring title/description/content for BM25 + a
single unified vector retrieval surface.

Fields added:
- origin (keyword, URI form `{type}://{id}`, auto-populated by indexer)
- tags (keyword[], free-form)
- payload (flattened, type-specific opaque data)
- title_autocomplete (search_as_you_type, copy target of title)
- unified_semantic (semantic_text, copy target of title/description/content)

Behavior changes:
- title becomes `text` with copy_to fanning into title_autocomplete and
  unified_semantic. Three retrieval modes (BM25/lexical, prefix/typeahead,
  semantic) from one producer-set field.
- description and content become `text` with copy_to: 'unified_semantic'.
  One inference pass per record instead of three; recall doesn't
  fragment across overlapping content.
- buildSmlSearchQuery: SAYT field paths move from title.* to
  title_autocomplete.*; the should-block uses match: { unified_semantic }
  in place of separate matches on content and description.
- Indexer auto-populates origin = `{attachmentType}://{originId}` on every
  record alongside origin_id.

Kept for back-compat:
- origin_id retained alongside origin until the connector_ids filter
  (elastic#267333) and the search HTTP response migrate to origin.

Type writers need no changes: they keep returning the same SmlChunk
shape; the indexer constructs origin and ES copy_to handles the rest.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Apmats added a commit to Apmats/kibana that referenced this pull request May 8, 2026
Builds on Peter's merged elastic#266573 by adding the schema fields the team
converged on and refactoring title/description/content for BM25 + a
single unified vector retrieval surface.

Fields added:
- origin (keyword, URI form `{type}://{id}`, auto-populated by indexer)
- tags (keyword[], free-form)
- payload (flattened, type-specific opaque data)
- title_autocomplete (search_as_you_type, copy target of title)
- unified_semantic (semantic_text, copy target of title/description/content)

Behavior changes:
- title becomes `text` with copy_to fanning into title_autocomplete and
  unified_semantic. Three retrieval modes (BM25/lexical, prefix/typeahead,
  semantic) from one producer-set field.
- description and content become `text` with copy_to: 'unified_semantic'.
  One inference pass per record instead of three; recall doesn't
  fragment across overlapping content.
- buildSmlSearchQuery: SAYT field paths move from title.* to
  title_autocomplete.*; the should-block uses match: { unified_semantic }
  in place of separate matches on content and description.
- Indexer auto-populates origin = `{attachmentType}://{originId}` on every
  record alongside origin_id.

Kept for back-compat:
- origin_id retained alongside origin until the connector_ids filter
  (elastic#267333) and the search HTTP response migrate to origin.

Type writers need no changes: they keep returning the same SmlChunk
shape; the indexer constructs origin and ES copy_to handles the rest.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Apmats added a commit to Apmats/kibana that referenced this pull request May 11, 2026
…nt connector filter support

Two changes that ship together because they touch the same FE surface:

1. Wire the @ menu typeahead to POST /sml/_autocomplete (instead of
   the previously used POST /sml/_search). Adds:
   - `smlService.autocomplete({ query, size, filters? })`
   - `queryKeys.sml.autocomplete(query, filters?)`
   - `useSmlAutocomplete(query, { filters? })` hook
   - `render_sml_highlight.tsx` helper that parses ES highlight snippets
     (`<em>...</em>`) into React fragments — currently inert on the SAYT
     path because of ES bug elastic#53744, forward-compatible when it lands.
   - `Sml` component switches to the new hook and renders per-row
     `matched_discovery_labels` (`kind`-aware) instead of client-side
     `EuiHighlight` on `${type}/${title}`.
   - Drops `sml_command_menu_highlight.{ts,test.ts}` — the old
     client-side highlight parser is no longer needed.

2. Restore agent-centric connector scoping (Sean's
   `agent-centric connectors` feature, elastic#267333) on the autocomplete
   route. The earlier autocomplete commit (03da4f4) added the route
   without a `filters` parameter, which silently broke the @ menu's
   respect for `agent.configuration.connector_ids`. This commit:
   - BE: adds `filters?: SmlSearchFilters` to the autocomplete route
     schema and threads it through `SmlService.autocomplete` and
     `autocompleteSml`, which now calls the existing `buildTypeFilters`
     helper (shared with the search path) so the filter clause is
     identical between routes.
   - FE: `useSmlAutocomplete` accepts `{ filters? }`,
     `usePrefetchSml(filters?)` regains the filter param, the
     command-menu orchestrator re-prefetches SML when the agent's
     filters change after the async agent fetch resolves.
   - Tests: new BE unit test asserting filters flow into the ES filter
     clauses via `buildTypeFilters`; new FE hook test covering the
     filters arg; existing `sml.test.tsx` + `use_prefetch_sml.test.tsx`
     updated to the new mocks.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Apmats added a commit to Apmats/kibana that referenced this pull request May 12, 2026
…nt connector filter support

Two changes that ship together because they touch the same FE surface:

1. Wire the @ menu typeahead to POST /sml/_autocomplete (instead of
   the previously used POST /sml/_search). Adds:
   - `smlService.autocomplete({ query, size, filters? })`
   - `queryKeys.sml.autocomplete(query, filters?)`
   - `useSmlAutocomplete(query, { filters? })` hook
   - `render_sml_highlight.tsx` helper that parses ES highlight snippets
     (`<em>...</em>`) into React fragments — currently inert on the SAYT
     path because of ES bug elastic#53744, forward-compatible when it lands.
   - `Sml` component switches to the new hook and renders per-row
     `matched_discovery_labels` (`kind`-aware) instead of client-side
     `EuiHighlight` on `${type}/${title}`.
   - Drops `sml_command_menu_highlight.{ts,test.ts}` — the old
     client-side highlight parser is no longer needed.

2. Restore agent-centric connector scoping (Sean's
   `agent-centric connectors` feature, elastic#267333) on the autocomplete
   route. The earlier autocomplete commit (03da4f4) added the route
   without a `filters` parameter, which silently broke the @ menu's
   respect for `agent.configuration.connector_ids`. This commit:
   - BE: adds `filters?: SmlSearchFilters` to the autocomplete route
     schema and threads it through `SmlService.autocomplete` and
     `autocompleteSml`, which now calls the existing `buildTypeFilters`
     helper (shared with the search path) so the filter clause is
     identical between routes.
   - FE: `useSmlAutocomplete` accepts `{ filters? }`,
     `usePrefetchSml(filters?)` regains the filter param, the
     command-menu orchestrator re-prefetches SML when the agent's
     filters change after the async agent fetch resolves.
   - Tests: new BE unit test asserting filters flow into the ES filter
     clauses via `buildTypeFilters`; new FE hook test covering the
     filters arg; existing `sml.test.tsx` + `use_prefetch_sml.test.tsx`
     updated to the new mocks.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Apmats added a commit to Apmats/kibana that referenced this pull request May 13, 2026
…nt connector filter support

Two changes that ship together because they touch the same FE surface:

1. Wire the @ menu typeahead to POST /sml/_autocomplete (instead of
   the previously used POST /sml/_search). Adds:
   - `smlService.autocomplete({ query, size, filters? })`
   - `queryKeys.sml.autocomplete(query, filters?)`
   - `useSmlAutocomplete(query, { filters? })` hook
   - `render_sml_highlight.tsx` helper that parses ES highlight snippets
     (`<em>...</em>`) into React fragments — currently inert on the SAYT
     path because of ES bug elastic#53744, forward-compatible when it lands.
   - `Sml` component switches to the new hook and renders per-row
     `matched_discovery_labels` (`kind`-aware) instead of client-side
     `EuiHighlight` on `${type}/${title}`.
   - Drops `sml_command_menu_highlight.{ts,test.ts}` — the old
     client-side highlight parser is no longer needed.

2. Restore agent-centric connector scoping (Sean's
   `agent-centric connectors` feature, elastic#267333) on the autocomplete
   route. The earlier autocomplete commit (03da4f4) added the route
   without a `filters` parameter, which silently broke the @ menu's
   respect for `agent.configuration.connector_ids`. This commit:
   - BE: adds `filters?: SmlSearchFilters` to the autocomplete route
     schema and threads it through `SmlService.autocomplete` and
     `autocompleteSml`, which now calls the existing `buildTypeFilters`
     helper (shared with the search path) so the filter clause is
     identical between routes.
   - FE: `useSmlAutocomplete` accepts `{ filters? }`,
     `usePrefetchSml(filters?)` regains the filter param, the
     command-menu orchestrator re-prefetches SML when the agent's
     filters change after the async agent fetch resolves.
   - Tests: new BE unit test asserting filters flow into the ES filter
     clauses via `buildTypeFilters`; new FE hook test covering the
     filters arg; existing `sml.test.tsx` + `use_prefetch_sml.test.tsx`
     updated to the new mocks.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Apmats added a commit to Apmats/kibana that referenced this pull request May 13, 2026
…lastic#14363)

Land the natural-language search API over SML, replacing the transitional
bool.should mash with a proper RRF retriever and introducing the
trust-boundary split between runtime-imposed scoping and
agent-discoverable filters.

Decisions per the implementation prompt §6:

- §6.1 Retrieval: RRF over BM25 (title^2, description, content via
  best_fields multi_match) and semantic (unified_semantic). Filters
  mirrored to each child retriever so RRF can't pull unauthorized docs
  into the fused top-k. Defaults rank_constant=60, rank_window_size=50.
- §6.2 Filter merging: option (2). Service signature splits
  `scoping?: SmlSearchScoping` (runtime-imposed, unconditional) from
  `filters?: SmlSearchFilters` (caller refinement). Trust boundary
  visible at the API layer; merge happens in one place. Sean's per-type
  id-allowlist shape (elastic#267333) survives unchanged as `SmlSearchScoping`.
- §6.3 Agent-supplied dimensions: `types?: string[]`, `tags?: string[]`,
  each lowering into a `terms` clause. Time-range and free-form payload
  filters deferred.
- §6.4 Compact LLM response: SmlSearchResult drops the `content` blob,
  full `payload`, dates, and discovery_labels; gains `more_content`
  (true when the indexed record has non-empty content worth fetching
  via sml_read). `permissions` retained internally for post-hoc
  filtering, stripped from the HTTP response.
- §6.5 Reference resolution: URI strings only — SML does not
  dereference. Inline-expansion deferred until eval data justifies it
  (Reading 1; Sean's "SML shouldn't turn pointers into blobs").
- §6.6 Tool description rewrite with when-to-use guidance and four
  worked examples (plain query, types+tags filter, connector
  restriction, wildcard inventory). Runtime scoping is not exposed in
  the LLM input schema.

Fixes the `total` bug: post-permission-filter `results.length` no
longer overwrites ES `hits.total.value`.

Frontend / HTTP route updates:
- POST /sml/_search body accepts `scoping?` and `filters?` (replaces
  the old `filters` per-type id-allowlist field and `skip_content`).
- POST /sml/_autocomplete renames `filters` → `scoping`; no
  agent-discoverable filters on this route (no LLM in the path).
- Frontend SmlService, useSmlSearch, useSmlAutocomplete, usePrefetchSml,
  queryKeys, and buildSmlScopingFromAgent (formerly
  buildSmlFiltersFromAgent) all follow the new naming.

Tests:
- New unit tests for RRF body, filter threading through child
  retrievers, vocabulary-mismatch over the semantic leg, more_content
  on/off, compact result mapping, agent-filter builder, and tool
  wrapper scoping/filters mapping.
- FTR + Scout integration tests updated to drop content/skip_content
  assertions and lock in the no-content invariant.

Out of scope (deferred per epic): reranker, kneedle, per-type
retriever profiles, HyDE/query expansion, reference inline-expansion,
telemetry instrumentation (elastic#14366), recrawl/versioning (elastic#14367).

Open coordination points (not blocking this PR):
- Inference model on unified_semantic still relies on defaults
  (Kathleen Mar 19: pin Jina V5). Belongs to A.
- Kathleen review on A's PR proposes splitting unified_semantic into
  per-field semantic_text fields. If A reverts unified, the semantic
  leg in this PR fans out from 1 to 2-3 child retrievers — small
  retriever-only change.
- Pierre's configuration_override-aware tool handler context
  (elastic#267333 review) — wrapper currently reads agentConfiguration from
  the tool handler context, which `runner.ts` already resolves with
  overrides applied via `resolveConfiguration`. Note in code.

Stacked on top of apmats/sml-autocomplete-followup (elastic#14364). Once
autocomplete merges, this PR rebases to main.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants