StackGrep Engine: grep for your AI agents. We're not the LLM; we make yours find things.
A super fast search and indexing engine for your own documents. Bring your own data: push it over an API or point us at your S3 bucket. Your agents get exact and regex answers in milliseconds, with no embeddings to build. API docs · Quickstart · Try it on npm's source
Measured on our production servers
- 0.5 to 32 ms warm search over 100,000 documents
- 28 to 148 ms cold search
- 21,000 durable writes a second
- About 0.5 KB stored per KB of text, index included
Three calls
- Send documents: POST /api/collections/NAME/docs, or connect an S3 bucket
- Search: GET /api/collections/NAME/search?q=...®ex=1&filter=key:value
- Or let your agent do it over MCP: list_collections, search_collection, count_collection, get_document
Bring your own bucket
Point a collection at a prefix in an S3 bucket you own. We read only that prefix, index every text object, and keep up as files are added, changed and deleted.
Use cases
- Hosted grep for your AI agents: Coding agents grep instead of using vector search. StackGrep gives every agent hosted grep over your documents and S3 data: exact and regex, indexed, in milliseconds.
- Exact counts for RAG and agents: Vector search returns the top k, so “how many contracts mention X?” gets a guess. StackGrep counts every matching document exactly, for your LLM or agent.
- Exact match search for AI agents: Give your AI agent a search tool over your own documents: exact text and regex, metadata filters, exact counts, answers in milliseconds. REST and MCP.
- RAG without embeddings: Retrieval-augmented generation with no embedding pipeline: your LLM finds passages by exact text and regex, with filters and counts. Nothing to re-embed when data changes.
- Grep an S3 bucket: search the contents of every file: Point StackGrep at an S3 prefix and search every object's contents by exact text or regex in milliseconds, from your code or your AI agent. Read-only access.
- A regex search API that doesn't scan everything: A hosted regex search API: run regular expressions over millions of documents in milliseconds, with metadata filters and exact match counts. No scanning everything.
- A knowledge base MCP server for your documents: A hosted MCP server that lets Claude, Cursor and Codex search your documents by exact text and regex: list, search, count and read. OAuth sign-in or API key.
- Find every contract that says exactly this: Find every contract with a given clause, term or amount, counted exactly. Exact text and regex search over your documents, with metadata filters. Built for agents.
Compared
- StackGrep Engine vs Elasticsearch
- StackGrep Engine vs Algolia
- StackGrep Engine vs Typesense
- StackGrep Engine vs Meilisearch
- StackGrep Engine vs turbopuffer
- StackGrep Engine vs Pinecone
Written in Tern
Every part of StackGrep, from the crawler and the index to the regex engine and the API, is written in Tern, a new compiled language that reads like Python and runs like C. Tern is closed source today and opens soon at ternlang.dev.
Questions
Is this a vector database?
No. StackGrep Engine finds exact text and regex matches, with metadata filters and exact counts. There are no embeddings to compute. Many teams use it next to a vector database: vectors for things like this, StackGrep for the one that says this.
Can I bring my own data?
Yes. Push documents as JSON over the API, or point us at a prefix in an S3 bucket you own. You add a bucket policy that lets us read it, we check a verify file, and from then on we keep the collection in step with new, changed and deleted objects.
How do my agents use it?
Over MCP (Claude, Claude Code, Cursor, Codex and any MCP client, with sign-in or an API key) or the REST API. Agents get four tools: list collections, search, count and read a document word for word.
How fast is it?
On our production servers, 100,000 documents answer a warm search in 0.5 to 32 ms and a cold one in 28 to 148 ms. Writes are durable at about 21,000 documents a second.
What is it written in?
Tern, a new compiled programming language we built for this kind of work: it reads like Python and runs like C. Tern is closed source today and opens soon at ternlang.dev.