Next, create an ingest job to upload documents to your namespace:
Copy
// Get a namespace by ID or slugconst ns = agentset.namespace("company-documentation");// Upload documents to your namespaceconst ingestJob = await ns.ingestion.create({payload: {type: "FILE",fileUrl: "https://example.com/annual-report-2024.pdf",name: "Annual Report 2024"},config: {metadata: {documentType: "financial",year: 2024}}});console.log(`Ingest job created with ID: ${ingestJob.id}`);console.log(`Processing document: ${ingestJob.payload.name}`);