What Are Data Collections?
A data collection is a named container for structured records. Every record in a collection follows the same schema — a set of attributes you define, such as a customer name, a status field, or a timestamp. Agents interact with collections at runtime: they can search for records that match certain criteria, create new records when they process new information, or update existing records as state changes. Collections are the foundation of stateful agent behavior in Layest. When an agent needs to remember something beyond the current conversation — or when multiple agents need to share information — collections provide the shared, persistent layer that makes that possible.Creating a New Collection
1
Open the Data section
In the left sidebar, click Data, then select Collections. You will see a list of all collections already defined in your workspace.
2
Click New Collection
Click the New Collection button in the top-right corner. A creation dialog opens.
3
Name your collection
Enter a clear, descriptive name for your collection. Collection names must be unique within a workspace. Use names that reflect the data they hold, such as
Customer Leads or Support Tickets.4
Add a description (optional)
Add a short description so teammates and agents understand what this collection is for.
5
Define your initial attributes
Add the fields your objects will have. You can always add or edit attributes later. See Attributes for the full list of supported field types.
6
Save the collection
Click Create Collection. Your new collection appears in the list and is immediately available to agents you authorize.
Collection Schema: Defining Fields
Every collection has a schema — the set of attributes that describe the structure of its objects. When you create a collection you define the initial schema, and you can modify it at any time from the collection’s Settings tab. Each attribute has a name, a type (text, number, date, boolean, and more), and optional constraints such as whether the field is required or has a default value. A well-designed schema makes it easier to filter records, write precise agent instructions, and keep your data clean. For a full reference on attribute types and configuration, see the Attributes guide.How Agents Interact with Collections
Agents interact with collections through built-in collection actions that you expose when configuring the agent. Once a collection is linked to an agent, the agent can:- Read objects — query the collection to retrieve records matching specific criteria, such as “find all tickets with status = open.”
- Write objects — create new records in the collection when it encounters new information.
- Update objects — modify fields on an existing record, for example changing a status from
pendingtoresolved. - Delete objects — remove records that are no longer needed, subject to the permissions you configure.
Filtering and Sorting Collection Data in the UI
The collection view in Layest lets you slice and explore your data without writing any code.- Filter — click Add Filter and choose any attribute to filter by. Combine multiple filter conditions using AND or OR logic.
- Sort — click any column header to sort ascending or descending by that attribute.
- Search — use the search bar to perform a full-text search across text attributes in the collection.
- Views — save a combination of filters and sorts as a named view that you or your team can return to quickly.
Access Control: Which Agents and Users Can Access a Collection
By default, a newly created collection is not exposed to any agents. You control access explicitly from the collection’s Access tab. Agent access — toggle on each agent that should be able to interact with this collection. For each agent, choose the permission level:
User access — workspace members with the Admin or Editor role can view and edit all collections. You can restrict Viewer-role members to specific collections from the Access tab.
The number of collections you can create depends on your Layest plan. Free workspaces are limited to 5 collections. Starter plans allow up to 25, and Growth and Enterprise plans support unlimited collections. See the pricing page for a full comparison.