Ignore File
Introduction
BrainSoup provides a powerful feature to manage what content within the Documents
folder and the Sandboxed File System is visible to agents. This is done through Ignore Files, which allow users to specify which files should be hidden and excluded from indexing, thus preventing them from being part of an agent's long-term memory.
What are Ignore Files?
Ignore Files can be named either .gitignore
or .BrainSoupIgnore
. They follow the gitignore
syntax, as detailed in the Git documentation. Both file types can be used simultaneously, and their effects will be cumulative.
Practical Applications
Ignore Files can be used to achieve the following objectives:
- Hide Data: Exclude files that agents should not have access to.
- Control Indexing: Prevent specific files from being indexed and added to agents' long-term memory.
- Optimize Performance: Exclude unnecessary or temporary files, especially when dealing with source code repositories.
Creating Ignore Files
To create an Ignore File, simply use a text editor to create a new file in the desired directory. Name the file .gitignore
or .BrainSoupIgnore
, depending on your preference. You can then add patterns to specify which files and directories should be excluded from indexing.
Example 1: Blacklist Specific Files, Extensions, and Folders
To ignore specific files, extensions, and folders, you can use the following patterns:
# Ignore all .log files *.log # Ignore all files in temp/ directory temp/ # Ignore specific file config/debug.json
Example 2: Whitelist Specific Extensions
To ignore everything except specific extensions, you can negate patterns:
# Ignore everything * # But not these extensions !*.md !*.txt
In this example, all files are ignored except those with .md
and .txt
extensions.
Conclusion
This feature is particularly useful when working with Git repositories. By using Ignore Files, you can ensure that only relevant content is indexed while ignoring temporary or build-related files.
By utilizing Ignore Files effectively, you can enhance BrainSoup's performance and maintain a clean and efficient knowledge base for your agents.