Skip to main content
A data source lets a plugin pull documents from an external service into a Noxus knowledge base. You implement one method — fetch — that gathers the documents and returns them as files; the platform ingests them.

The class

Subclass BaseDataSource[Config] and implement fetch:
Register it from the plugin:

How fetch works

1

Gather the documents

Read whatever you need from the external service, using self.config and the integration credentials.
2

Upload each file's bytes

Persist content with ctx.get_file_helper().upload_file(bytes, name=..., content_type=...). The upload goes over the host callback — the bytes are not returned inline — and you get back a File descriptor.
3

Return the files

Return the list[File]. The platform ingests them into the knowledge base.
Ingestion is one-shot today: fetch returns the current set of documents each time it runs. Incremental sync (only new/changed documents) is a later phase — supports_sync defaults to False.

Reading credentials

List the integration types in integrations and read them from the context:
See Creating integrations for the credential model, and Working with files for the File helpers.

Definition fields