Skip to content

Create Agent Data

client.beta.agentData.agentData(AgentDataAgentDataParams { data, deployment_name, organization_id, 2 more } params, RequestOptionsoptions?): AgentData { data, deployment_name, id, 4 more }
POST/api/v1/beta/agent-data

Create new agent data.

ParametersExpand Collapse
params: AgentDataAgentDataParams { data, deployment_name, organization_id, 2 more }
data: Record<string, unknown>

Body param

deployment_name: string

Body param

organization_id?: string | null

Query param

formatuuid
project_id?: string | null

Query param

formatuuid
collection?: string

Body param

ReturnsExpand Collapse
AgentData { data, deployment_name, id, 4 more }

API Result for a single agent data item

data: Record<string, unknown>
deployment_name: string
id?: string | null
collection?: string
created_at?: string | null
project_id?: string | null
updated_at?: string | null

Create Agent Data

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 agentData = await client.beta.agentData.agentData({
  data: { foo: 'bar' },
  deployment_name: 'deployment_name',
});

console.log(agentData.id);
{
  "data": {
    "foo": "bar"
  },
  "deployment_name": "deployment_name",
  "id": "id",
  "collection": "collection",
  "created_at": "2019-12-27T18:11:19.117Z",
  "project_id": "project_id",
  "updated_at": "2019-12-27T18:11:19.117Z"
}
Returns Examples
{
  "data": {
    "foo": "bar"
  },
  "deployment_name": "deployment_name",
  "id": "id",
  "collection": "collection",
  "created_at": "2019-12-27T18:11:19.117Z",
  "project_id": "project_id",
  "updated_at": "2019-12-27T18:11:19.117Z"
}