topoteretes/cognee

cognee-cli

Use when the user wants to drive cognee from the terminal with cognee-cli — remember/recall/forget/improve memory commands, managing datasets and config, or database migrations.

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

cognee-cli 是什么?

Use when the user wants to drive cognee from the terminal with cognee-cli — remember/recall/forget/improve memory commands, managing datasets and config, or database migrations.

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

按客户端选择安装入口

怎么接入你的 Agent?

  1. 定位完整 Skill 目录

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

  2. 交给你正在用的 Agent

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

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

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

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

安装并检查 cognee-cli

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

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

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

来源原文与资料状态

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

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

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

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

来源 description(原文)

Use when the user wants to drive cognee from the terminal with cognee-cli — remember/recall/forget/improve memory commands, managing datasets and config, or database migrations.

查看源文件章节 / Source sections
  • 原文:Use the cognee CLI
  • 原文:Core flow
  • 原文:Session memory and enrichment
  • 原文:Legacy / lower-level commands
  • 原文:Management
  • 原文:Database migrations
  • 原文:Gotchas
原文:Use the cognee CLI

`cognee-cli` ships with the package (entry point in `cognee/cli/_cognee.py`; each command lives in `cognee/cli/commands/`). Every command has `--help` for its flags, but only a few (`demo`, `eval`, `serve`, `push`, `upgrade`, `downgrade`, `stamp`, and `search` with one CODE example) include usage examples — for the memory commands use the examples in this file. Needs `LLM_API_KEY` configured, same as the SDK.

原文:Core flow

The memory commands are the primary surface as of cognee 1.x: ```bash cognee-cli remember "Your text here" # also accepts file paths / URLs cognee-cli remember ./docs --dataset-name my_project cognee-cli recall "Your question" # query the graph cognee-cli recall "keyword" --query-type CHUNKS cognee-cli forget --all # wipe local state ``` `remember` is ingest + graph build in one step (`add` + `cognify` under the hood); `--background`/`-b` runs the cognify stage in the background, and `--dry-run` estimates LLM tokens/cost without ingesting. `recall` takes `--datasets`/`-d`, `--top-k`/`-k` (default 10), and `--session-id`/`-s`. `forget` targets `--dataset`, `--dataset-id`, `--data-id` (needs a dataset), or `--everything`/`--all` — one unified command replacing the older `delete` and empty-dataset paths. `--memory-only` (with a dataset) drops the graph and vectors but keeps the raw files, so the data can be rebuilt. > **`forget --all` does not ask for confirmation.** It deletes every dataset > immediately, even on a non-interactive stdin. The legacy `delete --all` > prompts `Delete ALL data from cognee? [y/N]` first, so switching to `forget` > silently drops that safety net — script it with care. `--query-type` accepts 10 of the SDK's 20 `SearchType` values — the list in `cognee/cli/config.py:SEARCH_TYPE_CHOICES`: HYBRID_COMPLETION, GRAPH_COMPLETION, RAG_COMPLETION, CHUNKS, CHUNKS_LEXICAL, SUMMARIES, CODE, CYPHER, GRAPH_REPORT, SKILLS. The rest (TEMPORAL, GRAPH_COMPLETION_COT, AGENTIC_COMPLETION, NATURAL_LANGUAGE, …) are SDK-only, e.g. `cognee.recall(q, query_type=SearchType.TEMPORAL)`. When `--query-type` is omitted the CLI uses `HYBRID_COMPLETION` (`DEFAULT_SEARCH_TYPE`), whereas the SDK's `cognee.recall()` auto-routes between search types. `--top-k` defaults to 10 on the CLI and 15 in the SDK.

原文:Session memory and enrichment

Session entries are currently written from the SDK — `cognee.remember(..., session_id="chat_1")` — not the CLI (`cognee-cli remember` has no session flag). The CLI side of session memory is reading and bridging: ```bash cognee-cli recall "question" -s chat_1 # session cache first: without -d/-t # this searches the session directly cognee-cli sessions get # retrieve session Q&A history cognee-cli improve -d my_project -s chat_1 # bridge session content into the graph cognee-cli improve -d my_project # enrich/index the graph (no session) cognee-cli feedback ... # attach feedback to results ``` `improve` also takes `--feedback-alpha` (learning rate in (0, 1]; default `IMPROVE_FEEDBACK_ALPHA`, 0.1), `--build-global-context-index`, `--build-truth-subspace` (both opt-in stages; the truth subspace needs `-s`), and `--background`/`-b` (`--node-name` is deprecated: it warns and is ignored). It prints one line per stage — name, status (`completed` / `already_completed` / `skipped` / `errored`) and the skip reason (e.g. `no_session_ids`, `opt_in_disabled`). `remember`/`improve` build their graphs through `cognify()`, so cognify-level settings (e.g. `PROVENANCE_TRACKING=true`) apply to them too.

原文:Legacy / lower-level commands

`add`, `cognify`, `search`, and `delete` still ship and are what the memory commands call underneath. Use them only to drive a single stage in isolation; prefer `remember`/`recall`/`forget`/`improve` otherwise. ```bash cognee-cli add "text" && cognee-cli cognify # what `remember` does in one step cognee-cli search "question" # `recall` minus routing/scope/session sources cognee-cli delete --all # superseded by `forget --all` ```

原文:Management

```bash cognee-cli datasets list # dataset operations cognee-cli config get [key] [--show-secrets] # view one/all settings (API keys masked by default) cognee-cli config set <key> <value> # set + persist to ./.env in the cwd cognee-cli config unset <key> # reset a key to its default (also persisted) cognee-cli -ui # launch API server + UI (see cognee-server skill) cognee-cli serve --url http://localhost:8000 # connect CLI/SDK to a running instance ```

原文:Database migrations

cognee has two migration chains: the relational schema (Alembic, in `cognee/alembic/`) and the graph/vector data chain (slugs registered in `cognee/modules/migrations/registry.py`). Both run automatically — at API server startup and on the first write (`remember`, `add`, `cognify`, `improve`, …) in an SDK/CLI process — unless `ENABLE_AUTO_MIGRATIONS=false`. So you rarely need these commands; they are for inspecting state, disabled auto-migration, and rollbacks. There is no `migrate` command. ```bash cognee-cli current # stamped revision per database (per dataset # with access control on) cognee-cli history # the data-migration chain, newest first cognee-cli upgrade # relational to head, then data chain to head cognee-cli upgrade <slug> # data chain up to and including <slug> cognee-cli upgrade --alembic <rev> # pin the relational (Alembic) target cognee-cli downgrade <slug|base> # REWRITES DATA; revision is required, # prompts unless --force; --dataset <uuid> # (repeatable) limits it cognee-cli stamp <head|base|slug> # set the stored revision WITHOUT running # anything; prompts unless --force; # --dataset <uuid> (repeatable) limits it ``` The positional revision is always a **data-chain slug**; the relational target goes through `--alembic`. `downgrade` leaves the relational schema alone unless you pass `--alembic`. `upgrade` runs even when `ENABLE_AUTO_MIGRATIONS=false`. `--alembic-path` (or `COGNEE_ALEMBIC_PATH`) points at a custom Alembic scripts directory.

文件 SHA256:6a820d8632a1cfccb44c0f31b58bffdee9ab4c4acabf3a2e73ed64e019f9d442

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

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

Use when the user wants to drive cognee from the terminal with cognee-cli — remember/recall/forget/improve memory commands, managing datasets and config, or database migrations.

查看历史简介来源

历史收录数据

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

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

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