Skip to main content

Grep

Browse and keyword search across brain resources. Single query field in path format: type or type/pattern. Keyword only — for semantic similarity search, use Search.
POST /v1/grep

Request

FieldTypeRequiredDescription
querystringYestype or type/pattern. Browse: neurons/. Keyword: neurons/support, memories/invoice

Headers

HeaderRequiredDescription
AuthorizationYesBearer token or API key
X-Brain-IdYesBrain UUID. Required for memories/artifacts.

Behavior

  • Browseneurons/ or neurons (empty pattern). Lists resources.
  • Keywordneurons/support, memories/invoice. ILIKE on names/descriptions; grep cortex for memories/artifacts content.

Response

{
  "type": "neurons",
  "results": [
    { "path": "memories/chunk:...", "title": "...", "snippet": "...", "score": 0.89, "url": "https://..." },
    { "path": "neurons/...", "title": "...", "snippet": "..." }
  ]
}
All results use a unified shape: { path, title, snippet, url?, score? }. score appears only when similarity scoring is used.

Examples

All requests require X-Brain-Id; grep searches within brain scope. Browse neurons:
curl -X POST https://api.auvy.ai/v1/grep \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "X-Brain-Id: YOUR_BRAIN_ID" \
  -d '{"query": "neurons/"}'
Keyword search neurons for “support”:
curl -X POST https://api.auvy.ai/v1/grep \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "X-Brain-Id: YOUR_BRAIN_ID" \
  -d '{"query": "neurons/support"}'
Keyword search memories for “invoice”:
curl -X POST https://api.auvy.ai/v1/grep \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "X-Brain-Id: YOUR_BRAIN_ID" \
  -d '{"query": "memories/invoice"}'