Endpoint
Authentication
Requires a valid JWT token in cookies (obtained via GitHub OAuth).Query Parameters
Repository in
owner/repo format (must be connected to your account)Response
Always returns
rescan_started on successRepository full name that was rescanned
What Gets Rescanned
The rescan process performs the following operations:- File Tree Analysis: Scans the entire repository structure on the default branch
- README Parsing: Extracts architecture notes and conventions from README files
- Configuration Analysis: Analyzes build configs, package managers, and tooling
- Framework Detection: Identifies web frameworks, ORMs, and key dependencies
- Memory Extraction: Uses Claude to extract architectural patterns and conventions
- Memory Storage: Stores extracted knowledge in Mem0 with appropriate scoping
The rescan runs asynchronously in the background. Existing memories are preserved unless they’re superseded by new scans. The process typically takes 30-60 seconds for medium-sized repositories.
Example Request
Example Response
When to Use Rescan
Repository Structure Changed
Repository Structure Changed
After major refactoring or reorganizing your directory structure, rescan ensures the AI has the latest project layout.
README or Docs Updated
README or Docs Updated
If you’ve updated architectural documentation, conventions, or coding standards in your README or docs, rescan picks up the changes.
New Framework or Tools Added
New Framework or Tools Added
When adopting new frameworks, ORMs, or significant dependencies, rescan helps the AI understand the new patterns.
Initial Connection Issues
Initial Connection Issues
If the initial repo scan failed or was interrupted, you can manually trigger a rescan.
Memory Debugging
Memory Debugging
If you suspect the AI has outdated or incorrect information about your project, rescan refreshes the knowledge base.
Error Responses
Monitoring Rescan Progress
To check if the rescan completed, use the memory stats endpoint:total count before and after rescanning to verify new memories were created.
Related Endpoints
Memory Stats
View memory statistics by type
Project Map
View the extracted project knowledge
List Memories
Browse all memories for debugging