Elasticsearch for AI

Your Elasticsearch cluster, working with AI. A node in AI toolkit mode lets an AI Node use only the indices you list. The same cluster can keep the memory of an AI Node and a vector store. All of it lives in your cluster, so it doesn't count against your plan.

ℹYou need an Elasticsearch connection first: Settings → Credentials, Elasticsearch type. It works with Elastic Cloud (Hosted and Serverless) and with your own cluster. Everything on this page uses that credential, and what it can do depends on what its key is allowed to do: see The key for the AI. The node itself, with its operations and its trigger, has its own page: Elasticsearch.

AI toolkit mode

On an Elasticsearch node, the Mode field has an AI toolkit option. It turns the node into 23 tools that an AI Node — or an MCP client, through one of your MCP servers — calls by name: an assistant that answers from your orders, or one that looks into your logs. The model never writes the call of its own: each tool builds the request that HostWebhook runs, and the indices in it have to be on your list.

ToolWhat it doesClassAt the start
list_elasticsearch_indicesLists the indices it can use, with their documents, size and health.readOpen
get_elasticsearch_mappingThe fields of an index and their types.readOpen
search_elasticsearchA Query DSL search: sort, fields, aggregations, up to 50 documents a call.readOpen
get_elasticsearch_document_countCounts the documents that match a query, without bringing them.readOpen
get_elasticsearch_documentOne document by its ID.readOpen
get_elasticsearch_documentsUp to 50 documents by their IDs.readOpen
search_elasticsearch_vectorsThe nearest neighbours of a vector (kNN), given as numbers or made by a model of your cluster from a text. Up to 50.readOpen
search_elasticsearch_semanticSearches by meaning a semantic_text field, or by meaning plus words (hybrid). Up to 50.readOpen
get_elasticsearch_cluster_infoThe version, the health and the number of nodes. It says nothing of the indices.readOpen
query_elasticsearch_esqlAn ES|QL query. It can only read.readBlocked
query_elasticsearch_sqlAn SQL SELECT. It can only read.readBlocked
create_elasticsearch_indexCreates an index, with its mappings and settings.writeBlocked
run_elasticsearch_inferenceRuns a model of the cluster (embeddings, rerank, completion) on a text. It reads no index, but it can cost money.writeBlocked
index_elasticsearch_documentAdds a document. With an ID that exists it replaces it, unless “only create” is true.destructiveBlocked
update_elasticsearch_documentChanges fields of a document, or runs a script on it.destructiveBlocked
delete_elasticsearch_documentDeletes a document.destructiveBlocked
bulk_elasticsearch_documentsUp to 100 add, change or delete items in ONE index. Not atomic.destructiveBlocked
update_elasticsearch_by_queryRuns a script on every document that matches a query.destructiveBlocked
delete_elasticsearch_by_queryDeletes every document that matches a query.destructiveBlocked
reindex_elasticsearch_documentsCopies the documents of one index into another. Both have to be on the list.destructiveBlocked
update_elasticsearch_aliasesAdds an alias, removes it, or swaps it from one index to another.destructiveBlocked
delete_elasticsearch_indexDeletes a whole index. It only exists with “Allow deleting indices” on.destructiveBlocked
execute_elasticsearch_api_requestA call of the API of its own, inside a closed list of shapes (see below).destructiveBlocked

What you control

Field of the nodeWhat it holds
Indices the AI can useThe names or patterns it can touch, one per line, like orders-2026 or logs-*. Up to 50. Empty means none.
Fields the AI can seeThe fields that come back in the documents it reads, one per line, like title or user.*. Up to 100. Empty means all of them.
Allow scripts from the AIOff by default. On, the AI can write Painless scripts in its queries and updates, and they run inside your cluster.
  • Indices the AI can use. Empty means none: until you add one, every tool that touches an index refuses. It is checked before HostWebhook connects, and the refusal says which indices it can use, so the model doesn't have to guess: “The AI can't use "payments-2026". It can use: orders-*, logs-2026. Add another to "Indices the AI can use".” With the list empty it says so: “The AI can't use "orders-2026": no index is allowed yet. Add one to "Indices the AI can use".” A name or pattern has lower case letters, numbers and _ - . + *, with no dot at the start, and it is never a template: a {{ }} or a date math can't be a name. The model may ask for a pattern only if one of yours covers it as it is written: logs-2026-* under logs-*, never * under it.
  • An alias or a data stream is not a way round. Before the call, HostWebhook finds out which indices a name really reaches. If one of them is an index that HostWebhook made for a vector store or a memory, the call is refused.
  • Fields the AI can see limits what comes back of a search or a get: a field outside the list is a refusal, not a silent cut. It is not a permission: a query can still filter by a hidden field. For a hard limit, give the credential a role with field-level security. With the list set, ES|QL, SQL, the API request and the aggregations are refused, because they can name any field.
  • Blocked tools. The ones that write, delete, run ES|QL, SQL or a model, or call the API start blocked: 14 of the 23. Turn on only the ones the agent should have. The AI Node's Block destructive tool calls switch stops the ten destructive ones when it is on. Block any other under Block these tool calls.
  • Allow deleting indices. The switch of the node, Off until you turn it on: without it delete_elasticsearch_index is not offered to the model (and, if it is called by name, it is refused), and neither is a DELETE of an index through the API request.
  • Allow scripts from the AI. Without it, a script in a query, an aggregation, the mapping of a new index, an update or an item of a Bulk is refused. update_elasticsearch_by_query needs it, because it is a script.
  • In MCP the tools come with the same classes: reads go through run_read_operation, the two that add (create an index, run a model) through run_write_operation and the ten that can replace or delete through run_destructive_operation. Claude, through the connector, shows the step and its error.

What no call can do

  • A query can't read another index. index, _index, indexed_shape, percolate and wrapper are refused in every query of the model, whether scripts are on or off.
  • ES|QL has to start with FROM (or TS or METRICS), and every source in it has to be on your list. ENRICH, LOOKUP, JOIN, COMPLETION, RERANK, FORK, the functions that call a model, cluster:index and ::failures are not available. SQL has to be one SELECT whose every FROM is on the list: FROZEN, JOIN, UNION, WITH, a ; and SHOW, DESCRIBE or SYS are refused. Values go in the parameters with ?, never inside the text.
  • The API request has to start with an index of your list, and what comes after it is a closed list: search, count, mget, field caps, validate, explain, term vectors, reads of the mapping, the settings, the stats and the aliases, refresh, and the _doc, _create, _update and _source calls. Everything else is refused, including _clone, _shrink, _split, _rollover, _alias, _close, a write to _settings and a delete or update by query (they have their own tools, with the brake). The parameters of the URL are a closed list too: size, from, sort, q, filter_path, _source, timeout, refresh… Creating an index through it takes only mappings and settings, never aliases.
  • An alias a tool adds or swaps is a name of your list too: without that, the AI could add an alias that your own app reads to an index it can touch.
  • A write into an index with a percolator field. A field of that type stores queries, and the cluster runs them when a document is written; they can read other indices. Before a tool adds, replaces or changes a document, runs a Bulk, a Reindex or a change by query, writes through the API request, or puts an alias in front of an index, HostWebhook reads the mapping of the names the call touches and refuses if one has a percolator field. Use an index without one.
  • A write into an index that does not exist yet is judged by what the cluster would create it with: before it, HostWebhook reads the templates that would apply to the new name (_index_template/_simulate_index and the older _template) and refuses if one of them gives it a percolator field. Reading them takes the cluster privilege manage_index_templates (manage includes it): with a key that lacks it, the AI can't write into a new name and is told “That index does not exist yet, and the templates of the cluster could not be read to see what it would be created with, so the AI can not tell whether it would have a percolator field. Create the index first with create_elasticsearch_index, then write to it.” Either give the key that privilege or create the index first (the AI can, with create_elasticsearch_index once you unlock it). A name that exists is judged by its own mapping and no template is read.
  • The model can't turn a brake off: the routing, the pipeline, the limits of a change by query and the two switches of the node are yours, and they are not arguments of any tool.
WhatThe cap
Documents a search brings50 a call (10 by default)
Documents by ID50 a call
Items of a Bulk100, all in one index
Neighbours of a vector search50
Rows of an SQL query100
What goes back to the model20,000 characters of an answer by default (the field Characters per call sent to the model), and never more than 100,000: a longer answer is cut, with a note to the model
A JSON argument of the model256 KB, and at most 64 levels deep
Changes by query and ReindexThe brake is always on for the AI, with the limit of the node (1,000 if it has none): a node that turned it off for its own steps does not turn it off for a model
Return allNever: the AI reads in pages of the size above

What goes back to the model

  • The documents come back as the cluster has them, limited to the fields you listed, and cut at the cap above: 20,000 characters unless you raise Characters per call sent to the model, and never more than 100,000.
  • The documents are data that whoever writes to the index wrote, not instructions. The description of each tool says so, but a model can still be fooled by the text of a document: block the tools it doesn't need, and don't list an index that people you don't trust can write to.
  • What a tool reads goes to the AI provider of the AI Node, because the model reads it: see Elasticsearch data and AI.

Testing a tool

⚠Only a tool call picks the tool. In AI toolkit mode, only an AI Node, an MCP client or a voice agent chooses which tool the node runs. Run Test, a flow or a webhook run the operation saved on the node: an operation in their payload that names another tool is refused.
✦To try a tool, call it from an AI Node or from an MCP client. Its arguments look like this:
jsonA tool call
{ "operation": "search_elasticsearch", "index": "orders-2026", "query": "{\"match\":{\"title\":\"shoes\"}}", "size": 5 }
⚠A node in toolkit mode is not part of the pipeline: remove its connections. Only an AI Node, an MCP client or a voice agent picks the tool. What reaches the node any other way (a connection of the flow, a webhook, Run Test) follows one rule: with no operation in it, the node refuses, and its answer says it is an AI toolkit and that the call named no tool; with an operation equal to the one saved on the node, it runs the saved operation, with its saved settings and its templates, as if the node were not in toolkit mode; with any other tool, it refuses. A tool the owner blocked is refused too. Whoever calls a public webhook can put an operation in the body, so a connection that leads into a toolkit node can make it run its saved operation: take the connection out when you switch the mode.

The key for the AI

The AI can only do what the key of the credential can do, whatever the toolkit lets through. Make two keys, and so two credentials: one that only reads, for the Elasticsearch node in AI toolkit mode, and one for the memory and the vector stores, which save in indices that start with hostwebhook-. The first one can never reach the indices of the second, and the second one can't read your own data:

jsonKibana · Dev Tools · the key of the AI toolkit
POST /_security/api_key
{
  "name": "hostwebhook-ai-toolkit",
  "role_descriptors": {
    "hostwebhook-ai-toolkit": {
      "indices": [
        { "names": ["orders-*", "logs-*"], "privileges": ["read"] }
      ]
    }
  }
}
jsonKibana · Dev Tools · the key of the memory and the vector stores
POST /_security/api_key
{
  "name": "hostwebhook-ai-memory-and-stores",
  "role_descriptors": {
    "hostwebhook-ai-memory-and-stores": {
      "indices": [
        { "names": ["hostwebhook-*"], "privileges": ["create_index", "read", "write"] }
      ]
    }
  }
}

Copy the encoded value of each answer into the API key field of its own credential. On Serverless, or if you prefer the screen, use Stack Management → API keys.

The callWhenThe privilege
Read the mapping of the indexEvery first use of a store or a memory, to check that the index is the one HostWebhook madeview_index_metadata (or read)
Create the indexThe first use, when it does not existcreate_index (or manage)
Write chunks or messagesSaving, and ingesting a conversationwrite
Search and countA query, the Content tab, the Memory tabread
Delete by queryDeleting a document or a conversation, a flush, the oldest messagesread and write
Delete the indexOnly “Also delete my data” when you delete a vector storedelete_index (or manage)
List the inference endpointsOnly a store where Elasticsearch makes the vectors: the Test and the first use. Optional: without it the check is skippedmonitor_inference on the cluster (monitor includes it)
  • A toolkit that only reads needs read on its indices and nothing else: give it a key with no write privilege (the first one above), and a tool that writes will say the key can't, instead of changing anything. Unlock the tools that write only on a key that has the privileges they need.
  • A store where Elasticsearch makes the vectors can also read the list of inference endpoints, to check that yours exists. That is a privilege of the cluster, not of an index: add "cluster": ["monitor_inference"] to the role of the key (the monitor privilege includes it). It is optional: without it the check is skipped.
  • A toolkit that writes into an index that does not exist yet needs one more thing on the cluster: "cluster": ["manage_index_templates"] (manage includes it), because HostWebhook reads the templates before such a write. It lets the key change the templates of the cluster, not only read them, so if that is more than you want to give, create the index first: a toolkit that only writes into indices that exist doesn't need it.
  • The memory and the vector store use indices of their own, with a prefix you choose, so the key for them only has to reach those names: keep it apart from the key of a toolkit, and never let a toolkit key reach them (HostWebhook also refuses it, see A name that no one else can read).
  • Never the superuser role. A 403 is not a failure of HostWebhook: the key lacks a privilege on that index, and it is shown as an error of your cluster.

Memory of an AI Node in your Elasticsearch cluster

The AI Node can keep its conversations in an index of your cluster instead of in ours: turn Memory on in its Memory tab and pick Elasticsearch. Each message is one document, saved with your credential. It recalls them by recency — the last turns of that conversation, in order — so it calculates no embeddings, and no text goes to an embeddings provider.

Set it up

  1. In the AI Node's Memory tab, turn Memory on and choose Elasticsearch.
  2. Elasticsearch connection: the credential. Its key needs the privileges of The key for the AI.
  3. Index: fixed text, hostwebhook-memory to start. Lower case letters, numbers and _ -, up to 100 characters, and never a template. HostWebhook makes it and adds the node and the conversation to each message. Pick one that nothing else of yours uses.
  4. Keep a conversation for: how long a message is remembered, counted from the message itself, not from the last one of its conversation. It is 30 days until you choose, from 1 hour to 365 days, or Never, which you choose on purpose and keeps everything until you delete it. A message older than that is no longer recalled, and it is deleted from your cluster the next time the node writes to the memory. A node that stops writing keeps what it has until you delete it (see The Memory tab) or delete the node.
  5. Turns kept per conversation: the latest 100 turns to start, 1,000 at most. A turn is what a person said and the answer to it. When a conversation passes it, its oldest messages are dropped.
  6. Session ID: what identifies one conversation, usually a template of the event like {{payload.from}}.

AI-extracted facts isn't offered with this memory, because it needs embeddings: it says “Facts isn't available when the memory is Elasticsearch, because it needs embeddings. Use Paired, or the built-in memory.” The built-in memory, or any other that has facts, does.

What is saved in your cluster

One index, made by HostWebhook with a strict mapping (a write with another field fails instead of growing the mapping) and with its mark in the mapping, _meta.hostwebhook, which says it is the memory of an AI Node. No settings are sent, so it works on Serverless. One document per message:

FieldTypeWhat it holds
nodekeywordThe id of the AI Node. Every search, count and delete of a node asks for it, so a node never reads what belongs to another.
sessionkeywordA hash of the Session ID (32 characters), so the field you can search in your cluster doesn't carry a phone number or an email address.
sessionNamekeyword, not indexedThe first 256 characters of the real Session ID. It is only kept so that the Memory tab can show it, and it can't be searched.
rolekeywordWho said it.
contenttextThe message. The Memory tab searches it with your cluster.
atdateWhen, in milliseconds. It is strictly increasing inside a conversation, so two messages never share a time.
  • One index serves every node that points at it. Each message carries its node and its conversation, and every question asks for both, so two nodes can share an index and never see each other's messages.
  • The mark decides whose the index is. HostWebhook reads nothing from an index, writes nothing to it and deletes nothing in it unless it carries the mark of a memory, with this mapping. An index that exists and is not that is refused with “Index «orders-2026» already exists and HostWebhook did not create it. Pick another index name.”, or says it has another schema, and it is never touched or repaired. Reading never makes the index: before the first message there is nothing to read.
  • It keeps at most N turns (the oldest go, the newest stay) and recalls nothing past its expiry. Each time the node writes to the memory, it also deletes what expired in any conversation of that node. If that cleaning fails, the message was saved all the same. Nothing sweeps a node that has stopped writing: its messages stay in your cluster, out of the AI's reach, until you delete them.
  • A message longer than 16 KB is cut and ends with [cut]. A message that repeats the last one isn't written twice. A Session ID of up to 4,096 characters works; a longer one is refused, not cut, so two different ones never share a conversation.

The Memory tab

Under Settings → AI Memory, each node lists its conversations (their count, the first date and a preview of the last message) with the real Session ID, and you can read the messages, newest first, with the exact total. The search is done by your cluster. You can forget one conversation, delete the messages older than a date (a conversation that has newer ones keeps them) or empty the node. What you delete goes from your cluster. The tab shows what is in your cluster, so it can still list a message that expired and hasn't been swept yet. Deleting a single message isn't available with this memory: a message has no id you can name.

If your cluster doesn't answer

The node still answers, just without its memory, and Monitoring shows an AI Memory warning with one line of ours: it never repeats what your cluster said. A key your cluster rejected (and only that) says to reconnect, and marks the credential Needs reconnect, like the Elasticsearch node; the next success takes the mark off. If the index isn't the one HostWebhook made, the line says so and asks you to pick another index.

Deleting the node

Deleting an AI Node empties its messages in your cluster when it answers (never those of the other nodes that share the index), and only in an index that carries the mark of a memory. It never drops the index. If your cluster doesn't answer, the node is deleted anyway and its messages stay: delete them from your side by the node field. Deleting the whole account can't empty your cluster, because there is no account left to connect with, as with your own MongoDB or PostgreSQL.

What it keeps, and where

The memory holds what people said and what the AI answered, in a cluster of yours. A message is recalled for the time you chose (30 days to start); what expired is deleted the next time the node writes to the memory, and a node that stops writing keeps its messages until you delete them in the Memory tab or delete the node. It is your cluster and your decision. HostWebhook keeps no copy, and its logs hold only counts, sizes and times: never a message or a Session ID.


A vector store in your Elasticsearch cluster

A vector store can keep its chunks in one index of your cluster, and search them from the Vector Store node and as a tool of the AI Node. Storage lives in your cluster, so it doesn't count against your plan: you pay Elastic, or whoever runs it, for the space. The vectors are made by the embedding model you pick when you create the store, with your own key, or, on a cluster of 8.18 or later, by Elasticsearch itself: see Let Elasticsearch make the vectors.

Which clusters work

Your clusterVector store
Elasticsearch 8.0 or later (Elastic Cloud, Serverless, your own)Works. Up to 1,024 numbers in each vector before 8.11, and up to 4,096 since (Serverless is like 8.11 or later). On 8.18 or later, and on Serverless, your cluster can also make the vectors itself.
Elasticsearch 8.0 to 8.17Works with the vectors of your embedding model. Letting Elasticsearch make them doesn't: “Letting Elasticsearch make the vectors needs Elasticsearch 8.18 or later, or Serverless. This cluster is older. A store with the vectors of your embedding model works on 8.0 or later.”
Elasticsearch 7.17No: its vector field can't be indexed. Documents and search work. “Vector search needs Elasticsearch 8.0 or later. This cluster is older. Documents and search work.”
OpenSearchNot yet. “This is OpenSearch, which keeps vectors in its own way, and HostWebhook doesn't support that yet. Documents and search work.” Nor can it make the vectors itself: “This is OpenSearch, which doesn't have semantic_text. A store with the vectors of your embedding model needs Elasticsearch 8.0 or later; HostWebhook doesn't support OpenSearch for it yet.”

Create the store

  1. Open Settings → Vector Stores, click New, choose the embedding model and, as the backend, Elasticsearch (your own). To let your cluster make the vectors instead, follow Let Elasticsearch make the vectors.
  2. Elasticsearch connection: the credential. Its key needs the privileges of The key for the AI.
  3. Index name: the index HostWebhook makes in your cluster. Fixed text, never a template: lower case letters, numbers and _ -, up to 100, e.g. hostwebhook-docs. Leave it empty and HostWebhook picks hostwebhook-vec- followed by the id of the store.
  4. Metadata fields: up to 10 fields you can filter by, each Text or Number, like language (text) or year (number). A name starts with a letter, has letters, numbers and _, up to 32, and can't be a name that a chunk already has. You can't add one after the store exists, because the index is made with them.
  5. Click Test connection. If it says “Vector search: available.” the cluster can hold vectors. If it doesn't, it says why and Create store refuses with the same line. Nothing is made in your cluster by the test. Then click Create store.

What HostWebhook creates in your cluster

One index, made on the first use, with a strict mapping and its mark in it, _meta.hostwebhook, which says it is the index of this store. One document per chunk:

  • content, the text of the chunk (a text field, so the Content tab can show and search it).
  • embedding, its vector: an indexed dense_vector with the size of your embedding model and cosine similarity. The algorithm and the distance are fixed, so there is nothing to choose.
  • sourceDocId, sourceDocName, sourceDocType and sourceHash, the document a chunk comes from and the hash of its content (keywords).
  • createdAt, charCount and tokenCount; the metadata of the chunk is kept as it came (and not indexed), and the fields you declared are indexed under meta.
  • The mark decides whose the index is. Before the first use, and before every delete and every flush, HostWebhook reads the mapping and compares it. An index that already exists and is not this store's is refused, never used and never repaired: “Index «orders-2026» already exists and HostWebhook did not create it. Pick another index name.”, “Index «hostwebhook-docs» belongs to another store. Pick another index name.” or “Index «hostwebhook-docs» already exists with another schema. Pick another index name.”. An index that is gone isn't made again by a delete.
  • The size of the vector is checked: “This embedding model gives vectors of 1536 numbers and the index holds 768. Create a new store.” A cluster that is older than 8.11 takes up to 1,024 numbers: “This cluster takes vectors of up to 1,024 numbers. Use a smaller embedding model, or Elasticsearch 8.11 or later.”
  • The index can't be one that something else of the organization already uses on the same cluster: see A name that no one else can read.

Filters

A search can be narrowed by the document a chunk comes from (sourceDocId, sourceDocName, sourceDocType, sourceHash) and by the metadata fields you declared. A Text field matches one of a list of exact values (a language); a Number field matches an exact number or a range (a year). A field you didn't declare can't be filtered on later: a filter that names one is refused, not ignored. Create a new store. The Metadata filter of the Vector Store node uses those names, the same as on the other backends.

Limits

The numbers are in Limits and what each thing costs. Three are worth knowing before you use it: a search waits 10 seconds in your cluster and, if it ran out of time, says so and asks you to run it again (“The cluster took too long to answer and the search is not complete. Run it again.”) instead of returning a part as if it were the whole; a bulk that fails some chunks says how many (“1 of 3 chunks could not be saved”) and “The others were saved: run the ingest again with duplicate checking on, so they are not saved twice.”; and a delete that matches more than 5,000 chunks does them in rounds, or says “That matches too many chunks to delete in one go. Delete them by document, or flush the store.” or “Some chunks could not be deleted yet. Run it again to delete the rest.”

Let Elasticsearch make the vectors

In the store above, the embedding model you pick makes the vectors, with your own key, and your cluster only keeps and searches them. If your cluster has an inference endpoint (the ELSER that comes with it, or a model you run or connect there; check that your subscription (or a trial) includes inference), the store can let Elasticsearch make the vectors instead: HostWebhook sends your cluster the text of each chunk and the text of each question, and the cluster turns them into vectors with that endpoint. So the store has no embedding model, no vector size and no embedding key, and HostWebhook calls no embedding service for it.

My embedding modelElasticsearch makes them
Who makes the vectorsThe embedding model you pick, with your own keyYour cluster, with an inference endpoint of its own
NeedsElasticsearch 8.0 or laterElasticsearch 8.18 or later, or Serverless
The store keepsThe model, the size of its vectors and the credential of the modelThe inference endpoint, nothing else
The score of a matchCosine similarity, from 0 to 1The one of the model: from 0 to 1, and close together, with a dense model like e5; can go above 1 with a sparse one like ELSER
Can it change laterNoNo: the mode and the endpoint are chosen when the store is created
  1. In Settings → Vector Stores → New, choose the backend Elasticsearch (your own) and, under Who makes the vectors, Elasticsearch makes them. The embedding model and its key leave the form: this store doesn't use them.
  2. Inference endpoint: the id of an endpoint of your cluster, like .elser-2-elasticsearch. Leave it empty and that one is used: the ELSER that comes with the cluster (Elasticsearch 8.17 or later, and Serverless). It has to exist in your cluster and make vectors (text_embedding or sparse_embedding), and it can't be changed later. Using an inference endpoint also depends on the license of your cluster: check that your subscription (or a trial) includes inference, or the endpoint answers 403.
  3. The connection, the Index name and the Metadata fields are the same as above.
  4. Click Test connection. If it says “Semantic search: available.” the cluster can do it and the endpoint is there. A cluster that answered and can't is shown as Not available on this cluster, with its line (“Letting Elasticsearch make the vectors needs Elasticsearch 8.18 or later, or Serverless. This cluster is older. A store with the vectors of your embedding model works on 8.0 or later.”), and Create store refuses with the same line.

The endpoint is checked before the index is made. HostWebhook reads the list of inference endpoints of your cluster (one read: it keeps only the id, the kind and the service of each, never their settings) and says what is wrong in plain words: “The inference endpoint «my-elser» doesn't exist in your cluster. Create it there, or pick another one.” or “The inference endpoint «my-reranker» doesn't make vectors (it is for rerank). Pick one for text embeddings or sparse embeddings.” That read needs the cluster privilege monitor_inference, which monitor includes. A key without it is not refused: the check is skipped and the store is made, so HostWebhook can't tell you if the name is wrong. Any other failure of that read (a rejected key, a cluster that doesn't answer) does stop the store. A 403 that comes from the license of the cluster looks the same as a missing privilege, so the store is made and fails when it first writes.

  • What HostWebhook creates is the same index, with the same strict mapping, the same fields to filter and list by and its mark, which now says mode: "semantic". The one difference: there is no embedding field. The text stays in content and is copied into semantic, a semantic_text field that holds your endpoint. HostWebhook never reads semantic back, nor the vectors your cluster keeps for it. An index of one mode is never used as the other: it is refused, not used and not repaired.
  • A search sends the question as text (up to 4,096 characters: “The question is empty, is not text or is too long.”) and the cluster makes its vector with the same endpoint. Filters work exactly as in the other mode.
  • The score is the one of the model, so what it looks like depends on the model. A dense model like e5 gives scores from 0 to 1 that sit close together: in a live test, the best three matches of one question scored 0.906, 0.869 and 0.862. A sparse model like ELSER has no top, and a score can be above 1. The Query box of the store says so, and doesn't paint it like a cosine score. Min score is the cluster's own min_score: above 1 only makes sense with ELSER or a similar sparse model, and with a dense one the useful floor is between 0 and 1 (a Min score of 2 returns nothing). In the Vector Store node the box goes up to 1000; with a cosine store, 1 is the highest value that can match, and a bigger number is refused when the node runs.
  • HostWebhook sends the text of the chunks and of the questions to your cluster, and to no embedding service. What a search finds comes back through HostWebhook, and an AI Node hands it to its model, as with any other store. If the endpoint is itself a connection to an outside service that you made in Elasticsearch (an OpenAI or a Cohere endpoint, say), your cluster sends the text there, under the terms you have with that service: HostWebhook is not part of that call.
  • The page of the store has a Vectors section in place of Embedding: what makes them (Elasticsearch) and the endpoint, which can't be changed, and no credential to pick or rotate.

Deleting a store: your data stays, or goes too

Because the chunks are in your cluster, deleting the store asks what to do with them, and never chooses for you:

  • Delete store, keep my data is the main button, and the one with the focus. HostWebhook stops using the store and forgets it. Your cluster is not touched, not even the credential: the index and the chunks stay, and you can use them anywhere else.
  • Also delete my data drops the index of this store, with every chunk in it, and nothing else. It does it only if the index still carries the mark of this store: an alias, an index of another store, the index of a memory or one without a mark is refused, and the store stays. It can't be undone.

Flush deletes the chunks and keeps the store. Deleting the whole account can't empty your cluster, because there is no account left to connect with.


A name that no one else can read

If the Indices the AI can use of a toolkit included an index of a memory or of a vector store (say hostwebhook-*), an AI Node, and so anyone who talks to the bot, could read the conversations of the other sessions or the chunks of a store through a different door, with other rules. So HostWebhook refuses it from every side:

  • A toolkit can't be saved with a pattern that covers the index of a memory or of a store: “This pattern includes an index that holds the conversations of an AI Node's memory. Pick a narrower pattern.” or “This pattern includes an index that holds the chunks of a vector store. Pick a narrower pattern.”
  • A memory or a store can't be saved on an index that a toolkit already covers: “An Elasticsearch node in AI toolkit mode can read this index. Pick another index name.”
  • A memory can't take the index of a vector store, or the other way round, on the same connection.
  • It is counted by cluster, not by credential. Two credentials that point at the same cluster (the same address and port, however it is written) count as one, so you can't get round the rule with a second credential. When HostWebhook can't tell which cluster a credential points at, it counts it as the same one, and the save is refused: a name is refused before it is let through.

Another memory on the same index is fine, and so is a store on its own index. The refusal also works at run time, in the gate of the AI, for what was saved before.

Elasticsearch data and AI

  • An AI toolkit brings what it reads to the AI provider you chose for the AI Node, because the model reads it: list only the indices, and with the fields, that you are happy to send there.
  • A vector store sends the text of each chunk and of each question to the embedding provider you picked for the store (OpenAI or Cohere, with your own key).
  • A memory sends nothing to an embeddings provider: it recalls by recency. What the AI Node recalls goes into its prompt, to its AI provider, as with any memory.
  • HostWebhook keeps no copy of your chunks or messages. A failure is logged by its code only, never with what your cluster said or what a person wrote.

Limits and what each thing costs

WhatThe limit
A vector store: the text of a chunk64 KB
A vector store: the metadata of a chunk32 KB, as JSON
A vector store: chunks in one request to your cluster100, or 5 MB, and a bigger write is split into several
A vector store: results of a searchUp to 50
A vector store: filterUp to 12 conditions, up to 10 values in each list, a text of up to 256 characters
A vector store: declared metadata fields10
A vector store: vector sizeUp to 1,024 numbers before Elasticsearch 8.11 and up to 4,096 since (a store where Elasticsearch makes the vectors has none)
A vector store where Elasticsearch makes the vectors: the question of a searchUp to 4,096 characters
A vector store: a search that takes longIt waits 10 seconds in your cluster, and says so if it was not complete
A vector store: a deleteUp to 5,000 chunks each time: HostWebhook asks again while there are more, and says so when there are too many
A memory: a message16 KB, then it is cut and ends with [cut]
A memory: a conversation idUp to 4,096 characters (a longer one is refused, not cut)
A memory: turns of a conversation100 to start, 1,000 at most
A memory: how long a message is remembered30 days to start, from 1 hour to 365 days, or never. Past it the AI no longer recalls it, and it is deleted the next time the node writes to the memory

Storage in your cluster doesn't count against the plan of HostWebhook. Elastic Cloud charges for what the cluster uses, and Serverless charges the queries as compute: a vector search or a semantic one is not free there.

Gotchas

  • Empty means none. A toolkit with no Indices the AI can use refuses every tool that touches an index. That is on purpose.
  • Fields the AI can see is not a permission. It limits what comes back. For a hard limit, use a role with field-level security in the key.
  • Everything starts blocked except the reads. If a tool that writes says it isn't available, unlock it in the node, and check the AI Node's switch that blocks destructive tool calls.
  • An index that HostWebhook didn't make is never used by a store or a memory, even if the name is yours and it is empty. Pick another name, or delete the index yourself.
  • A store can't change its vector size or its declared fields after the index exists. Create a new store.
  • A store where Elasticsearch makes the vectors can't change its endpoint, or go back to an embedding model of its own, after it is made. Create a new store. And its scores depend on the model (from 0 to 1, and close together, with a dense one like e5; can go above 1 with a sparse one like ELSER): don't set a Min score from what a cosine store gave, and above 1 only makes sense with a sparse model.
  • The memory has no facts and no single-message delete: it recalls by recency and forgets by conversation, date or node.
  • A new index name needs the templates read, or the index made first. The key needs manage_index_templates on the cluster for the AI to write into a name that doesn't exist yet, or the index has to be there before it writes. And an index with a percolator field is never written by the AI.
  • The key decides. A 403 is the role of the key lacking a privilege on that index. If the line talks about a traffic filter instead, the privilege is not the problem: the deployment does not let the address of HostWebhook in.

What isn't here yet

  • OpenSearch: it has its own vector field, and it will have its own node.
  • Facts in the memory, and a memory that recalls by meaning.
  • Deleting one message of a memory.

Elasticsearch is a trademark of elasticsearch B.V., registered in the U.S. and in other countries. Elastic is a trademark of elasticsearch B.V.