topoteretes/cognee

cognee-recall

Use when querying cognee memory with recall() (or search()) — picking a search type, understanding auto-routing, scoping to datasets, node sets or sessions, getting context or citations instead of an answer, reading the results, or debugging empty or unexpected results.

  • SKILL.md 已保存
  • 英文来源资料
  • 安装与运行未实测
先判断是否解决你的问题

cognee-recall 是什么?

Use when querying cognee memory with recall() (or search()) — picking a search type, understanding auto-routing, scoping to datasets, node sets or sessions, getting context or citations instead of an answer, reading the results, or debugging empty or unexpected results.

以上为来源原文,中文用途说明尚待整理。

按客户端选择安装入口

怎么接入你的 Agent?

  1. 定位完整 Skill 目录

    打开本项目来源,核对 SKILL.md 及其引用的脚本和资料。

  2. 交给你正在用的 Agent

    在下面选择客户端,展开并复制安装指令,让 Agent 读取来源后选择安装方式。

  3. 确认识别,再做具体任务

    让 Agent 回报安装目录和识别到的名称 cognee-recall,然后告诉 Agent 你的任务和实际输入,让它先核对触发条件。

展开并复制给 Codex 的安装指令
发送给 Codex

安装并检查 cognee-recall

请在 Codex 的当前工作环境中安装并检查 cognee-recall 这个 Skill。

项目身份:topoteretes/cognee / cognee-recall
来源:https://github.com/topoteretes/cognee/blob/1961133d0c68b450fe8e71941a756371e94f7c04/.agents/skills/cognee-recall/SKILL.md
已定位的源文件:.agents/skills/cognee-recall/SKILL.md

1. 先阅读真实 SKILL.md 和它引用的必要文件,确认触发条件、安装方式、依赖与权限;尊重源文件要求的审批步骤。
2. 按当前客户端支持的方式安装完整 Skill 目录,保留已有配置,不只复制一段提示词。涉及缺失凭证、目标目录或权限时先列出缺项并向我确认。
3. 安装后回读实际目录、Skill 名称和识别结果,说明哪些步骤已完成,哪些只是文档检查,不得把安装成功当作任务已经实测。
4. 如来源提供了可安全验证的示例,在我提供所需输入后做一个最小任务;创建、修改、删除、部署或发送内容前,按源文件和我的授权执行。
需要核对时再展开原文

来源原文与资料状态

源文件
已保存 SKILL.md,抓取于 2026-11-23T04:29:48.865Z
中文使用说明
尚待整理,保留英文来源内容
安装与任务测试
本站未执行安装或任务测试
来源复核
已保留来源记录;当前完整用法未逐项人工复核
展开 SKILL.md 原文、章节与历史收录资料

.agents/skills/cognee-recall/SKILL.md · 抓取时间 2026-11-23T04:29:48.865Z

以下保留源文件的 description、章节及摘录,供核对中文说明;完整文件通过上方链接打开。

抓取成功不代表已完成安装或任务测试。

来源 description(原文)

Use when querying cognee memory with recall() (or search()) — picking a search type, understanding auto-routing, scoping to datasets, node sets or sessions, getting context or citations instead of an answer, reading the results, or debugging empty or unexpected results.

查看源文件章节 / Source sections
  • 原文:Query memory with recall()
  • 原文:Use it
  • 原文:How the search type is picked
  • 原文:Search types
  • 原文:Scope: which sources are searched
  • 原文:Filters and knobs
  • 原文:Reading the results
  • 原文:Pitfalls
  • 原文:recall() or search()?
  • 原文:How it works
  • 原文:Extending it
原文:Query memory with recall()

`recall()` is cognee's query API. It picks a search strategy, searches the graph and (with a session) the session cache, and returns a list of tagged results. ```python import cognee results = await cognee.recall("Where was Einstein born?") for r in results: print(r.source, r.text) # e.g. "graph", "Einstein was born in Ulm." ``` Without `datasets` it covers every dataset the user can read, but dataset routing (always on, no off switch) scores those datasets against the query on their global context index and searches only the best `DATASET_ROUTING_TOP_K` (default 1), plus any dataset that has no index yet. A dataset farther than `DATASET_ROUTING_DISTANCE_CUTOFF` (cosine distance, default 0.8) is skipped, and when none is within it all are searched; datasets within `DATASET_ROUTING_TIE_MARGIN` (default 0.001) of the last routed one are searched too. A routed search that finds nothing is widened to the rest. The search log prints every dataset's distance. Routing assumes one embedding model across datasets; after an `EMBEDDING_MODEL` change it logs a warning and every readable dataset is searched. Pass `datasets=["research"]` (names) or `dataset_ids=[...]` (UUIDs, which win) to pin the scope yourself; an explicit scope is never routed.

原文:How the search type is picked

1. An explicit `query_type=SearchType.X` always wins. 2. With no usable LLM key nothing can write an answer, so on both paths `HYBRID_COMPLETION`, `GRAPH_COMPLETION` and `RAG_COMPLETION` run with `only_context=True` (the assembled prompt instead of an answer), and a routed `TEMPORAL` or `BROAD` becomes `HYBRID_COMPLETION` with `only_context=True`; a routed `CODE` needs no LLM and runs as it is. 3. Without an explicit type, the router (`auto_route=True`, the default). It is five regex rules, first match wins, no LLM call: - the whole query is one `"quoted phrase"` → `CHUNKS_LEXICAL` - mentions coding rules/standards/conventions or code-review guidelines → `CODING_RULES` - code phrasing right next to an identifier (`what calls parse_config`, `where is CodeRetriever defined`, `callers of foo()`) → `CODE`, running its `ask` operation over the identifiers - opens with `how many` / `total number of` → `BROAD` - an absolute date behind a time preposition (`in 2019`, `before 1900`, `on 7 November 1867`) → `TEMPORAL` 4. Everything else → `HYBRID_COMPLETION`. A routed type (never a pinned one) that the backend rejects, or a routed `CHUNKS_LEXICAL` / `CODING_RULES` / `CODE` / `BROAD` that returns nothing, is retried once as `HYBRID_COMPLETION`. So is a routed `CODE` with no matching symbol or no code graph, and a routed `BROAD` that cannot write a working query, hits a limit or finds no document text; any other "no data" is not retried. The router never picks `CYPHER`. ```python from cognee import SearchType await cognee.recall("What changed in v2?", query_type=SearchType.GRAPH_COMPLETION) ```

原文:Search types

The full list is `cognee/modules/search/types/SearchType.py`; the type-to-retriever table is `cognee/modules/retrieval/README.md`. | Type | LLM? | Use for | |---|---|---| | `HYBRID_COMPLETION` (default) | yes | General questions: document passages plus entity neighbourhoods, then an answer | | `GRAPH_COMPLETION` | yes | Answers from graph relationships | | `GRAPH_COMPLETION_COT`, `_CONTEXT_EXTENSION`, `_DECOMPOSITION` | yes | Harder multi-hop questions (more LLM calls) | | `GRAPH_SUMMARY_COMPLETION` | yes | Summarizes the retrieved graph edges at query time (extra LLM call), then answers | | `RAG_COMPLETION` | yes | Classic chunk RAG | | `TEMPORAL` | yes | Time questions; hybrid retrieval reranked by the dates in the question | | `CHUNKS` | no | Raw passages by vector similarity | | `CHUNKS_LEXICAL` | no | Keyword / exact-phrase match | | `SUMMARIES` | no | Document summaries | | `CODE` | no | Code-graph operations via `code_query={...}`; needs `scope="code"` in recall | | `SKILLS` | no | Discover skill playbooks; exactly one dataset | | `CYPHER` | no | Raw Cypher. Off by default; `ALLOW_CYPHER_QUERY=true` enables it. It can write, so only pass user-authored queries deliberately | | `NATURAL_LANGUAGE` | yes | LLM writes Cypher, then runs it (same flag) | | `GRAPH_REPORT` | partly | Graph insight report: hubs, cross-set links, suggested questions | | `FEELING_LUCKY` | yes | An LLM picks the type | | `AGENTIC_COMPLETION` | yes | Multi-step loop with skills/tools; exactly one dataset. Use `search()` for its parameters |

原文:Scope: which sources are searched

`scope` is one of, or a list of: `graph`, `session`, `session_first`, `trace`, `session_context`, `all`, `tools`, `code`. `all` means graph + session + trace + session_context; `tools` and `code` are never included implicitly. When `scope` is omitted: | You pass | Sources | |---|---| | `session_id` only | Session first; a session hit skips the graph | | `session_id` + `datasets` | Session and graph both contribute | | `session_id` + `query_type` | **Graph only** — pinning a type drops the session | | no `session_id` | Graph only | Session and trace search is keyword overlap, not embeddings.

原文:Filters and knobs

- `top_k=15`: per dataset, not in total. The default HYBRID caps each lane at `min(top_k, 10)`; set `chunks_top_k` / `entities_top_k` / `facts_top_k` in `retriever_specific_config` to go higher. - `node_name=["AI"]` (+ `node_name_filter_operator="OR"|"AND"`): restricts graph/chunk/completion types to data remembered with that `node_set`. SUMMARIES, CHUNKS_LEXICAL, GRAPH_REPORT, CYPHER, NATURAL_LANGUAGE, CODE and SKILLS ignore it; CODING_RULES treats it as the rules node-set name. - `system_prompt` / `system_prompt_path`: change the answering prompt. - `response_model=MyPydanticModel`: structured answer, on `r.structured`. - `include_references=True`: attach the document chunks that support each graph edge used (needs `EDGE_EVIDENCE_ENABLED=true`, the default). - `only_context=True`: return what the LLM would have received instead of an answer. `r.text` is the rendered user prompt, `r.system_prompt` the system prompt. Pin `query_type` when you use it. - `retriever_specific_config={...}`: retriever-only options. For the agentic extras (`skills`, `tools`, `max_iter`) and `node_type`, call `cognee.search()` instead, which takes them as parameters.

原文:Reading the results

Each item is a Pydantic model with a `source` discriminator: `graph`, `session`, `trace`, `session_context`, `code`, `tools`, `skills`, or `system`. Graph items carry `text` (always renderable), `search_type`, `kind`, `score`, `dataset_id` / `dataset_name`, `metadata`, `raw`, and `structured`. A `system` item is a status marker, not data (see "memory warming up" below). When a query sounds procedural ("how do I…", "runbook", "steps to…") and exactly one dataset is targeted, recall also runs a small `SKILLS` lookup and appends hits with `source="skills"`. Disable with `SKILL_GATE_ENABLED=false`.

文件 SHA256:13994db1ddde07009a3f19892ab186117c5eda875afb1dcb00eba478e27f2fdf

仓库许可证记录:Apache-2.0;repository-license-recorded-scope-unverified,查看来源。

SKILL.md原文description · 2026-11-23T04:29:48.865Z

Use when querying cognee memory with recall() (or search()) — picking a search type, understanding auto-routing, scoping to datasets, node sets or sessions, getting context or citations instead of an answer, reading the results, or debugging empty or unexpected results.

查看历史简介来源

历史收录数据

来源仓库topoteretes/cognee
Skill源路径.agents/skills/cognee-recall/SKILL.md

安装前请让使用的Agent先读取这个SKILL.md及其所在目录,确认依赖和所需权限。此页不生成未经来源验证的安装命令。

返回 Skills 目录,按任务继续筛选 · MCP与Skills教程与资源