Skip to main content

File Intake Agent

The File Intake Agent connects documents to DCH. You upload files such as PDFs, and the agent extracts their text, splits it into chunks, and stores the chunks in M4AI as a memory while the file's metadata goes to GBS as an entity. The memory and the entity are created for you on the first upload, so there is nothing to set up beforehand.

Like every agent, it is built on the Intake Agent Core and shares the Home, Data Preview, and Data Jobs screens described there. It adds four screens of its own:

  • Data Source Configurations: the configurations the agent created for you.
  • OCR Providers: optional vision language models used to read scanned documents.
  • File Upload: where you upload files.
  • File Records: what happened to each uploaded file.

Uploading files​

Open File Upload and fill in the form. The Choose and Upload buttons only appear once Identifier, Client, and Path to file(s) all have a value.

The File Upload screen with the identifier, client, path and OCR provider fields filled in, and the Choose and Upload buttons revealed below them

  • Identifier: A name that, together with the Client, identifies the memory and the target entity. Both are created automatically if they do not exist yet.
  • Client: How the file was uploaded, for example ui when you use this form, or my-service when you use the API.
  • Path to file(s): The directory the files came from, typed by hand. Your browser does not disclose it, so the agent cannot work it out on its own. If you picked files out of /home/Downloads, enter that.
  • OCR Provider: Optional. Leave it on None to use the built-in text extraction instead of a vision model.

Together, the client and the identifier name the memory and the entity, as client-identifier. A file's own identity is the combination of its Client and its full path, so /data/test.txt uploaded by client ui is a different file from the same path uploaded by client api. Uploading the same file again creates a second record, and does not replace the first one.

The maximum size is 100 MB, measured across all the files in one upload rather than per file. You may select several files at once.

Which file types are supported depends on whether you choose an OCR provider. The info icon next to OCR Provider shows the list for your selection:

OCR ProviderAccepted file types
None.pdf, .docx, .pptx, .html, .md, .txt, .png, .jpg, .jpeg, .bmp, .tiff, .webp
Any provider.pdf, .png, .jpg, .jpeg
caution

Choosing an OCR provider narrows the supported file types considerably, but the file picker still offers the full list. If you need to ingest a .docx or a .txt, leave OCR Provider on None.

tip

This form is designed for uploading a handful of files at a time. For bulk ingestion, post to the agent's API instead:

POST /api/v1/files?identifier=<identifier>&client=<client>&path=<path>

Send the files as multipart form data. ocrProviderId is optional.

Extraction and chunking run in the background and can take a while for large documents. When an upload has started, the form links to its records on the File Records screen. The files of one upload go to GBS together, in one intake job, so they stay in Chunking until the last one is finished.

OCR Providers​

An OCR provider is a vision language model that reads text out of scanned pages and images. It is entirely optional. Without one, the agent uses its built-in text extraction, which also runs its own OCR on PDFs. A vision model is an alternative if that does not read your scanned documents well enough.

The list shows each provider's Title, Description, Type, Model, URL, and when it was last changed. Use Add Provider to create one, and the actions in a row to edit or delete it.

The Add OCR Provider window with the Type dropdown open, showing the Ollama, Groq, Mistral and None options

  • Title: How the provider appears in the OCR Provider dropdown. Must be unique.
  • Description: A note about what this provider is for.
  • Type: One of Ollama, Groq, Mistral, or None.
  • Model, URL, API Key: How to reach the model. These three appear only when Type is something other than None, and the API key is masked until you reveal it. Ollama needs Model and URL. Groq and Mistral need Model and API Key.

Deleting a provider asks you to confirm and then removes it. Files that were already uploaded are not affected, because the provider is only used during the upload.

caution

If the model fails on a page, that page stays empty and no error appears: the file can still reach Completed. After you set up a provider, check the first upload by looking at Number of Chunks in its record details, or by asking an agent about its content.

File Records​

Every uploaded file becomes a file record. Pick an entity from the Select Entity dropdown to see its records: an entity here is the client-identifier pair you uploaded under.

The File Records screen with an entity selected, listing records with their correlation id, id, name, message, updated time and status

Each record shows its Correlation Id, Id, Name, a Message if something went wrong, when it was last Updated, and its Status:

  • Chunking: The file is being read and split into chunks, which are then sent to M4AI.
  • Processing: Chunking is done, and the file's metadata has been handed to a GBS intake job.
  • Completed: The file's metadata has been delivered to GBS. This does not say that the import succeeded, so check the intake job in Queue Jobs if something is missing.
  • Error: Something failed. The Message column says what.

Refresh reloads the list. It does not refresh on its own, so press it to watch a long upload progress.

The Details action opens everything the agent recorded about the file, including its hash, the job that imported it, and how many chunks it produced.

The File Record Details window showing the file name, path, memory name, client, size, VLM mode, hash, job id, timestamps, chunk count and message

VLM Mode records which OCR provider type was requested for this file, so none means the text was extracted without a vision model. It does not tell you whether OCR succeeded.

Deleting records​

The Delete action on a record removes the file's chunks from M4AI, deletes the record, and starts a GBS intake job for its entity.

caution

This job clears the entity's staging and graph data, but it does not rebuild the entity from the remaining files, because files that were already delivered are not sent again. So the entity can end up empty, even though the chunks of the other files remain in M4AI.

The action also changes Status to Processing for every file record the agent holds, in all entities, and assigns them this job. Those records may stay in Processing.

caution

Delete All ignores the Select Entity filter. It deletes every file record the agent holds, across all entities, not only the ones you are looking at. Each one is removed from M4AI and triggers a GBS intake job, exactly as deleting it individually would.

Data Source Configurations​

This screen lists the configurations the agent created for you, one per memory, named file-config-<client>-<identifier>. It shows each configuration's Name, Slug, Entity, Batch Size, and who created and last changed it.

The Data Source Configurations screen listing the configurations the agent created, with their name, slug, entity and batch size

The screen is read-only. Configurations appear when you upload the first file for a client and identifier, and disappear when you delete the memory.

Deleting a memory​

Deleting a whole memory, meaning every file uploaded under one client and identifier, is only possible through the API:

DELETE /api/v1/memories?client=<client>&identifier=<identifier>
info

Deleting a memory cascades. The memory is removed from M4AI, the target entity is removed from GBS (preceded by an intake job that clears it from the graph), this agent's file records for that entity are deleted, and the matching Data Source Configuration is deleted.

Data Preview​

The agent stores no preview rows and only delivers files that are waiting for an intake job, so the shared Data Preview screen normally shows no rows for its configurations. Use File Records to see what was uploaded.