Working with Saved Queries
Listing and Searching Saved Queries
You can ask the AI Companion to find your saved queries by name, entity type, or tag:
- "List all my saved device queries."
- "Find saved queries tagged 'compliance'."
- "Is there a saved query for unmanaged endpoints?"
- "Show me all saved queries for users."
The agent searches across your saved queries and returns a table of results. Each result includes the query name, entity type, tags, and a link to open the query in the Axonius Query Builder.
Understanding a Saved Query
To understand what a specific saved query does, ask the agent to explain it:
- "What does the 'Unmanaged Devices' query look for?"
- "Explain the filters in the 'High Risk Users' saved query."
The agent reads the query's filter conditions and describes them in plain language so you understand exactly what the query matches without needing to open the Query Wizard.
Running a Saved Query
The AI Companion does not run saved queries directly from the chat; it provides a link to open the query in the asset page where you can run it. To open a saved query, click the link in the agent's response.
If you want the agent to show you the results matching a saved query's filter in the chat, you can ask:
- "Show me the results of the 'Stale Devices' saved query."
The agent retrieves the query's filter conditions and applies them to return a live result in the chat.
Saving a Query from Chat
When the agent creates a saved query, it checks whether a similar saved query already exists in your environment. If a close match is found, the approval shows an option to use the existing query instead of creating a new one.
Select Use existing query "[name]" instead to apply the existing query to your task, rather than creating a duplicate.
Merging Duplicate Predefined Queries
Axonius ships a set of predefined saved queries. Over time, some of these predefined queries may accumulate duplicates β for example, from older platform versions that saved the same query under a slightly different name.
To find and merge these duplicates, ask the agent:
- "Find duplicate predefined saved queries."
- "Clean up duplicate predefined queries."
The agent shows you a preview of what would be merged: which query is kept, which are archived, what references (charts, enforcements, cases, and so on) would be updated, and whether the filters match or differ. The preview makes no changes.
Groups where the filters are identical merge automatically. Groups where the filters differ require you to confirm each one after reviewing the comparison.
After you confirm, the agent runs the merge. To undo a merge, ask the agent to reverse it and provide the merge ID shown in the results.
NoteOnly users with an Admin role in the global data scope can find and merge duplicate predefined queries.
Using a Saved Query for Ticket Creation or Enforcement
Saved queries are the starting point for creating tickets and running enforcement actions through the AI Companion. When you ask the agent to create a ticket or run an enforcement, you typically reference a saved query to define which assets the action covers.
See Creating Tickets from Queries and Running Enforcements for details on those workflows.
Updated 2 days ago
