Home / Engine / Use cases

Hosted grep for your AI agents

Claude Code, Cursor and Cline find code with grep, not embeddings: exact matches are cheap, checkable and never stale. But grep stops at one laptop's files. StackGrep is the same loop over everything else your agent needs: tickets, contracts, logs, docs and buckets, indexed so a search takes milliseconds instead of reading every byte.

Join the waitlist See the docs

Why the usual way falls short

  • Plain grep reads every byte, every time: fine for a repo, hopeless for 50 GB of tickets in S3
  • Local grep tools only see one machine's files
  • Vector search answers a different question: what's similar, not what it says

How it looks

# what your agent already does in a repo
grep -rn "INV-1042" .

# the same thing over your company's data
search_collection({ collection: "billing", query: "INV-1042" })
search_collection({ collection: "billing", query: "INV-10[0-9]{2}", regex: true })
count_collection({ collection: "billing", query: "chargeback" })

What your agent asks, and what it calls

“Find everything about invoice INV-1042”search_collection(query: "INV-1042")
“Which runbooks still mention the old hostname?”search_collection(query: "db-old\.internal", regex: true)
“How many tickets mention chargebacks?”count_collection(query: "chargeback")

Questions

Why do coding agents use grep instead of vector search?

Because exact matches are reliable: the agent searches, reads what it found, and searches again, and nothing goes stale when files change. The teams behind Claude Code and Cline have both said they chose search over embeddings for this reason.

Isn't grep slow on lots of data?

Plain grep is: it reads everything. StackGrep keeps an index of every 4-byte sequence in your text, so a search only reads the documents that can match. That's how it answers over millions of documents in milliseconds.

Does it burn a lot of tokens?

Results come back as the matching line with its document id, not whole files, and count_collection answers how many without returning them. The agent reads a whole document only when it asks for one.

More use cases

Give your agents exact search

StackGrep Engine is onboarding teams from the waitlist. Bring your documents or your bucket.

Join the waitlist Read the docs