Skip to content

Delete Agent Data By Query

client.beta.agentData.deleteByQuery(AgentDataDeleteByQueryParams { deployment_name, organization_id, project_id, 2 more } params, RequestOptionsoptions?): AgentDataDeleteByQueryResponse { deleted_count }
POST/api/v1/beta/agent-data/:delete

Bulk delete agent data by query (deployment_name, collection, optional filters).

ParametersExpand Collapse
params: AgentDataDeleteByQueryParams { deployment_name, organization_id, project_id, 2 more }
deployment_name: string

Body param: The agent deployment’s name to delete data for

organization_id?: string | null

Query param

formatuuid
project_id?: string | null

Query param

formatuuid
collection?: string

Body param: The logical agent data collection to delete from

filter?: Record<string, Filter> | null

Body param: Optional filters to select which items to delete

eq?: number | string | (string & {}) | null
One of the following:
number
string
(string & {})
excludes?: Array<number | string | (string & {}) | null>
One of the following:
number
string
(string & {})
gt?: number | string | (string & {}) | null
One of the following:
number
string
(string & {})
gte?: number | string | (string & {}) | null
One of the following:
number
string
(string & {})
includes?: Array<number | string | (string & {}) | null>
One of the following:
number
string
(string & {})
lt?: number | string | (string & {}) | null
One of the following:
number
string
(string & {})
lte?: number | string | (string & {}) | null
One of the following:
number
string
(string & {})
ne?: number | string | (string & {}) | null
One of the following:
number
string
(string & {})
ReturnsExpand Collapse
AgentDataDeleteByQueryResponse { deleted_count }

API response for bulk delete operation

deleted_count: number

Delete Agent Data By Query

import LlamaCloud from '@llamaindex/llama-cloud';

const client = new LlamaCloud({
  apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted
});

const response = await client.beta.agentData.deleteByQuery({ deployment_name: 'deployment_name' });

console.log(response.deleted_count);
{
  "deleted_count": 0
}
Returns Examples
{
  "deleted_count": 0
}