Adds structured information to the knowledge graph. Use for storing facts AI can reference.Documentation Index
Fetch the complete documentation index at: https://dev.writer.com/llms.txt
Use this file to discover all available pages before exploring further.

Overview
The Add to Knowledge Graph block ingests files into a Writer Knowledge Graph, making the information available for AI-powered search, retrieval, and question answering. You can use this block to build enterprise AI applications that need to reference company documents, policies, or structured data. Supported file types: You can uploadPDF, TXT, DOC/DOCX, PPT/PPTX, EML, HTML, SRT, CSV, or XLS/XLSX files to a Knowledge Graph.
How it works
- File selection: Choose the files to ingest into the Knowledge Graph.
- Graph specification: Select the target Knowledge Graph for ingestion.
- Processing: The block processes and indexes the file content.
- Integration: Files become available for AI-powered queries and retrieval.
Examples
Ingest company policies
The following example shows how to add documents to a Knowledge Graph. In this example, the user uploads one or more documents via the File Input interface block, which sets the@{files} state variable to the user’s uploaded files.
Blueprint flow:
- UI Trigger → User initiates document ingestion with a button click. The File Input interface block set the
@{files}state variable to the user’s uploaded file. - Add to Knowledge Graph → Ingest and add the files from the
@{files}state variable to the Knowledge Graph. - Set state → Store whether the files were successfully ingested so the UI can display feedback to the user.
- Graph Id:
Support KB - Files:
@{files}

Fields
| Name | Type | Control | Default | Description | Options | Validation |
|---|---|---|---|---|---|---|
| Graph Id | Graph Id | - | - | The id for an existing knowledge graph. It has a UUID format. | - | Format: uuid |
| Files | Object | - | [] | A list of files to be uploaded and added to the knowledge graph. You can use files uploaded via the File input component or specify dictionaries with data, type and name. | - | - |
| URLs | Object | - | [] | A list of URLs to be added to the knowledge graph. Web content from these URLs will be indexed. | - | - |
End states
Below are the possible end states of the block call.| Name | Field | Type | Description |
|---|---|---|---|
| Success | - | success | Content was added to the knowledge graph. |
| Error | - | error | There was an error adding content to the knowledge graph. |