# agent402.tools Semantic Memory Recall

> agent402.tools Semantic Memory Recall is a paid API for AI agents from agent402.tools, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-14).

Retrieves the top-k previously stored memory entries most semantically similar to a natural-language query, ranked by cosine similarity score, within a wallet-scoped memory store.

## Facts

- Endpoint: POST https://agent402.tools/api/memory/recall
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent402-tools-semantic-memory-recall-b42abaff
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_2F-0FabO3hdeEyAD6oXyn

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability agent402-tools-semantic-memory-recall-b42abaff -d '<json body>'
```

Example prompt: Search my semantic memory for the top 5 entries most similar to 'project deadlines and milestones' and return them with their similarity scores.

## When to prefer this

Use this endpoint when you need to retrieve previously stored information by meaning rather than exact key or identifier — ideal for AI agent memory retrieval, context injection, and fuzzy recall of past notes or facts. Prefer over exact-key lookups when the query is natural language and the stored content is unstructured text.

## Known failure modes

- Query string missing — returns 400 bad request
- k value out of range (must be 1–50) — returns validation error
- Owner namespace provided without a valid grant — returns authorization error
- No stored memories exist yet — returns empty result set
- Payment not processed — returns 402 Payment Required

## How this service works

Recall remembered text by similarity to a query (ranked by cosine similarity), not by exact key. Returns the top-k matches with scores. The retrieval half of the wallet-scoped semantic memory.

## Output

Returns the top-k memory entries ranked by cosine similarity to the query, each with a similarity score. Default k is 5, max is 50. Results represent the closest semantic matches to the query from the wallet-scoped memory store.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "k": {
   "type": "number",
   "description": "How many matches (1-50, default 5)"
  },
  "owner": {
   "type": "string",
   "description": "Optional 0x namespace (requires a grant)"
  },
  "query": {
   "type": "string",
   "description": "Natural-language query"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "query": "why did the deployment break",
  "results": [
   {
    "id": "abc123",
    "text": "The deploy failed because…",
    "score": 0.62
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent402-tools-semantic-memory-recall-b42abaff/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.tools](https://www.zero.xyz/host/agent402.tools/llms.txt)
