Manage Data Collection
gnosari_manage_data_collectionCreate, list, get, update, delete, assign, or remove data collection templates.
Templates define what structured data agents extract from conversations. Also controls whether visitors can upload files (photos/PDFs) for the agent to read — pass enable_attachments (requires gnosari_id).
Assigning a template (action='assign', or create with gnosari_id) turns data collection ON for that agent. Removing a template never turns it off — the enable state is the owner's setting, changed only through the agent's own configuration.
Identity: pass identity_field (create/update) to name the field that
holds the person's display name. On update, omitted fields are preserved
(preserve-on-omit); to drop the designation pass
clear_fields=["identity_field"] — never an empty string. Listing a
field in clear_fields AND passing it as a value is rejected.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Template name (create/update) | |
| action | Yes | Action to perform on data collection templates | |
| fields | No | Template fields (create/update) | |
| search | No | Search query (list) | |
| gnosari_id | No | Agent ID (assign/remove, or create+assign). Also required when setting enable_attachments. | |
| description | No | Template description (create/update) | |
| template_id | No | Template ID (get/update/delete/assign/remove) | |
| clear_fields | No | Fields to reset to their default (NULL) on update. Currently supports 'identity_field' — clearing it drops the identity designation and reverts to server heuristic resolution. Passing a field here AND as a value param is an error. | |
| custom_prompt | No | Custom collection flow prompt. Required when collection_mode='guided'; ignored otherwise | |
| identity_field | No | Name of the field to use as the person's identity/display name (create/update). Must name one of this template's fields. Server-side identity resolution uses it to compute display_name on collected records. On update, omit to leave unchanged; to remove the designation pass 'identity_field' in clear_fields (never an empty string). | |
| include_system | No | Include system templates (list) | |
| collection_mode | No | How the agent collects data. passive: Extract only what users volunteer. Never asks. opportunistic: Extract + nudge when contextually natural. active: Proactively ask for missing required fields until complete. Default for intake/forms agents — use unless you have a reason not to. guided: Fully custom flow driven by custom_prompt (required). Rarely needed — the other modes cover almost every case. | |
| enable_attachments | No | Turn file uploads on/off for this agent's chat (per-agent capability, requires gnosari_id). true = visitors can attach a photo or PDF and the agent reads it and extracts the data you collect — recommended when the agent collects data users would otherwise type or send separately. false = uploads off. null (default) = leave unchanged. Ask the user whether they want visitors to be able to upload documents before setting this. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |