What are Local Sources?
Local sources provide direct access to files and directories on your filesystem. Theyβre useful for:- Knowledge bases - Obsidian vaults, Notion exports, markdown notes
- Code repositories - Git repos for code analysis and documentation
- Data files - SQLite databases, CSV files, configuration files
- Personal archives - Document collections, research papers, photos
Local sources donβt require network connectivity or authentication. They access files directly from your machine.
Configuration
Local sources use thelocal type with a filesystem path:
Path Handling
Paths support Unix-style expansion:- Home directory:
~/Documentsβ/Users/you/Documents - Absolute paths:
/data/repos/myproject - Relative paths: Not supported (must be absolute or use
~)
Portable Path Storage
Portable Path Storage
Paths are stored in portable format in On load, expanded to absolute path:This allows config files to be shared across machines or backed up without hardcoded paths.
config.json:Format Hints
The optionalformat field helps agents understand the source structure:
| Format | Description | Tools/Behavior |
|---|---|---|
filesystem | Generic file/folder access | Basic file operations |
obsidian | Obsidian vault with wikilinks | Parse markdown, follow links |
git | Git repository | Access commit history, branches |
sqlite | SQLite database file | SQL queries |
The format hint is advisory - it doesnβt change which MCP server is used, but helps agents understand how to query the data.
Common Use Cases
Obsidian Vaults
Connect your Obsidian vault to let agents search notes, answer questions, and create new notes:What agents can do with Obsidian vaults
What agents can do with Obsidian vaults
- Search notes by content, tags, or frontmatter
- Follow wikilinks between notes
- Create new notes with proper formatting
- Update existing notes (append, prepend, edit sections)
- Extract information from daily notes
- Summarize meeting notes or project status
Git Repositories
Provide access to local Git repos for code analysis:What agents can do with Git repos
What agents can do with Git repos
- Read source files and documentation
- Search code for patterns or functions
- Analyze project structure
- Review recent commits
- Check git status and branches
- Generate documentation from code
SQLite Databases
Query local databases directly:Document Collections
Index folders of PDFs, Word docs, or other files:MCP Server Integration
Local sources are typically accessed via MCP servers:Filesystem MCP Server
The official filesystem MCP server provides file operations:read_file- Read file contentswrite_file- Write or create fileslist_directory- List directory contentssearch_files- Search for files by patternget_file_info- Get file metadata
Custom MCP Servers
Build specialized MCP servers for your data format:Stdio MCP servers run as subprocesses with filtered environment variables. Sensitive credentials (
ANTHROPIC_API_KEY, AWS_ACCESS_KEY_ID, etc.) are automatically excluded.Security Considerations
Permission Modes
Control what agents can do with local files:| Mode | File Operations |
|---|---|
| Explore | Read-only access |
| Ask to Edit | Prompts before file modifications |
| Auto | Full read/write access |
Path Restrictions
Restrict write access to specific directories using permissions config:How path restrictions work
How path restrictions work
- Glob patterns match allowed directories
- Write operations outside these paths are blocked
- Read operations are not restricted
- Applies to all local sources in the workspace
Sensitive Files
Exclude sensitive files from agent access:Creating Local Sources
Limitations
No network access
No network access
Local sources cannot fetch remote content or sync with cloud services. Use API sources or MCP sources for network-based data.
Performance considerations
Performance considerations
Large directories (1000+ files) may be slow to index. Consider using MCP servers with caching for better performance.
Platform-specific paths
Platform-specific paths
Paths must exist on the machine running Craft Agents. Cross-platform config sharing requires portable paths (
~/) or manual adjustment.No authentication
No authentication
Local sources donβt support authentication. Any process with filesystem access can read the files.
Example Configurations
Best Practices
Use descriptive taglines
Use descriptive taglines
Help agents understand whatβs in the source:
Set appropriate format hints
Set appropriate format hints
Use the correct format to help agents query effectively:
obsidianfor Obsidian vaultsgitfor repositoriessqlitefor databasesfilesystemfor generic folders
Document structure in guide.md
Document structure in guide.md
Explain the organization:
Use permission restrictions
Use permission restrictions
Limit write access to prevent accidental modifications:
Next Steps
Permission Modes
Control file access with permission modes
Sources Overview
Learn about other source types