| name | workspace-memory |
| description | Semantic search and memory retrieval using txtai. Use when searching through workspace files, finding relevant documents, or answering questions about prior work, decisions, or content stored in the workspace. Provides semantic search across all indexed text files (markdown, code, configs, etc.). |
txtai Memory Search
Semantic search for workspace files using txtai embeddings. Replaces manual file searching with AI-powered semantic retrieval.
Quick Start
1. Index the Workspace (one-time setup)
cd scripts/
python index_workspace.py
This indexes all text files in the workspace (see SKILLS.md for workspace root).
2. Search
python search_memory.py "what was the config issue"
python search_memory.py "agent personality" --limit 3 --full
Python API Usage
For integration into other scripts:
import sys
sys.path.insert(0, "<python-packages-path>")
from txtai import Embeddings
with Embeddings().load("<txtai-index-path>") as embeddings:
results = embeddings.search("your query", limit=5)
for result in results:
print(f"{result['id']}: {result['score']:.3f}")
Re-indexing
Re-run index_workspace.py after:
- Adding new files
- Major content changes
- Wanting fresh embeddings
The index is stored at the txtai index path (see SKILLS.md).
Indexed File Types
- Documentation:
.md, .txt
- Code:
.py, .js, .ts, .rs, .go, etc.
- Configs:
.json, .yaml, .yml, .toml
- Scripts:
.sh, .zsh
- Data:
.sql, .graphql, .proto
When to Use
- Memory questions: "What did we decide about...", "When did..."
- Finding files: "Where is the config for...", "Show me the script that..."
- Context retrieval: Prior work, decisions, code patterns
- Semantic search: Concepts, not just keywords
Scripts
Workspace Memory (Your Files)
scripts/index_workspace.py - Build/update workspace index
scripts/search_memory.py - Query workspace index
OpenClaw Documentation
scripts/index_openclaw.py - Build/update OpenClaw source index
scripts/search_openclaw.py - Query OpenClaw documentation/code
Use OpenClaw search for questions about OpenClaw internals, APIs, or how to implement features.
Usage Examples
Use the Python binary from SKILLS.md to run scripts. Example:
<python-binary> search_memory.py "config issue" --limit 5
<python-binary> search_openclaw.py "how to create a skill" --limit 3
<python-binary> index_workspace.py
<python-binary> index_openclaw.py
Notes
- Uses
sentence-transformers/all-MiniLM-L6-v2 for embeddings
- Content stored in SQLite (no external DB needed)
- Skips:
.git, node_modules, venv, __pycache__, etc.