remember_fragment
Store and deduplicate context fragments with entropy scoring. Duplicates are merged with salience boosting to manage context efficiently.
Instructions
Store a context fragment with automatic dedup and entropy scoring.
Fragments are fingerprinted via SimHash for O(1) duplicate detection. Each fragment's information density is scored using Shannon entropy. Duplicates are automatically merged with salience boosting.
Args: content: The text content to store (code, tool output, etc.) source: Origin label (e.g., 'file:utils.py', 'tool:grep') token_count: Token count (auto-estimated if 0) is_pinned: If True, prioritize exact inclusion within the pinned budget reserve; excess pinned content remains a high-priority compressed candidate so the total token ceiling stays honest.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| source | No | ||
| content | Yes | ||
| is_pinned | No | ||
| token_count | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |