> ## Documentation Index
> Fetch the complete documentation index at: https://docs.langdock.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Folders

> Organize and search through collections of documents in your chats using Folders. Build a reusable knowledge base that can be shared across your team.

<Info>
  **Folders were previously called "Knowledge Folders".** The functionality is the same. The name has changed as part of moving this feature into the Library.
</Info>

<img src="https://mintcdn.com/langdock-34/mFNF0swESRPOR6a7/images/library/folders-insight-en.png?fit=max&auto=format&n=mFNF0swESRPOR6a7&q=85&s=1fda8e14b2eb8ca9846abfd1459e1159" alt="The Folders section inside the Library" style={{borderRadius: '6px'}} width="2818" height="842" data-path="images/library/folders-insight-en.png" />

Folders let you create searchable collections of documents that can be accessed directly in chat. Instead of uploading the same files repeatedly, you can build organized knowledge bases and reference them with a simple @mention.

They use embedding search (vector search) to find the most relevant sections from your documents, allowing you to work with up to **1,000 files**, far beyond the 20-file limit for direct attachments.

**Key features:**

* **Can be shared** with individuals, groups, or your entire workspace
* **Works in chat** via @mentions and in Agents as actions

<Tip>
  Folders are perfect for large documentation sets, company policies, product manuals, or any scenario where you need to search across many documents. For smaller document sets where you need the AI to consider the entire content, use [direct file attachments](/en/using-langdock/chat/tools/document-search) instead.
</Tip>

## Where to find Folders

Folders are part of the [Library](/en/using-langdock/library/introduction). You can access and manage them in two places:

Open the Library from the left sidebar and find the Folders section. You can filter between All, Shared, and Private folders using the view tabs at the top of the section.

<img src="https://mintcdn.com/langdock-34/mFNF0swESRPOR6a7/images/library/knowledge%20folders%20en.png?fit=max&auto=format&n=mFNF0swESRPOR6a7&q=85&s=e642888e7a8d350f78877336af12e641" alt="The Folders section inside the Library" style={{borderRadius: '6px'}} width="2836" height="520" data-path="images/library/knowledge folders en.png" />

## Creating a Folder

<Steps>
  <Step title="Navigate to the Library">
    Click **Library** in the left sidebar to open it.
  </Step>

  <Step title="Create a new folder">
    In the Folders section, click **New Folder** and give your folder a descriptive name. You can also add an optional description to help others understand what documents it contains.
  </Step>

  <Step title="Configure your folder">
    Your folder is now ready for documents. You can start adding files right away or configure sharing settings first.
  </Step>
</Steps>

## Adding Documents

Folders support multiple ways to add documents:

<Tabs>
  <Tab title="Upload from Computer">
    The simplest method is to upload files directly:

    1. Open your folder
    2. Click **Add Files** or drag and drop files into the folder
    3. Wait for the files to be processed (embedding takes a few moments)

    Supported formats include PDF, DOCX, TXT, Markdown, and more. Check our [supported file types](/en/using-langdock/troubleshooting/faq/supported-file-types) for the complete list.
  </Tab>

  <Tab title="API Upload">
    For automated workflows or large batch uploads, use the Folder API:

    * **Rate limit**: 50 requests per minute
    * **Authentication**: Requires an API key from your workspace admin
    * **Documentation**: See our [API reference](/en/developer/knowledge-folder-api/sharing)

    **Async upload endpoint**: For large files or batch uploads, use the async upload endpoint (`/api/public/knowledge/[knowledgeId]/upload-async`). This returns immediately with a 202 status while processing happens in the background. You can poll the returned `statusUrl` to check when processing completes.

    This is ideal for integrating with your existing content management systems or automating document updates.
  </Tab>
</Tabs>

<Warning>
  **Tabular data limitation**: XLSX and CSV files cannot be added to Folders. For spreadsheet analysis, use [direct file attachments](/en/using-langdock/chat/tools/document-search) or the [Data Analyst](/en/using-langdock/chat/tools/data-analysis) tool instead.
</Warning>

### File Limits

| Limit            | Value                                              |
| ---------------- | -------------------------------------------------- |
| Files per folder | 1,000                                              |
| File size        | \~8 million characters (based on LLM token limits) |

## Using Folders in Chat

Once your folder has documents, you can reference it in any chat using the @mention feature.

<Steps>
  <Step title="Start typing @">
    In any chat input field, type `@` to open the actions menu.
  </Step>

  <Step title="Search for your folder">
    Start typing the name of your folder. You'll see it appear in the search results alongside integrations, Agents, and saved prompts.
  </Step>

  <Step title="Select and ask">
    Click on your folder or press Enter to select it. The folder name will appear in blue in your chat, confirming it's active. Now ask your question, and the AI will search through the folder's documents to find relevant information.
  </Step>
</Steps>

<Note>
  When you @mention a folder, the AI uses embedding search to find the most relevant sections from your documents. It doesn't send all documents to the model, just the parts most likely to answer your question.
</Note>

### Example Usage

Let's say you have a folder called "Product Documentation" with your company's user guides:

```
@Product Documentation How do I reset my password?
```

The AI will search through all documents in the folder, find the sections about password reset, and provide an answer based on that content.

## Sharing Folders

Folders support flexible sharing options, making them ideal for team knowledge bases.

### Sharing Options

<Tabs>
  <Tab title="Individual Users">
    Share with specific people in your workspace. Great for department-specific knowledge or project collaborations.
  </Tab>

  <Tab title="Groups">
    Share with defined user groups. Efficient for team-wide access without managing individual permissions.
  </Tab>

  <Tab title="Workspace">
    Make the folder available to everyone in your workspace. Ideal for company-wide resources like policies or product documentation.
  </Tab>
</Tabs>

### Permission Levels

| Permission               | Owner | Editor | Viewer |
| ------------------------ | ----- | ------ | ------ |
| View folder and contents | Yes   | Yes    | Yes    |
| Search documents in chat | Yes   | Yes    | Yes    |
| Add files                | Yes   | Yes    | No     |
| Remove files             | Yes   | Yes    | No     |
| Share with others        | Yes   | Yes    | No     |
| Delete folder            | Yes   | No     | No     |
| Transfer ownership       | Yes   | No     | No     |

* **Owner**: Has full control, including deleting the folder and transferring ownership.
* **Editor**: Can add and remove documents, and share with others.
* **Viewer**: Can search the folder in chat and Agents.

<Info>
  Workspace admins have full control over all folders.
</Info>

### How to Share

1. Open your folder
2. Click the **Share** button
3. Search for users or groups
4. Select the permission level (Editor or Viewer)
5. Optionally send a notification with a custom message

<Info>
  Workspace admins can configure which roles are allowed to share folders with the entire workspace. Check [User Management > Roles](https://app.langdock.com/settings/workspace/user-management/roles) for these settings.
</Info>

## Folders vs Direct Attachments

Choosing between Folders and direct file attachments depends on your use case:

<CardGroup cols={2}>
  <Card title="Use Folders When" icon="folder-open">
    * You have more than 20 documents
    * You need to share documents across multiple chats
    * You're building a team knowledge base
    * You only need relevant sections, not entire documents
    * Documents are reference material (manuals, policies, FAQs)
  </Card>

  <Card title="Use Direct Attachments When" icon="paperclip">
    * You have 20 or fewer documents
    * You need the AI to consider the entire document content
    * Documents are specific to one conversation
    * You're working with spreadsheets (XLSX, CSV)
    * You need maximum accuracy for that specific document
  </Card>
</CardGroup>

<Tip>
  **Pro tip**: Keep direct attachments for documents where every detail matters (contracts, specific reports), and use Folders for larger reference libraries where finding relevant sections is the goal.
</Tip>

### Technical Differences

| Feature             | Direct Attachments         | Folders                                |
| ------------------- | -------------------------- | -------------------------------------- |
| File limit          | 20 files                   | 1,000 files                            |
| Processing          | Full document to context   | Embedding search for relevant sections |
| Spreadsheet support | Yes                        | No                                     |
| Sharing             | Per chat/agent             | Standalone sharing                     |
| Best for            | Complete document analysis | Large knowledge bases                  |

## Using Folders with Agents

Folders integrate seamlessly with Agents as actions:

1. Open your Agent configuration
2. Navigate to the **Knowledge** section
3. Click **Add Action**
4. Search for your folder name
5. Add the `"Search in [folder name]"` action

Now your Agent can automatically search through the folder when users ask relevant questions.

## Best Practices

* **Organize by topic**: Create separate folders for different subjects (HR Policies, Product Docs, Technical Guides)
* **Use descriptive names**: Help users understand what each folder contains at a glance
* **Keep folders updated**: Remove outdated documents and add new ones regularly
* **Set appropriate permissions**: Use the principle of least privilege when sharing
* **Combine with direct attachments**: Use both methods together when needed

## Troubleshooting

<AccordionGroup>
  <Accordion title="My folder isn't appearing in @mentions">
    * Verify you have at least Viewer access to the folder
    * Check that you're spelling the folder name correctly
    * Try typing more of the name to narrow down search results
  </Accordion>

  <Accordion title="The AI isn't finding relevant information">
    * Ensure your documents are properly processed (check for processing status)
    * Try rephrasing your question with more specific keywords
    * Verify the information exists in the uploaded documents
    * Consider if direct attachments might work better for this use case
  </Accordion>

  <Accordion title="I can't upload certain file types">
    Check our [supported file types](/en/using-langdock/troubleshooting/faq/supported-file-types) for the complete list. Note that spreadsheets (XLSX, CSV) require direct attachments or the Data Analyst tool instead.
  </Accordion>
</AccordionGroup>

## Related Resources

* [Library](/en/using-langdock/library/introduction) - The Library and all its sections
* [Document Search](/en/using-langdock/chat/tools/document-search) - Working with direct file attachments
* [Actions in Chat](/en/using-langdock/chat/tools/actions-in-chat) - Using @mentions for all tools
* [Types of Knowledge](/en/using-langdock/guides/knowledge/knowledge-types) - Comparison of all knowledge options
* [Folder API](/en/developer/knowledge-folder-api/sharing) - Programmatic access
