Docs K  Search
Docs/CrewAI

CrewAI integration

Wire memory into the workflow

  1. Create an API key in Dashboard → API Keys. Keep it on your server.
  2. Provision a collection and persist its returned ID for the authorized customer or agent group. A display name is not a collection ID.
  3. Before a crew task runs, query POST /v1/search with that collection ID and the relevant task question. Pass only supported, current evidence into the model; preserve source memory IDs and abstain when evidence is absent.
  4. After the task, submit durable facts through POST /v1/memories/process. A 202 response is an acknowledgement. Poll the returned job before a dependent task reads its output.
  5. Keep authorization for tools, purchases and destructive actions outside retrieved memory. Store decisions and report observed outcomes separately if you enable Outcome Memory.

Use the maintained client and full example

The production pattern includes a reusable Node client, collection provisioning, job polling, corrections, retrieval and chat. For Python, use the async SDK guide within your framework's async task or node boundary; do not call asyncio.run inside an existing event loop.

Verify the integration

Test a synthetic fact, wait for ingestion, retrieve it from the same scope, correct it, and verify the old value no longer supports a current answer. Repeat with a second isolated collection and an unknown question. A completed framework run alone does not prove the memory write or its evidence is correct.

Ask the docs
reading · this page

Hi! I'm the Hebbrix docs assistant. Ask me anything about this page: setup, code examples, endpoints, pricing, or integrations.