Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Search AI Tool

Let agents find customers or legal entities by name or number with the Search AI Tool.

The Search AI Tool lets an agent look up customers or legal entities of your tenant by name, number, or other details. The tool runs a text search on a search index that Emporix manages for each entity type, so it needs no embeddings or LLM provider. Use it when the agent must find specific records. To find records by meaning rather than by matching terms, use a RAG Emporix tool instead.

Configuring Search tool

To configure a Search tool, follow these steps:

1

Add the tool

In Agentic AI -> AI Tools, choose Add new tool. On the General tab, set the following fields:

  • Tool Type – Search

  • Tool ID – Unique identifier of the tool, which you cannot change after saving

  • Tool Name – Name displayed in the UI

  • Prompt – Optional instructions that tell the agent when to search

The prompt is added to the tool's built-in description, for example "Use this tool when the user asks about a customer account." If you leave it empty, the agent decides when to search based on the built-in description and its own User Prompt.

Search tool General tab
Search tool General tab
2

Choose what the tool searches

On the Settings tab, set the following fields:

  • Entity Type – Type of records the tool searches, either Customer or Legal Entity

  • Max Results – Number of records the tool returns for one search, from 1 to 10, with a default of 5

Fewer results keep the agent's context small.

3

Save the tool

Choose Save. Saving prepares the search index for the selected entity type.

4

Load existing records

New and changed customers or legal entities are added to the search index automatically. Records that existed before the index was prepared are not. To add them, choose Reindex on the tool in the AI Tools list. All Search tools of the same entity type share one index, so you need to do this only once per entity type, not once per tool.

If you are not sure whether a reindex already ran, for example because another Search tool of that entity type exists, you can run it again. A reindex rebuilds the whole index for that entity type, so it can take a long time when there are many records. While the reindex runs, Reindex is unavailable for tools of that entity type.

5

Attach the tool to an agent

In the agent's Tools tab, add the tool under Native Tools. For details, see AI Agents.

Searched fields

The tool searches the ai-customer or ai-legal-entity index, depending on the entity type. The index defines which fields the agent can search. Text matching is tolerant of small differences. For example, a search for Muller can also find Müller, a name can match a similar-sounding spelling, and Maier can find Maier GmbH. Fields matched exactly let the agent narrow the results, for example by country or type.

Index
Matched by text
Matched exactly

ai-customer

firstName, middleName, lastName, title, company, contactEmail, contactPhone, customerNumber, b2b.companyRegistrationId, addresses.street, addresses.city, addresses.zipCode, addresses.companyName, b2b.legalEntities.name

customerNumber, b2b.companyRegistrationId, addresses.country, type, businessModel, preferredLanguage, preferredSite, metadata.createdAt, b2b.legalEntities._id

ai-legal-entity

name, legalInfo.legalName, legalInfo.taxRegistrationNumber, legalInfo.registrationId, contacts.name, contacts.surname, contacts.email, contacts.phone, entitiesAddresses.name, entitiesAddresses.contactDetails.city, entitiesAddresses.contactDetails.postcode

legalInfo.countryOfRegistration, type, parentId, metadata.createdAt, contacts._id, contacts.customerId, contacts.type, contacts.primary, entitiesAddresses._id, entitiesAddresses.type, entitiesAddresses.contactDetails.countryCode

Access to results

The agent finds only the customers or legal entities that the invoking user or integration is allowed to read. If their read access is restricted, the agent finds only the records within those restrictions. If they can read only their own data, the agent finds only their own customer record or the legal entities they are assigned to. To control who can trigger the agent, set its Required scopes. The same rules apply to RAG Emporix tools for customers and legal entities.

Last updated

Was this helpful?