What CrewAI already keeps
CrewAI offers built-in memory options for a crew’s runs. Use them for within-crew coordination; they are not designed as a per-customer system of record with access scopes and dated evidence.
Where Auld fits
Give the agents that need history a recall tool, and let a designated agent (or your code after the crew finishes) ingest outcomes. Route on what recall returns: if there is no memory, a researcher agent can gather it first.
| Concern | CrewAI | Auld |
|---|---|---|
| Current conversation | Yes | Not needed |
| Facts across sessions and channels | Your code | Yes |
| Which fact is current after a change | Your code | Yes, with history |
| What was true on a date | Your code | Yes (asOf) |
| Who may see a memory | Your code | Identities and audiences |
| Source for each statement | Your code | Returned with every memory |
Implementation sequence
Create one tool per endpoint
Use the
@tooldecorator fromcrewai.tools.Scope by customer
Build tools per run with the customer id from the job, not from task text.
Assign tools by role
An account researcher needs recall; a writer may not.
Ingest results
After
kickoff(), send the final output as a record with the run time.
Example
import os, requests
AULD = os.environ["AULD_API_BASE"] # e.g. https://YOUR-AULD-HOST
HEADERS = {"Authorization": f"Bearer {os.environ['AULD_API_KEY']}"}
def auld_post(path: str, body: dict) -> dict:
r = requests.post(f"{AULD}/v1/{path}", json=body, headers=HEADERS, timeout=30)
r.raise_for_status()
return r.json()
def remember(text: str, user_id: str, source_id: str, occurred_at: str) -> str:
"""Store a dated record for one user. Returns the job id."""
return auld_post("records", {"sourceId": source_id, "text": text,
"occurredAt": occurred_at, "author": user_id,
"visibility": f"user:{user_id}"})["jobId"]
def recall(query: str, user_id: str, max_tokens: int = 2000) -> str:
"""Current memories with sources, formatted for a prompt."""
res = auld_post("recall", {"query": query, "viewer": user_id, "maxTokens": max_tokens})
return "\n".join(f"- {m['text']} ({m['sources'][0]['title']}, {m['sources'][0]['occurredAt'][:10]})"
for m in res["memories"]) or "No relevant memory."from crewai import Agent, Task, Crew
from crewai.tools import tool
from memory_client import recall, remember
def tools_for(customer_id: str):
@tool("Recall customer memory")
def recall_customer(question: str) -> str:
"""Return current facts and history about this customer, with sources."""
return recall(question, customer_id)
return [recall_customer]
researcher = Agent(role="Account researcher", goal="Summarise the account's current state",
backstory="You check memory before drawing conclusions.",
tools=tools_for(job.customer_id))
task = Task(description="Prepare a renewal brief.", expected_output="A one-page brief", agent=researcher)
result = Crew(agents=[researcher], tasks=[task]).kickoff()
remember(str(result), job.customer_id, f"brief-{job.id}", job.started_at)Illustrative example · standard HTTP · check the framework’s current docs for exact signatures
Or connect the MCP server
If your CrewAI setup can use MCP tools, point it at the Auld MCP endpoint instead of writing wrappers. The model gets remember, recall, forget and memory_status. Use wrappers when you need to inject the user id yourself or post-process results; use MCP for speed of setup.
Custom integration recipe using standard HTTP/MCP tools
- This recipe wires CrewAI’s own tool interface to the Auld REST API or MCP server; there is nothing Auld-specific to install.
- Bind the viewer id from your authentication layer, not from model output.
- Ingestion is asynchronous — poll the job before depending on a just-sent fact in tests.
- Recall returns up to your plan’s token limit (8,000 on Pay as you go and Flex).
Frequently asked questions
Do all agents in a crew share memory?
They share whatever the tool’s viewer can see. If agents represent different customers or permission levels, build their tools with different viewer ids.
Can I keep CrewAI memory enabled?
Yes. Treat it as working memory for the run and Auld as the durable record.