File Helpers Toolkit
The File Helpers toolkit gives agents file utilities: save base64 payloads to storage, read files with intelligent text extraction, change text encodings, and detect MIME types. No connection or API key is required.
Add it on the agent Toolkits tab, then reference the tools with @ in the personality prompt when the agent should handle files.
Prerequisites
- An agent you can edit
- For Read File, Change File Encoding, and Check File Type: a filesystem path returned by a prior save step (or another tool that writes a local file path)
Available tools
| Tool | Description |
|---|---|
| Save Base64 File | Decodes base64 content (including data:…;base64, prefixes) and saves it. Optional MIME type and file name. Returns file id, path, name, size, MIME type, and a download URL. |
| Read File | Reads a file at a local path and extracts text for common formats (PDF, DOCX, PPTX, XLSX, CSV, JSON, TXT, email formats, and more). |
| Change File Encoding | Re-encodes a text file (for example utf-8 ↔ latin-1) and writes a new file. |
| Check File Type | Detects MIME type from extension and file content. Optionally validate against an allowed MIME-type list. |
How the tools work together
Typical flow:
- Save Base64 File — for example from an email attachment or integration payload
- Use the returned file path with Read File, Check File Type, or Change File Encoding
Read File needs a server filesystem path. It does not take a public URL or Knowledge Base name by itself — save or obtain a path first.
Use cases
- Persist base64 attachments from email or webhook steps, then read them as text
- Inspect MIME type before routing a file to another toolkit
- Normalize encoding for CSV or log files before analysis
- Pair with the PDF toolkit when you need PDF-specific page images or PDF generation (File Helpers Read File can extract PDF text as one of many formats)
Tips
- Prefer clear file names when saving so later steps can identify the file.
- Use Check File Type before downstream tools that only accept certain formats.
- Files saved by this toolkit are not automatically available inside the Python sandbox. To analyze them with Python Code Execution, upload into the sandbox separately when your flow requires it.
- For in-chat markdown documents (create/edit/list), use Document Manager.
Troubleshooting
| Symptom | What to check |
|---|---|
| Read File fails | Confirm you passed a file_path from Save Base64 File (or another writer), not a URL or KB display name |
| Wrong characters after read | Use Change File Encoding with the correct source and target encodings |
| Check File Type rejects the file | Adjust the allowed MIME list, or confirm the file is the type you expect |
| Confused with PDF toolkit | File Helpers is general save/read/encode/inspect; PDF toolkit adds extract-all-pages, page-to-image, and PDF generation |