Home / Engine / Use cases

Exact match search for AI agents

Agents don't browse, they look things up: an order number, a customer's name, the clause that says net 30. StackGrep Engine gives them a search tool that finds exactly that, quotes it word for word, and says how many more there are.

Join the waitlist See the docs

Why the usual way falls short

  • Vector search returns passages that feel similar, so an agent asking for INV-1042 can get INV-1024
  • Top-k results can't answer “how many”, so agents guess
  • A search cluster is one more thing to size, patch and pay for while it idles

How it looks

search_collection({ collection: "orders", query: "INV-1042" })
→ {"hits": [{"id": "inv-1042", "line": "Invoice INV-1042  Total: 260 EUR"}], "took_ms": 2.4}

count_collection({ collection: "orders", query: "refund requested" })
→ {"docs": 318, "sample": ["t-5512", "t-5530", ...]}

What your agent asks, and what it calls

“Find the order for invoice INV-1042”search_collection(query: "INV-1042")
“How many tickets mention a double charge this month?”count_collection(query: "double charge", filter: "month:2026-10")
“Show me the full contract for Globex”get_document(id: "globex-msa")

Questions

Why not just use embeddings?

Embeddings are great for “things like this”. Most agent lookups are names, IDs, phrases and codes, where close isn't good enough. Use both if you like: StackGrep for the exact match, vectors for the fuzzy one.

Which agents can use it?

Anything that speaks MCP (Claude, Claude Code, Cursor, Codex and others) or can call a REST API. MCP clients can sign in with OAuth, so there's no key to paste.

Do agents need to write regex?

No. Plain text works and is what agents use most. Regex is there when the agent needs a pattern, like every order number of a certain shape.

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