extract_memories
Extracts structured preferences, facts, and skills from conversation text using rule-based or LLM semantic matching, with optional auto-save into a persistent shared memory store.
Instructions
Extract structured memories from conversation text. mode="rule" (default) detects preferences, facts, and skills via keyword pattern matching. mode="llm" instead understands the full context (optionally pairing assistant_text) semantically — uses the configured LLM extraction provider, and degrades to rule-based extraction (reported via fallback_used/fallback_reason) when no provider is configured or the LLM call fails. Returns extracted items; with auto_save=true it also writes them through delta-write (near-identical memories are merged or skipped, not duplicated) and requires agent auth when the agent has a registered key. Use save_memory instead when you already know the exact memory to store. Invalid occurred_at is an error, never a silent drop.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"text": "<text>"
},
"name": "extract_memories"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Extraction mode: "rule" (default, keyword pattern matching) or "llm" (semantic extraction over the full context; uses the configured LLM extraction provider, falling back to rule-based when none is configured or the LLM call fails — see fallback_used in the result). | |
| text | Yes | Text to extract memories from (conversation content, e.g. the user's turn) | |
| api_key | No | API key for agent authentication (required if agent has a registered key) | |
| agent_id | No | Agent ID to attribute saved memories to | unknown |
| auto_save | No | Whether to auto-save extracted memories | |
| fact_write | No | preserve (default); resolve requires auto_save plus explicit assertions and keyed actor. | |
| occurred_at | No | When the extracted facts actually happened in the source conversation (RFC 3339), stored as `occurred_at` on saved memories — distinct from `created_at` (ingestion time). Invalid input is an error, never a silent drop. | |
| assistant_text | No | Optional paired assistant/response text for mode="llm" — passing both sides of the exchange lets the model resolve references and implicit preferences a single text can't. | |
| fact_assertions | No | Explicit assertion per extracted item, positionally matched; null leaves an item unasserted. No automatic subject/property keys are generated from plaintext. |