What Is a .ignore File in BrainSoup?
Introduction
A .ignore file is a text file containing patterns that tell a tool which files or folders to skip. In BrainSoup, ignore files hide matching content from agents and exclude it from indexing, so irrelevant, temporary, private, or generated files do not become part of an agent's long-term memory.
BrainSoup supports .gitignore and .BrainSoupIgnore files inside the Documents folder and the Sandboxed File System.
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 are cumulative.
- Use
.gitignorewhen you are already working in a Git repository and want BrainSoup to respect the same exclusions. - Use
.BrainSoupIgnorewhen the exclusions are specific to BrainSoup agents and should not affect your Git workflow.
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.
- Improve Agent Relevance: Keep generated files, dependency folders, logs, and build artifacts out of the knowledge base so agents focus on meaningful source documents.
Creating Ignore Files
To create an Ignore File, 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.
You can place ignore files at different levels of a folder tree. Patterns apply to the files and folders within the ignore file's scope.
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.
Example 3: Ignore Build Artifacts in a Software Project
When using BrainSoup agents with a source code repository, exclude dependency folders and build outputs that do not help the agent understand your code:
# Dependencies node_modules/ packages/ # Build outputs bin/ obj/ dist/ build/ # Local environment files .env *.user
Example 4: Keep Private Notes Out of Agent Knowledge
If a folder contains documents you want to keep for yourself, exclude them from BrainSoup indexing:
# Private notes private/ personal-notes.md # Drafts not ready for agents drafts/
Ignore Files for AI Agents
Ignore files are especially useful with AI agents because they define knowledge boundaries. A BrainSoup agent can only reason from content it can access and that has been indexed or included in context. By excluding noise and sensitive files, you can improve answer quality while reducing the risk of exposing data that should not be part of the agent workflow.
For software development assistants, a .BrainSoupIgnore file can keep generated code, package caches, logs, test outputs, and secrets outside the agent's searchable knowledge. For document-heavy workflows, it can exclude outdated drafts, exports, or confidential folders.
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.