Skip to main content
On the graph, add Read records. On an agent, open State and turn Read records on. Exact filters on structured records (not semantic Memory search). Requires a collection name — use List collections to discover names.

Input

Inspector Settings. Empty-field rules for the Graph: Previous nodes. Where values accept a previous-node or setting placeholder. This inspector does not insert secrets. On an Agent Tool, Collection, Key, Limit, and Where can be Agent decides or Fixed. Agent decides on Where lets the agent send where. Fixed stores the filter on the step and the agent cannot send another one. contains and starts_with match letter case. icontains and istarts_with do not. Folding follows the database collation: a C locale folds ASCII only. Without orderBy, a page is the most recently changed records first, then key ascending. Pass the returned nextCursor with the same filters to read the next page.

Sort

An Agent can pass orderBy to sort one page by a field. This is not an inspector field.
path is the same dotted path as where. direction is asc or desc. A missing field, JSON null, an object, and an array sort last. A number compares as a number. A string compares as text. Equal values break ties by key ascending. Do not pass Key or distinct together with orderBy. A cursor from a sorted page works only with the same path and direction. A cursor from an unsorted page does not work on a sorted page. Sorting a large collection reads every matching row. The page is still at most 100 records.

Distinct values

An Agent can pass distinct to list each stored combination of fields once, instead of every record. This is not an inspector field.
The result is JSON. Each item includes count: how many records share that combination after the filters.
Comparison is exact, including letter case. Acme and ACME are two rows. Copy a returned value as it is when you filter or write later. A missing field and a JSON null are one row with null. minCount is optional and only works with distinct. It is an integer of 1 or greater. The result keeps combinations whose count is at least that number, and includes minCount in the JSON. To read those records, query again with where on the returned values.
Do not use the path count inside distinct. Do not pass Key together with distinct. To read the next page, send the same distinct, filters, and nextCursor from this result. A cursor from a record page does not work here, and this cursor does not work on a record page. At most 4 paths. The page lists combinations, not records: default 20, maximum 100. If a stored object or array on one of those paths is larger than 8192 bytes, the call fails.

Output

On the next node, Previous nodes lists Read records: Result ({{Read records.text}} while the name is unique).