How It Works
Key Features
Quick Start
1
Simple Usage
2
With Configuration
Configuration Options
FastContext Direct Usage
Environment Variables
You can also configure Fast Context via environment variables:Performance Optimizations
FastContext includes optional performance optimizations that enable faster search with no impact on default behavior:- Smart Auto-Selection
- Force Ripgrep
- Incremental Indexing
- Context Compression
FastContext automatically selects the optimal backend based on codebase size:
Optional Dependencies
Install optional dependencies for enhanced performance:All optimizations are optional with graceful fallback. If dependencies are not installed, FastContext uses built-in Python implementations.
Standalone Usage
You can also use Fast Context independently without an Agent:Search Tools
Fast Context provides four core search tools:grep_search
Pattern-based search with regex support:glob_search
Find files by pattern:read_file
Read file contents with line ranges:list_directory
List directory contents:File and Symbol Indexing
For even faster searches, use the indexers:Caching
Fast Context automatically caches search results:Performance
Fast Context provides significant performance improvements:Best Practices
Use Caching for Repeated Queries
Use Caching for Repeated Queries
Enable caching for workflows that search the same patterns multiple times:
Limit Search Scope
Limit Search Scope
Use include/exclude patterns to focus searches:
Use Indexers for Large Codebases
Use Indexers for Large Codebases
Pre-index files and symbols for instant lookups:
API Reference
FastContext Class
FastContextResult Class
Related
Context Management
Agent context management and compaction
Code Agent
Code generation and analysis agents

