Custom File Upload Guide

File limits, type and Apis for agent custom files knowledgebase

Written By jazilkalim

Last updated 3 months ago

1. Introduction

The Agent Knowledge Base allows you to upload documents and files to your custom agents, enabling them to reference and answer questions based on your specific content. This guide covers how to use this feature, including limits, supported file types, and best practices.

2. Getting Started

How to Upload Files to Your Agent

  1. Navigate to your Agent: Go to your custom agent's dashboard

  2. Access File Management: Click on "Knowledge Base" or "Files" section

  3. Upload Files:

    • Click "Upload Files" button

    • Select one or multiple files from your computer

    • Wait for the upload progress to complete

  4. Monitor Status: Watch the real-time progress indicator showing upload status

Supported Upload Methods

  • Direct Upload: Upload files directly from your computer

  • Drag & Drop: Drag files directly into the upload area

  • Batch Upload: Select and upload multiple files simultaneously

3. File Processing Limits & Quotas

Agent Service Limits

Category

Maximum Value

Description

Files per Agent

100 files

Total number of files you can upload to a single agent

Individual File Size

20 MB

Maximum size for each file you upload

Token Limit per File

4,000,000 tokens

Maximum file size when processed for AI search

Files per Request

10

You can upload multiple files in one request

List Files per Page

100 files

Maximum files returned per page when listing

Note: These limits can be modified upon request.

4. Supported File Types

Document Files

File Type

Extension

Best For

PDF

.pdf

Reports, manuals, research papers, forms

Word Documents

.doc, .docx

Business documents, proposals, letters

PowerPoint

.pptx

Presentations, training materials, slides

Plain Text

.txt

Simple documents, notes, logs

Markdown

.md

Documentation, README files, formatted text

Code & Development Files

File Type

Extension

Best For

Python

.py

Python scripts, data analysis code

JavaScript

.js

Web development, automation scripts

TypeScript

.ts

Modern web applications

Java

.java

Enterprise applications, Android development

C/C++

.c, .cpp

System programming, embedded systems

Ruby

.rb

Web applications, automation

PHP

.php

Web development, server-side scripts

Web & Styling Files

File Type

Extension

Best For

HTML

.html

Web pages, documentation

CSS

.css

Styling guides, design systems

JSON

.json

Configuration files, data structures

Other Supported Files

File Type

Extension

Best For

Shell Scripts

.sh

Automation, deployment scripts

TeX

.tex

Academic papers, mathematical documents

5. How to Use the Upload Feature

Step-by-Step Upload Process

Method 1: Web Interface Upload

  1. Access Your Agent

    Navigate to: Agents → [Your Agent Name] → Knowledge Base 
  2. Start Upload

    • Click "Files" button

    • Select files from your computer (10 files at a time)

    • Or drag and drop files into the upload area

  3. Monitor Progress

    • Real-time progress bar shows upload status

    • Individual file status (Success/Failed/Skipped)

    • Overall completion percentage

  4. Review Results

    • View uploaded files in the file list

    • Check file processing status

    • Verify successful integration

Method 2: API Upload (Advanced Users)

curl -X POST "https://your-domain.com/agents/files/upload_files_to_agent" \ -H "Authorization: Bearer YOUR_JWT_TOKEN" \ -F "agent_id=your_agent_id" \ -F "files=@document1.pdf" \ -F "files=@presentation.pptx" 

Upload Status Indicators

File Status

Status

Meaning

Action Required

2

✅ Completed

File uploaded and processed successfully

None - ready to use

1

⏳ In Progress

File is being processed

Wait for completion

3

❌ Failed

Upload or processing failed

Check error message, retry if needed

6. File Management

  1. File List: See all uploaded files with details:

    • File name and type

    • Upload date and time

    • File size

    • Processing status

Managing Your Files

  • Delete Files: Remove files you no longer need

  • Re-upload: Replace failed uploads

  • Organize: Use descriptive file names for easy management

7. Best Practices

File Organization

  1. Use Descriptive Names

    ✅ Good: "Q1_2024_Sales_Report.pdf" ❌ Poor: "document1.pdf"
  2. Group Related Content

    • Upload related documents together

    • Use consistent naming conventions

    • Consider file dependencies

  3. Regular Maintenance

    • Remove outdated files

    • Update documents when content changes

    • Monitor storage usage

Optimal File Formats

  1. For Text Content: Use PDF or DOCX for best text extraction

  2. For Code: Use original source files (.py, .js, .java)

  3. For Presentations: PPTX files work well for slide content

  4. For Data: JSON files for structured information

Performance Tips

  1. Batch Uploads: Upload multiple files at once for efficiency

  2. File Size: Larger files take longer to process but contain more information

  3. File Types: Text-heavy files (PDF, DOCX) process faster than image-heavy files

8. Troubleshooting

Common Issues and Solutions

Upload Failures

Problem: File upload fails Solutions:

  • Check file size (must be under 20 MB)

  • Verify file type is supported

  • Ensure stable internet connection

  • Check that you haven't exceeded 100 files per agent

Processing Delays

Problem: Files stuck in "In Progress" status Solutions:

  • Wait for processing to complete (large files take longer)

  • Refresh the page to check updated status

  • Contact support if stuck for over 30 minutes

Storage Limits

Problem: Cannot upload more files Solutions:

  • Check if you've reached the 100 files per agent limit

  • Delete unnecessary files to make room for new ones

  • Consider splitting content across multiple agents

File Not Found in Conversations

Problem: Agent doesn't reference uploaded files Solutions:

  • Ensure file status shows "Success"

  • Wait for processing to complete

  • Ask specific questions about file content

  • Check if file contains searchable text

Error Messages

Error Message

Cause

Solution

"File too large"

File exceeds 20 MB limit

Compress or split the file

"Unsupported file type"

File format not supported

Convert to supported format

"Too many files"

Agent has reached 100 file limit

Delete old files to make room

"Upload timeout"

Network or server issue

Retry upload with stable connection

“Duplicate File“

HTTP 400

File already exist

9. Frequently Asked Questions

General Usage

Q: How long does it take to process uploaded files? A: Small files (under 10 MB) process in 1-2 minutes. Larger files may take 5-15 minutes depending on size and content complexity.

Q: Can I upload the same file to multiple agents? A: Yes, each agent has its own knowledge base. You can upload the same file to different agents.

Q: What happens to my files if I delete an agent? A: All files associated with the agent are permanently deleted. Make sure to backup important files before deleting an agent.

File Types and Limits

Q: Can I upload image files (JPG, PNG)? A: Currently, image files are not supported for knowledge base ingestion. Focus on text-based documents.

Q: What's the difference between the 20 MB upload limit and 4M token limit? A: 20 MB is the raw file size limit. The 4M token limit applies to how much text content can be processed for AI search (roughly equivalent to 3,000 pages of text).

Q: Can I upload compressed files (ZIP, RAR)? A: No, compressed files are not supported. Extract and upload individual files instead.

Performance and Usage

Q: How do I know if my agent is using the uploaded files? A: Ask your agent specific questions about the content. Well-processed files will be referenced in responses with relevant information.

Q: Can I see which files the agent referenced in a response? A: Yes, if traceability is enabled, you'll see which files and sections were used to generate responses.

Q: Is there a limit on how many files I can upload per day? A: No daily upload limit, but you're subject to the overall storage and file count limits per agent.

Quick Reference Card

Upload Checklist

  • ✅ File size under 20 MB

  • ✅ Supported file type

  • ✅ Descriptive file name

  • ✅ Stable internet connection

  • ✅ Under 100 files per agent limit

Supported File Extensions

Documents: .pdf, .doc, .docx, .txt, .md, .pptx Code: .py, .js, .ts, .java, .cs, .c, .cpp, .rb, .php Web: .html, .css, .json Other: .sh, .tex