๐Ÿ”

Vector Memory Search API

Semantic search over your stored vector memory using cosine similarity. Retrieve the most relevant documents by meaning โ€” not just keyword matching.

API Docs $0.002 / search

About this tool

The IteraTools Vector Memory Search API retrieves documents from your namespace by semantic similarity. It embeds your query with OpenAI text-embedding-3-small and ranks stored documents by cosine similarity. Returns the top_k most relevant results with their scores (0โ€“1, higher = more similar), original text, and metadata. Namespace isolation ensures your data is private to your API key.

Quick Start

curl -X POST https://api.iteratools.com/memory/search \ -H "Authorization: Bearer YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{ "namespace": "my-agent", "query": "What does the user prefer?", "top_k": 3 }'

Response

{ "ok": true, "data": { "results": [ { "id": "fact-1", "text": "The user prefers dark mode and uses Python.", "score": 0.92, "metadata": {"source": "preferences"} }, { "id": "fact-3", "text": "User is building a rhythm game called Sambamancer.", "score": 0.71, "metadata": {} } ], "count": 2 } }

Python Example โ€” RAG Pipeline

import requests def memory_search(namespace: str, query: str, api_key: str, top_k: int = 5) -> list: res = requests.post( "https://api.iteratools.com/memory/search", headers={"Authorization": f"Bearer {api_key}"}, json={"namespace": namespace, "query": query, "top_k": top_k} ) return res.json()["data"]["results"] # RAG: retrieve context before answering query = "What programming language does the user prefer?" results = memory_search("user-profile", query, "YOUR_KEY", top_k=3) context = "\n".join([f"- {r['text']}" for r in results if r['score'] > 0.7]) print(f"Relevant context (score โ‰ฅ 0.7):\n{context}") # Feed to LLM prompt = f"Based on user context:\n{context}\n\nAnswer: {query}"

Request Body

namespacestring (required)Namespace to search in
querystring (required)Natural language search query
top_kinteger (optional)Max results to return (default: 5, max: 100)

Details

EndpointPOST /memory/search
Price$0.002 / request
Similarity metricCosine similarity (0โ€“1)
Embedding modelOpenAI text-embedding-3-small (1536 dims)
IsolationPer API key (namespaces prefixed automatically)
AuthBearer token or x402 micropayment
Base URLhttps://api.iteratools.com

Use Cases

  • ๐Ÿค– RAG pipelines โ€” retrieve context before passing to an LLM
  • ๐Ÿ’ฌ Conversational memory โ€” find relevant past interactions
  • ๐Ÿ“– Knowledge base QA โ€” search indexed documents by meaning
  • ๐ŸŽฏ Recommendation โ€” find similar items, products, or content
  • ๐Ÿ”— Agent tool use โ€” give LLMs access to semantic memory
Full Documentation Memory Upsert โ†’ Memory Clear โ†’ Browse All Tools