capture
Store durable user preferences, decisions, and facts in the Wenlan wiki memory so agents retain context across sessions. Use proactively when users share lasting personal or project insights.
Instructions
Capture a memory: one durable insight the user's wiki should keep.
STORE PROACTIVELY, without waiting for 'remember this' (a floor, not a trigger): when the user states a preference, makes a decision, corrects you or earlier information, or shares a durable fact about themselves or the people, projects, and tools they care about.
WHEN NOT TO STORE: conversation filler; things the user can trivially re-derive (file paths, recent git history); anything already stored (recall first if unsure); Tool output or command results (file contents, build logs, system prompts); transient task state; general world facts not personal to this user; Your own inferences the user did not express; agent operating rules ('always X' / 'never Y' belong in the agent's own config, not shared memory: store the preference as a fact, never the rule).
CONTENT QUALITY: Specific beats vague ('prefers Rust for CLI tools because of compile-time safety' > 'likes Rust'). Include the WHY, which only you know. Name people, projects, and tools; this powers the knowledge graph. Atomic: one idea per memory. Each call is one atomic idea: 'prefers TDD' and 'uses pytest' are two calls. Declarative, not narrative: 'User prefers X because Y', not 'User said today they prefer X'; memories outlive the conversation.
MEMORY TYPES: omit and trust the backend. By default do NOT set memory_type; the backend auto-classifies into identity / preference / decision / lesson / gotcha / fact with more context than you have, and agents that over-specify pick wrong. Opt in only when sure: 'profile' (about the user: identity / preference), 'knowledge' (about the world: decision / lesson / gotcha / fact), or a precise type when the distinction matters. EXCEPTION: set memory_type="decision" explicitly ONLY when the user articulated the alternatives weighed AND the reasoning; those structured fields power the Decision Log view. A bare 'I'm switching to Cursor' is a preference change, not a decision. NO MODEL: when a capture receipt says enrichment: paused or enrichment: off, nothing classifies memories, so set memory_type yourself on every capture.
Omitting structured_fields beats guessing. If supersedes is supplied for a correction, this call can replace an existing memory in retrieval; use it only when that replacement is intended.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| space | No | Topic scope (e.g. 'rust', 'work', 'health', 'origin'). Auto-detected if omitted. | |
| entity | No | Person, project, or tool name to anchor to (e.g. 'Alice', 'Wenlan', 'PostgreSQL'). Helps build the knowledge graph. | |
| content | Yes | The memory content. Write as a complete statement with context and reasoning, not shorthand. One idea per memory. | |
| session | No | Your AI session as tool:id, e.g. claude-code:<session id>; links what you write back to this conversation. | |
| confidence | No | 0.0-1.0. Leave unset for auto-calculation based on type and trust level. Set low (0.3-0.5) for uncertain info, high (0.8-1.0) for user-stated facts. | |
| supersedes | No | source_id of a memory this replaces. Use when correcting or updating an existing memory — get the ID from recall first. If the user has set your agent's trust level below full, a capture that sets supersedes is staged for review rather than applied: the response says gated: true, and the memory you meant to replace keeps answering searches until a human accepts your change. Tell the user the correction is waiting for their approval; do not repeat the capture. | |
| memory_type | No | "profile" (about the user) or "knowledge" (about the world) — or precise: "identity", "preference", "decision", "lesson", "gotcha", "fact" — auto-classified if omitted | |
| retrieval_cue | No | A question this memory answers, for search matching. Auto-generated by backend; only supply to override. | |
| structured_fields | No | Pre-extracted structured fields as a JSON object. Auto-extracted by backend; only supply if you have high-quality structured data already. |