{"uid":"cap_Aszxz2XVMK936opw4lEFI","slug":"vectorcache-semantic-cache-lookup-4e603d5a","name":"VectorCache Semantic Cache Lookup","description":"High-speed semantic vector cache for multi-agent swarms. Redis-backed similarity lookup with in-memory fallback before expensive embedding pipelines.","url":"https://vectorcache-production.up.railway.app/vector/cache?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"query":{"type":"string","description":"Text to look up in the semantic cache"},"vector":{"type":"array","items":{"type":"number"},"description":"Optional embedding to store on miss"},"namespace":{"type":"string"},"storeOnMiss":{"type":"boolean"}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.003","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"registry","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.003/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_aJX4hLO1njKdTiI7KcJKc","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","costPer":"request","priority":0,"asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Performs a semantic similarity lookup in a Redis-backed vector cache, returning a cached result on hit or optionally storing a new vector on miss, before hitting expensive embedding pipelines.","exampleAgentPrompt":"Before calling the embedding model, check the vector cache under namespace 'customer-support' for the query 'how do I reset my password?' and store the embedding on a cache miss.","exampleUseCases":[{"title":"Deduplicating agent queries in a swarm","prompt":"We have 10 agents all potentially sending the same user questions to the embedding API — check the vector cache under namespace 'agent-swarm-v1' for the query 'what is our refund policy?' and store the result on a miss so other agents can reuse it."},{"title":"Cost-saving semantic cache before LLM call","prompt":"Before I call the expensive embedding pipeline, look up 'what are the symptoms of diabetes?' in the vector cache under namespace 'medical-qa' — if it's a miss, store the embedding I'm passing along."},{"title":"Shared knowledge cache across agent sessions","prompt":"My agents share a namespace called 'product-faq' — check the semantic cache for 'how long does shipping take?' and tell me if there's a cached hit so I can skip the embedding step entirely."}],"resultDescription":"Returns whether the query was a cache hit or miss, and on a hit, provides the semantically similar cached result (including similarity score and matched content). On a miss with storeOnMiss enabled, acknowledges storage of the provided vector for future lookups.","failureModes":["Redis backend unavailable — falls back to in-memory cache, may return stale or cold results","Invalid or mismatched vector dimensions cause storage failure on miss","Namespace not found returns empty result set treated as a miss","Malformed query string or missing required 'query' field returns a 400-level error","Payment failure via x402 protocol results in 402 response blocking the call"],"whenToPreferThis":"Choose this endpoint when you need to avoid redundant, expensive embedding API calls across a multi-agent system and want a shared, low-latency semantic cache. It is ideal when agents frequently encounter semantically similar (but not identical) queries and you want deduplication before hitting an LLM or embedding pipeline. Prefer it over building your own Redis vector layer when you need a managed, ready-to-use solution with namespace isolation for different agent teams or topics.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-10T06:34:31.672Z","isFirstParty":false,"canonicalSlug":"vectorcache-semantic-cache-lookup-4e603d5a"}