Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Mergetober: keeping an agent in sync with a Sanity CMS, with cognee

说明与用途

cognee 的 Sanity 连接器通过跟踪文档修订并重新渲染相关内容,保持知识代理与内容更改同步,确保回答准确。

问题

An agent that answers questions about content in a Sanity CMS must stay up‑to‑date when articles, authors, or other referenced documents are edited, unpublished, or deleted.

结果

The connector successfully keeps the agent’s memory in sync with Sanity by tracking revisions of referenced documents, ensuring that renames or updates propagate to all dependent articles.

工作流

  • 1. Create a Sanity connector with cognee specifying project_id, dataset, document_types, and a read‑only token.
  • 2. Call cognee.remember() to ingest the selected documents into the agent’s memory.
  • 3. When a document or its referenced document changes, the connector detects the new _rev and re‑renders all dependent documents.
  • 4. The agent answers queries based on the latest rendered text.
  • 5. Guard against empty listings by raising an error if no documents are returned unless allow_empty_listing=True.

证据

An agent that answers questions about that content needs to stay in step with it: when an article is edited, unpublished or deleted, its answers should change too.

来源

The connector tracks the revisions of the documents each article references too, so the author's new revision re-rendered both articles that point to her.

来源

If a run lists nothing but earlier runs synced documents, the connector raises and forgets nothing.

来源

  • 记录日期: 2026-11-02T06:28:44.939Z