Skip to content
Get started

Delete Agent Data By Query

beta.agent_data.delete_by_query(AgentDataDeleteByQueryParams**kwargs) -> AgentDataDeleteByQueryResponse
POST/api/v1/beta/agent-data/:delete

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

ParametersExpand Collapse
deployment_name: str

The agent deployment's name to delete data for

organization_id: Optional[str]
project_id: Optional[str]
collection: Optional[str]

The logical agent data collection to delete from

filter: Optional[Dict[str, Filter]]

Optional filters to select which items to delete

eq: Optional[Union[float, str, Union[str, datetime], null]]
Accepts one of the following:
float
str
Union[str, datetime]
gt: Optional[Union[float, str, Union[str, datetime], null]]
Accepts one of the following:
float
str
Union[str, datetime]
gte: Optional[Union[float, str, Union[str, datetime], null]]
Accepts one of the following:
float
str
Union[str, datetime]
includes: Optional[SequenceNotStr[Union[float, str, Union[str, datetime], null]]]
Accepts one of the following:
float
str
Union[str, datetime]
lt: Optional[Union[float, str, Union[str, datetime], null]]
Accepts one of the following:
float
str
Union[str, datetime]
lte: Optional[Union[float, str, Union[str, datetime], null]]
Accepts one of the following:
float
str
Union[str, datetime]
ReturnsExpand Collapse
class AgentDataDeleteByQueryResponse:

API response for bulk delete operation

deleted_count: int

Delete Agent Data By Query

import os
from llama_cloud import LlamaCloud

client = LlamaCloud(
    api_key=os.environ.get("LLAMA_CLOUD_API_KEY"),  # This is the default and can be omitted
)
response = client.beta.agent_data.delete_by_query(
    deployment_name="deployment_name",
)
print(response.deleted_count)
{
  "deleted_count": 0
}
Returns Examples
{
  "deleted_count": 0
}