-
Notifications
You must be signed in to change notification settings - Fork 6
Command Index
Rick Hightower edited this page Feb 2, 2026
·
1 revision
name: agent-brain-index description: Index documents for semantic search parameters:
- name: path description: Path to documents to index required: true
- name: include-code description: Include code files in indexing required: false default: false skills:
- using-agent-brain
Indexes documents at the specified path for semantic search. Processes markdown, PDF, text, and optionally code files. Creates vector embeddings for semantic search and builds the BM25 index for keyword search.
/agent-brain-index <path> [--include-code]
| Parameter | Required | Default | Description |
|---|---|---|---|
| path | Yes | - | Path to documents (file or directory) |
| --include-code | No | false | Include code files (.py, .ts, .js, .java, etc.) |
/agent-brain-index docs/
/agent-brain-index ./src --include-code
/agent-brain-index /absolute/path/to/files
Run the appropriate command based on parameters:
Index documents only:
agent-brain index <path>Include code files:
agent-brain index <path> --include-codeIndexing documents from: /home/user/project/docs
==============================================
Scanning files...
Found 45 files to index:
- 32 Markdown files (.md)
- 8 PDF files (.pdf)
- 5 Text files (.txt)
Processing...
[========================================] 100% (45/45)
Indexing complete!
Documents indexed: 45
Chunks created: 312
Time elapsed: 12.3s
Index size: 24.5 MB
Report progress and results:
-
Scanning Phase
- Show path being indexed
- Report file counts by type
-
Processing Phase
- Show progress indicator
- Report any skipped files
-
Completion Summary
- Total documents indexed
- Number of chunks created
- Time elapsed
- Index size
| Category | Extensions |
|---|---|
| Documents |
.md, .txt, .pdf, .rst
|
| Code (with --include-code) |
.py, .ts, .js, .java, .go, .rs, .c, .cpp, .h
|
| Error | Cause | Resolution |
|---|---|---|
| Path not found | Invalid path specified | Verify the path exists |
| No files found | Path contains no supported files | Check file extensions |
| Server not running | Agent Brain server is stopped | Run agent-brain start first |
| OPENAI_API_KEY missing | API key not configured | Run agent-brain config
|
| Permission denied | Cannot read files | Check file permissions |
| Out of memory | Too many files at once | Index in smaller batches |
# Verify server is running
agent-brain status
# Check configuration
agent-brain verify
# Index smaller directory first
agent-brain index docs/getting-started/- Indexing is additive; existing documents are preserved
- Use
agent-brain reset --yesto clear the index before re-indexing - Large directories may take several minutes
- Code files require AST parsing and may be slower
- Binary files and images are automatically skipped
- Relative paths are resolved from the current directory
- Design-Architecture-Overview
- Design-Query-Architecture
- Design-Storage-Architecture
- Design-Class-Diagrams
- GraphRAG-Guide
- Agent-Skill-Hybrid-Search-Guide
- Agent-Skill-Graph-Search-Guide
- Agent-Skill-Vector-Search-Guide
- Agent-Skill-BM25-Search-Guide
Search
Server
Setup
- Pluggable-Providers-Spec
- GraphRAG-Integration-Spec
- Agent-Brain-Plugin-Spec
- Multi-Instance-Architecture-Spec