搜索用户认知记忆
cognitive_searchSearch stored user memories by keyword, type, or life domain to retrieve relevant context before answering. Returns confidence-ranked entries with filtering and pagination.
Instructions
按关键词、内容类型、生活域等条件检索用户认知记忆,返回与查询最相关的记忆条目(按置信度降序,支持分页)。
当对话涉及用户的历史偏好、身份背景、正在进行的项目、过往事件时,先调用此工具获取上下文再作答,避免凭猜测回复。
Args:
keyword (string, optional): 关键词,匹配记忆内容子串
type (string, optional): 内容类型过滤:fact/protocol/pragmatic/emotion/value/procedure/episodic
domain (string, optional): 生活域过滤:career/family/intimate/health/finance/entertainment/social/growth/basic_cognition/uncategorized
scope (array[string], optional): 场景标签过滤
include_dynamic (boolean, default true): 是否包含动态内容
limit (number, default 20): 返回条数上限
offset (number, default 0): 分页偏移
Returns(结构化): { "total": number, // 总命中数 "count": number, // 本次返回数 "offset": number, "has_more": boolean, // 是否还有更多 "entries": [{ id, type, content, domain, depth, confidence, rule_status, scope, timestamp, is_dynamic, pending_follow_up }] }
Examples:
"我记得用户说过他喜欢什么" -> keyword="喜欢"
"查一下用户工作相关的记忆" -> domain="career"
"用户对 PPT 有什么偏好" -> keyword="PPT"
Error:
无匹配时返回 total=0 的空列表,不是错误
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | 按内容类型过滤:fact/protocol/pragmatic/emotional/value/procedure/episodic | |
| limit | No | 返回条数上限(默认 20,最大 100) | |
| scope | No | 按场景标签过滤(记忆的 scope 字段) | |
| domain | No | 按生活域过滤:intimate/family/career/social/entertainment/health/finance/growth/basic_cognition/uncategorized | |
| offset | No | 分页偏移(默认 0) | |
| keyword | No | 关键词,匹配记忆内容子串;不传则返回全量(配合 type/domain 过滤) | |
| include_dynamic | No | 是否包含动态内容(默认 true) |