How To Use .autonomyignore with AutonomyAI
Last updated: June 18, 2025
AutonomyAI supports .autonomyignore files to give you control over which parts of your codebase our AI agents should skip. These files mimic .gitignore behavior, with a couple of nuanced twists designed for smarter inclusion logic.
π§ When to Use .autonomyignore
If you want to exclude sensitive or irrelevant code from being processed.
If you have legacy, generated, or third-party code you want AutonomyAI to ignore.
If you want finer control over what the AI understands in your repo.
β Totally optional β you donβt need this file unless you specifically want to hide files or folders from AutonomyAI.
βΉ By default, AutonomyAI respects your existing .gitignore file and automatically ignores files and folders listed there. The .autonomyignore file is only needed if you want to override or add exclusions beyond what your .gitignore covers.
π§ Basic Syntax
The .autonomyignore file follows the familiar syntax of .gitignore. Here's the basic rule:
# Ignore everything in folder
src/components/BOTable
# Include everything inside folder
!node_modules/react-routerThis example tells AutonomyAI:
Ignore everything in the repository (
just insert the 'relative path to the folder as displayed in example')But include the
react-routerfolder and recursively include its contents
βJust like in .gitignore, ! is used to "negate" a rule and include a path that was previously ignored.
π Nested Folder Quirks (Git-Like Behavior)
If you ignore a folder with a generic name like components, and you also have a folder like frontend/components, the nested folder will still be ignored unless you explicitly bring it back.
Example:
components
backend
!frontend/componentsThis tells AutonomyAI:
Ignore all top-level
componentsandbackenddirectories**But include **
frontend/componentsby negating the ignore
β Best Practices
Use
*and!rules thoughtfully: Start with a broad exclusion, then selectively add back what you want the AI to see.Always use
**when including folders recursively.Place the
.autonomyignorefile at the root of your repository.
π‘ TL;DR
PatternMeaning | |
| Ignore everything |
| Include |
| Include everything inside |
| Ignore all |
| Re-include just |