Overview
mem_capture_passive looks for sections like ## Key Learnings: or ## Aprendizajes Clave: in text output and extracts numbered or bulleted items. Each item is saved as a separate observation with type passive.
This is useful for:
- Automatically capturing knowledge at the end of tasks
- Extracting learnings from agent responses
- Building a knowledge base from subagent completions
- Saving discoveries without manual
mem_savecalls
Parameters
The text output containing a learnings section. Must include a heading like
## Key Learnings: followed by numbered or bulleted items.Session ID to associate the learnings with. Defaults to
manual-save-{project}.Project name to scope the learnings. Defaults to the current directory name.
Source identifier for tracking where learnings came from (e.g.,
subagent-stop, session-end, manual).Response
Number of new learnings saved
Number of duplicate learnings skipped (already exist in memory)
Total number of learnings found in the input
Expected Format
The tool recognizes two heading formats: English:Example Usage
Basic Usage
- Title: First 50 characters of the learning
- Type:
passive - Content: Full learning text
- Project:
auth-service - Session:
session-abc123
With Duplicates
Deduplication
The tool uses content-based deduplication:- Each learning is hashed based on normalized content (lowercase, whitespace trimmed)
- If the hash matches an existing observation in the same project within a 15-minute window, it’s skipped
- This prevents duplicate saves when the same learnings appear in multiple outputs
Use Cases
End-of-Task Knowledge Capture
When completing a task, include a Key Learnings section:mem_capture_passive with this output to automatically save all three learnings.
Subagent Completion Hooks
When a subagent finishes work, extract learnings automatically:Session End Summary
Capture learnings from end-of-session summaries:Comparison with mem_save
| Feature | mem_capture_passive | mem_save |
|---|---|---|
| Format | Extracts from markdown headings | Structured What/Why/Where/Learned |
| Granularity | One observation per learning item | One observation per save call |
| Use Case | Automatic extraction from output | Explicit, proactive saves |
| Control | Less control (auto-parsed) | Full control over structure |
| Deduplication | Automatic within 15-min window | Manual topic key upserts |
mem_save for deliberate, structured memories. Use mem_capture_passive for automatic knowledge extraction from text.
Profile
Profile:agent (deferred loading)
This tool is in the agent profile but has DeferLoading enabled, meaning it’s available to agents but not loaded into context by default. Agents can discover it through tool search when needed.
Why deferred? Most agents use mem_save for explicit memory creation. Passive capture is specialized for automated workflows and may not be needed in every session.
Related Tools
mem_save
Save structured observations explicitly
mem_search
Search saved learnings
mem_session_summary
Save comprehensive session summaries
POST /observations/passive
HTTP API for passive capture