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

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

Описание и применение

Подключение Sanity к cognee обеспечивает синхронизацию знаний агента с изменениями контента, отслеживая ревизии и обновляя связанные документы.

Задача

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