kmail-agent-grep
v2.4.5
Published
Semantic grep over your whole org-memory.
Readme
@kmail/agent-grep
Semantic grep over your whole org-memory.
@kmail/agent-grep indexes every note, ticket, doc and chat export into a single HNSW vector store, then answers "where did we decide X?" in one keystroke. It respects file permissions and .gitignore, and forgets nothing unless you tell it to.
Install
npm install -g @kmail/agent-grepQuickstart
agent-grep config --init
agent-grep index ~/notes
agent-grep search "where did we decide to use TypeScript?"CLI
| Command | Description |
|---------|-------------|
| index [scope] | Index a directory of notes/docs. |
| search <query> [-k n] [--thresh=0.8] | Search the index by meaning. |
| status | Show index statistics. |
| reindex [scope] | Rebuild the vector index and re-walk the scope. |
| config --init | Create a default config file. |
Library
import { AgentGrep } from '@kmail/agent-grep';
const grep = new AgentGrep({ scope: './notes', store: './.ag-index' });
await grep.indexAll();
const results = await grep.search('how does the customer like to be contacted?', { topK: 5 });
console.log(results);Configuration
Set OPENAI_API_KEY or configure another OpenAI-compatible endpoint. See agent-grep config --init. By default it uses a local Ollama instance (nomic-embed-text).
