{
  "schemaVersion": "1.0",
  "title": "CrewAI knowledge and memory capabilities",
  "description": "Use knowledgequery to retrieve bounded results from a configured crew knowledge store without running its task graph. Use memoryreset to clear one explicit CrewAI memory domain or all available domains.",
  "canonical": "https://getaip.org/docs/connectors/crewai/capabilities/knowledge-and-memory",
  "route": "/docs/connectors/crewai/capabilities/knowledge-and-memory",
  "source": "docs/connectors/crewai/capabilities/knowledge-and-memory.md",
  "protocol": "Agent Interoperability Protocol",
  "protocolVersion": "1.0",
  "section": "Connectors",
  "documentType": "Connector",
  "language": "en",
  "downloads": {
    "md": "/docs/download/connectors/crewai/capabilities/knowledge-and-memory.md",
    "txt": "/docs/download/connectors/crewai/capabilities/knowledge-and-memory.txt",
    "json": "/docs/download/connectors/crewai/capabilities/knowledge-and-memory.json",
    "pdf": "/docs/download/connectors/crewai/capabilities/knowledge-and-memory.pdf"
  },
  "content": {
    "format": "text/markdown",
    "markdown": "---\ntitle: CrewAI knowledge and memory capabilities\ndescription: >-\n  Query crew knowledge with bounded retrieval controls and reset an explicit\n  memory domain with high-risk approval\nkind: capability-reference\naudience: application-developer\nappliesTo: \"1.x\"\nwritingStandard: \"aip-docs/1.0\"\nlastReviewedRevision: \"97be86e9efedf07ecf1783b03800f683f107fb04\"\nconnector: crewai\ncapabilityIds:\n  - cap:crewai:<crew_id>:knowledge_query\n  - cap:crewai:<crew_id>:memory_reset\n---\n\n# CrewAI knowledge and memory capabilities\n\nUse `knowledge_query` to retrieve bounded results from a configured crew\nknowledge store without running its task graph. Use `memory_reset` to clear one\nexplicit CrewAI memory domain or all available domains.\n\nThe two operations have opposite safety profiles. Query is a retry-safe read;\nreset is a high-risk mutation without rollback.\n\n## Compare knowledge query and memory reset\n\n| Property | `knowledge_query` | `memory_reset` |\n|---|---|---|\n| Capability | `cap:crewai:<crew_id>:knowledge_query` | `cap:crewai:<crew_id>:memory_reset` |\n| Kind | Tool | Tool |\n| Risk | Low | High |\n| Provider mutation | No | Yes |\n| Approval | No | Required |\n| Idempotency key | Required | Required |\n| Streaming | No | No |\n| Cooperative cancellation | No | No |\n| Connector retry | Yes | No |\n| Compensation | None | Rollback not supported |\n\nBoth operations use a durable sidecar job. This is why the read still requires\nan idempotency key.\n\nThe retry row reflects published implementation support. The reviewed concrete\nfailure mapper still reports every connector failure as non-retryable.\n\n## Query crew knowledge\n\nThe input requires one through 100 query strings:\n\n```json\n{\n  \"query\": [\n    \"refund policy for annual subscriptions\",\n    \"approved exception process\"\n  ],\n  \"results_limit\": 5,\n  \"score_threshold\": 0.4\n}\n```\n\n| Field | Required | Constraint | Default |\n|---|---:|---|---|\n| `query` | Yes | Array of 1 through 100 non-empty strings | None |\n| Query item | Yes | At most 4,096 UTF-8 bytes and no control characters | None |\n| `results_limit` | No | Integer from 1 through 100; booleans rejected | `3` |\n| `score_threshold` | No | Number from `0` through `1`; booleans rejected | `0.35` |\n\nUnknown fields are rejected. The complete encoded input may not exceed 1 MiB.\n\nThe operation catalogue records source revision `bfa652a7` as the method-\nverification baseline. The default product image installs CrewAI `1.15.5`.\n\nThe sidecar prefers:\n\n```text\ncrew.aquery_knowledge(query, results_limit=..., score_threshold=...)\n```\n\nIt falls back to `crew.query_knowledge(...)` in a worker thread when the async\nmethod is absent. CrewAI queries only the crew-level knowledge object; it\nreturns `None` when that object is not configured.\n\nThe sidecar serializes returned search results and normalizes `None` to an\nempty array:\n\n```json\n{\n  \"results\": []\n}\n```\n\nAn empty array can mean no configured crew knowledge, no match above the\nthreshold, or no provider result. The connector does not add a reason field.\n\n## Interpret knowledge results safely\n\nResult structure is owned by the pinned CrewAI knowledge implementation and\nits configured storage backend. The connector converts model objects,\nmappings, sequences, primitives, and unsupported values into bounded JSON.\n\nDo not compare scores across different embedding models, indexes, backends, or\ncrew revisions as though they share one calibration. Record those identities\nwith any evaluation evidence.\n\nThe read can expose confidential or personal data. Apply tenant routing,\nprovider access control, query authorization, output filtering, and redaction\nbefore returning content to an application.\n\nThe connector does not accept a knowledge store, namespace, embedding model,\nor provider credential in Action input. Those values belong to the admitted\ncrew factory and deployment.\n\n## Preserve the durable query identity\n\n`knowledge_query` is read-only at the CrewAI boundary, but the sidecar creates\na journaled job before calling the provider. Use one stable Action ID and key\nfor a logical query.\n\nThe persisted request hash includes crew, Action, operation, complete input,\ntimeout, and key. An exact repeat returns the existing record; changed material\nunder the same Action ID returns a conflict.\n\nAn ordinary provider failure event contains an exception class and generic\nmessage, but no `uncertain_outcome` field. The read-only contract informs\noperator classification; the missing field is not a false value.\n\nIf local cancellation wins while the blocking request is pending, the AIP\nresult is cancelled. The provider operation is read-only, but its completion\nis unobserved and the connector does not claim a remote stop.\n\nAt this revision, that result also says `dispatched: false`. The select branch\ndoes not prove whether the HTTP request already reached the sidecar, so do not\nuse that field as transport evidence.\n\n## Reset an explicit memory domain\n\nThe input contains exactly one field:\n\n```json\n{\n  \"command_type\": \"kickoff_outputs\"\n}\n```\n\nAccepted values are:\n\n| Value | Pinned CrewAI target |\n|---|---|\n| `memory` | Crew memory object |\n| `knowledge` | Crew knowledge and every configured agent knowledge store |\n| `agent_knowledge` | Configured agent knowledge stores only |\n| `kickoff_outputs` | Task-output handler storage |\n| `all` | Every available target above, in CrewAI's iteration order |\n\nThe sidecar calls `crew.reset_memories(command_type)` in a worker thread. A\nspecific target that is not initialized causes the pinned CrewAI method to\nfail.\n\nAn `all` reset skips unavailable systems and resets available systems one by\none. Failure after an earlier reset can therefore leave a partial result.\n\nThe completed result contains only:\n\n```json\n{\n  \"status\": \"completed\",\n  \"command_type\": \"kickoff_outputs\"\n}\n```\n\nIt does not enumerate deleted records, prove secure erasure, or provide a\nrestoration point.\n\n## Review a reset before approval\n\nMemory reset requires tenant-policy approval, a stable idempotency key, and the\ncomplete input snapshot. Review:\n\n1. admitted crew, tenant, instance, sidecar state, and provider identities;\n2. the exact domain selected by `command_type`;\n3. data retention, legal hold, audit, and incident requirements;\n4. downstream behavior that depends on knowledge or memory continuity;\n5. a deployment-owned backup or export when restoration is required;\n6. possible partial completion across the selected targets;\n7. a verification method that does not repopulate or mutate unrelated data.\n\nChoose a specific domain instead of `all` when the narrower operation satisfies\nthe task. Approval for a query does not authorize a reset.\n\n## Understand the irreversible boundary\n\nThe connector publishes no transaction, reconciliation, compensation, or\nprovider rollback for memory reset. An idempotency fence prevents a different\nrequest from reusing the same Action ID, but it does not restore deleted state.\n\nThe operation is not cooperatively cancellable. Cancelling its waiter or\nreaching the timeout can leave the worker thread and storage effects continuing.\n\nLocal cancellation can return `dispatched: false` without proving that the\nsidecar did not admit the job. Continue status and provider reconciliation\nunder the original Action ID.\n\nAn ordinary provider failure records `failed` without an uncertainty field.\nTreat reset effects as uncertain because this is a worker-thread mutation, not\nbecause the event says so.\n\nA sidecar restart converts a restored running reset into `failed` with\n`uncertain_outcome: true` rather than repeating it.\n\n## Recover after an uncertain reset\n\n1. preserve the Action ID, key, crew, command type, approval, and input hash;\n2. read durable status and events without starting a replacement reset;\n3. inspect each selected CrewAI storage target through an approved read path;\n4. classify targets as unchanged, reset, repopulated, unavailable, or unknown;\n5. restore from an authorized backup only under deployment policy;\n6. create a new mutation only after the partial-effect boundary is known.\n\nDo not use `knowledge_query` alone to prove the state of agent knowledge,\ngeneral memory, or kickoff-output storage. It reads the crew knowledge query\nsurface only.\n\n## Diagnose capability failures\n\n| Symptom | Decision |\n|---|---|\n| Capability is absent | Review descriptor and sidecar allowlists before enabling it |\n| Query item is rejected | Remove control characters and stay within the item and array bounds |\n| Result limit or threshold is rejected | Use an integer limit and numeric threshold inside the exact ranges |\n| Query returns no results | Distinguish no knowledge object, no match, and provider behavior outside the connector |\n| Query exposes unexpected data | Disable the route and reconcile tenant, crew, store, and credential boundaries |\n| Reset target is not initialized | Verify the admitted crew configuration; do not broaden automatically to `all` |\n| Reset fails after starting | Treat every selected domain as potentially changed |\n| Reset waiter is cancelled | Ignore `dispatched:false` as proof and observe durable and provider state |\n| Repeat conflicts | Preserve the Action ID and restore the exact original input and key |\n| Output exceeds 4 MiB | Narrow the query or result limit; do not increase unrelated transport bounds |\n\n## Related documentation\n\n- [CrewAI capability index](README.md)\n- [CrewAI connector overview](../README.md)\n- [Authentication and admitted crews](../getting-started/authentication-and-admitted-crews.md)\n- [Approvals and policy](../../../concepts/approvals-and-policy.md)\n- [Errors and retry decisions](../../../reference/errors.md)\n",
    "text": "CrewAI knowledge and memory capabilities\n\nUse knowledgequery to retrieve bounded results from a configured crew\nknowledge store without running its task graph. Use memoryreset to clear one\nexplicit CrewAI memory domain or all available domains.\n\nThe two operations have opposite safety profiles. Query is a retry-safe read;\nreset is a high-risk mutation without rollback.\n\nCompare knowledge query and memory reset\n\n| Property | knowledgequery | memoryreset |\n\n| Capability | cap:crewai::knowledgequery | cap:crewai::memoryreset |\n| Kind | Tool | Tool |\n| Risk | Low | High |\n| Provider mutation | No | Yes |\n| Approval | No | Required |\n| Idempotency key | Required | Required |\n| Streaming | No | No |\n| Cooperative cancellation | No | No |\n| Connector retry | Yes | No |\n| Compensation | None | Rollback not supported |\n\nBoth operations use a durable sidecar job. This is why the read still requires\nan idempotency key.\n\nThe retry row reflects published implementation support. The reviewed concrete\nfailure mapper still reports every connector failure as non-retryable.\n\nQuery crew knowledge\n\nThe input requires one through 100 query strings:\n\n{\n  \"query\": [\n    \"refund policy for annual subscriptions\",\n    \"approved exception process\"\n  ],\n  \"resultslimit\": 5,\n  \"scorethreshold\": 0.4\n}\n\n| Field | Required | Constraint | Default |\n\n| query | Yes | Array of 1 through 100 non-empty strings | None |\n| Query item | Yes | At most 4,096 UTF-8 bytes and no control characters | None |\n| resultslimit | No | Integer from 1 through 100; booleans rejected | 3 |\n| scorethreshold | No | Number from 0 through 1; booleans rejected | 0.35 |\n\nUnknown fields are rejected. The complete encoded input may not exceed 1 MiB.\n\nThe operation catalogue records source revision bfa652a7 as the method-\nverification baseline. The default product image installs CrewAI 1.15.5.\n\nThe sidecar prefers:\n\ncrew.aqueryknowledge(query, resultslimit=..., scorethreshold=...)\n\nIt falls back to crew.queryknowledge(...) in a worker thread when the async\nmethod is absent. CrewAI queries only the crew-level knowledge object; it\nreturns None when that object is not configured.\n\nThe sidecar serializes returned search results and normalizes None to an\nempty array:\n\n{\n  \"results\": []\n}\n\nAn empty array can mean no configured crew knowledge, no match above the\nthreshold, or no provider result. The connector does not add a reason field.\n\nInterpret knowledge results safely\n\nResult structure is owned by the pinned CrewAI knowledge implementation and\nits configured storage backend. The connector converts model objects,\nmappings, sequences, primitives, and unsupported values into bounded JSON.\n\nDo not compare scores across different embedding models, indexes, backends, or\ncrew revisions as though they share one calibration. Record those identities\nwith any evaluation evidence.\n\nThe read can expose confidential or personal data. Apply tenant routing,\nprovider access control, query authorization, output filtering, and redaction\nbefore returning content to an application.\n\nThe connector does not accept a knowledge store, namespace, embedding model,\nor provider credential in Action input. Those values belong to the admitted\ncrew factory and deployment.\n\nPreserve the durable query identity\n\nknowledgequery is read-only at the CrewAI boundary, but the sidecar creates\na journaled job before calling the provider. Use one stable Action ID and key\nfor a logical query.\n\nThe persisted request hash includes crew, Action, operation, complete input,\ntimeout, and key. An exact repeat returns the existing record; changed material\nunder the same Action ID returns a conflict.\n\nAn ordinary provider failure event contains an exception class and generic\nmessage, but no uncertainoutcome field. The read-only contract informs\noperator classification; the missing field is not a false value.\n\nIf local cancellation wins while the blocking request is pending, the AIP\nresult is cancelled. The provider operation is read-only, but its completion\nis unobserved and the connector does not claim a remote stop.\n\nAt this revision, that result also says dispatched: false. The select branch\ndoes not prove whether the HTTP request already reached the sidecar, so do not\nuse that field as transport evidence.\n\nReset an explicit memory domain\n\nThe input contains exactly one field:\n\n{\n  \"commandtype\": \"kickoffoutputs\"\n}\n\nAccepted values are:\n\n| Value | Pinned CrewAI target |\n\n| memory | Crew memory object |\n| knowledge | Crew knowledge and every configured agent knowledge store |\n| agentknowledge | Configured agent knowledge stores only |\n| kickoffoutputs | Task-output handler storage |\n| all | Every available target above, in CrewAI's iteration order |\n\nThe sidecar calls crew.resetmemories(commandtype) in a worker thread. A\nspecific target that is not initialized causes the pinned CrewAI method to\nfail.\n\nAn all reset skips unavailable systems and resets available systems one by\none. Failure after an earlier reset can therefore leave a partial result.\n\nThe completed result contains only:\n\n{\n  \"status\": \"completed\",\n  \"commandtype\": \"kickoffoutputs\"\n}\n\nIt does not enumerate deleted records, prove secure erasure, or provide a\nrestoration point.\n\nReview a reset before approval\n\nMemory reset requires tenant-policy approval, a stable idempotency key, and the\ncomplete input snapshot. Review:\n1. admitted crew, tenant, instance, sidecar state, and provider identities;\n2. the exact domain selected by commandtype;\n3. data retention, legal hold, audit, and incident requirements;\n4. downstream behavior that depends on knowledge or memory continuity;\n5. a deployment-owned backup or export when restoration is required;\n6. possible partial completion across the selected targets;\n7. a verification method that does not repopulate or mutate unrelated data.\n\nChoose a specific domain instead of all when the narrower operation satisfies\nthe task. Approval for a query does not authorize a reset.\n\nUnderstand the irreversible boundary\n\nThe connector publishes no transaction, reconciliation, compensation, or\nprovider rollback for memory reset. An idempotency fence prevents a different\nrequest from reusing the same Action ID, but it does not restore deleted state.\n\nThe operation is not cooperatively cancellable. Cancelling its waiter or\nreaching the timeout can leave the worker thread and storage effects continuing.\n\nLocal cancellation can return dispatched: false without proving that the\nsidecar did not admit the job. Continue status and provider reconciliation\nunder the original Action ID.\n\nAn ordinary provider failure records failed without an uncertainty field.\nTreat reset effects as uncertain because this is a worker-thread mutation, not\nbecause the event says so.\n\nA sidecar restart converts a restored running reset into failed with\nuncertainoutcome: true rather than repeating it.\n\nRecover after an uncertain reset\n1. preserve the Action ID, key, crew, command type, approval, and input hash;\n2. read durable status and events without starting a replacement reset;\n3. inspect each selected CrewAI storage target through an approved read path;\n4. classify targets as unchanged, reset, repopulated, unavailable, or unknown;\n5. restore from an authorized backup only under deployment policy;\n6. create a new mutation only after the partial-effect boundary is known.\n\nDo not use knowledgequery alone to prove the state of agent knowledge,\ngeneral memory, or kickoff-output storage. It reads the crew knowledge query\nsurface only.\n\nDiagnose capability failures\n\n| Symptom | Decision |\n\n| Capability is absent | Review descriptor and sidecar allowlists before enabling it |\n| Query item is rejected | Remove control characters and stay within the item and array bounds |\n| Result limit or threshold is rejected | Use an integer limit and numeric threshold inside the exact ranges |\n| Query returns no results | Distinguish no knowledge object, no match, and provider behavior outside the connector |\n| Query exposes unexpected data | Disable the route and reconcile tenant, crew, store, and credential boundaries |\n| Reset target is not initialized | Verify the admitted crew configuration; do not broaden automatically to all |\n| Reset fails after starting | Treat every selected domain as potentially changed |\n| Reset waiter is cancelled | Ignore dispatched:false as proof and observe durable and provider state |\n| Repeat conflicts | Preserve the Action ID and restore the exact original input and key |\n| Output exceeds 4 MiB | Narrow the query or result limit; do not increase unrelated transport bounds |\n\nRelated documentation\n• CrewAI capability index (README.md)\n• CrewAI connector overview (../README.md)\n• Authentication and admitted crews (../getting-started/authentication-and-admitted-crews.md)\n• Approvals and policy (../../../concepts/approvals-and-policy.md)\n• Errors and retry decisions (../../../reference/errors.md)\n"
  },
  "integrity": {
    "algorithm": "sha256",
    "sourceDigest": "3547f1585295e984f5f1b42021e57cc6da9d90d891f46b775c3965219ad614d6"
  }
}
