crewai

crewai is an agent for Claude Code from doobidoo/mcp-memory-service. It costs 0 tokens per session (1,517 once invoked), scanned A, original, Apache-2.0.

An integration guide for using CrewAI agents with mcp-memory-service as shared long-term memory. CrewAI is a Python framework for building teams of cooperating AI agents.

In plain words
What is it for?
Use it to add memory search and storage tools to CrewAI agents, including optional tags and result limits.
Why use it?
It shows how agents can retain and search shared context instead of losing relevant information between runs or between agents.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md).

About the project

mcp-memory-service is a self-hosted memory backend that lets AI agents store and retrieve shared project context through REST, MCP, OAuth, a command-line interface, and a dashboard. It is intended for agent pipelines and clients such as LangGraph, CrewAI, AutoGen, Claude Desktop, and OpenCode, with support for knowledge graphs and memory consolidation. The catalogue includes skills, agents, commands, instructions, hooks, a setting, an MCP entry, and a plugin for its workflows.

doobidoo/mcp-memory-service · 1,923 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/doobidoo/mcp-memory-service/crewai
Clone the repo
git clone --depth 1 https://github.com/doobidoo/mcp-memory-service

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for crewai

README.md
[![agentmods](https://agentmods.dev/badge/agents/doobidoo/mcp-memory-service/crewai.svg)](https://agentmods.dev/agents/doobidoo/mcp-memory-service/crewai)
Your own site
<a href="https://agentmods.dev/agents/doobidoo/mcp-memory-service/crewai"><img src="https://agentmods.dev/badge/agents/doobidoo/mcp-memory-service/crewai.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,517 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.01517
Opus 5 $0.00000 $0.00758
Sonnet 5 $0.00000 $0.00303
Haiku 4.5 $0.00000 $0.00152

Measured 6d ago against content hash beecae3ccf29, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

crewai scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/agents/crewai.md · 204 lines

How it starts

The opening of the file, as written. The whole thing — 204 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CrewAI Integration Guide

Use mcp-memory-service as the persistent shared memory backend for CrewAI agents and crews.

Setup

pip install mcp-memory-service crewai httpx
MCP_ALLOW_ANONYMOUS_ACCESS=true memory server --http

Custom Memory Tools

Implement BaseTool subclasses to expose memory as CrewAI tools:

import httpx
from crewai.tools import BaseTool
from pydantic import BaseModel, Field

MEMORY_URL = "http://localhost:8000"


class SearchMemoryInput(BaseModel):
    query: str = Field(description="Natural language search query")
    tags: list[str] = Field(default=[], description="Optional tag filters (e.g. ['agent:researcher'])")
    limit: int = Field(default=5, description="Maximum number of results")


class MemorySearchTool(BaseTool):
    name: str = "Search Memory"
    description: str = (
        "Search long-term shared memory for relevant context. "
        "Use tags like 'agent:researcher' to scope results to a specific agent."
    )
    args_schema: type[BaseModel] = SearchMemoryInput

    def _run(self, query: str, tags: list[str] = None, limit: int = 5) -> str:
        import asyncio
        return asyncio.run(self._arun(query, tags or [], limit))

    async def _arun(self, query: str, tags: list[str] = None, limit: int = 5) -> str:
        payload = {"query": query, "limit": limit}
        if tags:
            payload["tags"] = tags

        async with httpx.AsyncClient() as client:
            response = await client.post(
                f"{MEMORY_URL}/api/memories/search",
                json=payload,
            )
            memories = response.json().get("memories", [])

        if not memories:
            return "No relevant memories found."
        return "\n".join(f"[{', '.join(m['tags'])}] {m['content']}" for m in memories)


class StoreMemoryInput(BaseModel):
    content: str = Field(description="Memory content to store")
    tags: list[str] = Field(default=[], description="Tags to categorize the memory")
    memory_type: str = Field(default="note", description="Memory type: note, observation, decision, fact")


class MemoryStoreTool(BaseTool):
    name: str = "Store Memory"
    description: str = (
        "Store an important finding, decision, or fact in long-term shared memory. "
        "Other agents in the crew can retrieve it later."
    )
    args_schema: type[BaseModel] = StoreMemoryInput
    agent_id: str = ""  # Set when creating tool instance

    def _run(self, content: str, tags: list[str] = None, memory_type: str = "note") -> str:
        import asyncio
        return asyncio.run(self._arun(content, tags or [], memory_type))

    async def _arun(self, content: str, tags: list[str] = None, memory_type: str = "note") -> str:
        headers = {"Content-Type": "application/json"}
        if self.agent_id:
            headers["X-Agent-ID"] = self.agent_id

        async with httpx.AsyncClient() as client:
            response = await client.post(
                f"{MEMORY_URL}/api/memories",
                json={"content": content, "tags": tags or [], "memory_type": memory_type},
                headers=headers,
            )
            result = response.json()

        if result.get("success"):
            return f"Stored memory (hash: {result['content_hash']})"
        return f"Failed to store memory: {result.get('message', 'unknown error')}"

Read the full file on GitHub · 204 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 204 lines · 0 tokens per session scan A beecae3ccf29

Subscribe to this mod's changes

crewai is an agent published in the GitHub repository doobidoo/mcp-memory-service (1,923 stars, last pushed 3d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 1,517 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories

recall

Use to get grounded in a task, bug, feature, or decision from a PREVIOUS Claude Code, Codex, or Cursor session. Dispatch with the topic; it searches the unified history deeply (semantic + keyword + drill-down), reads the raw turns itself, and returns ONLY a tight brief — keeping the main thread's context clean. Prefer…

AbsoluteMode/session-recall · 88 tokens

context-manager

Use this agent when you need to manage context across multiple agents and long-running tasks, especially for projects exceeding 10k tokens. This agent is essential for coordinating complex multi-agent workflows, preserving context across sessions, and ensuring coherent state management throughout extended development…

czlonkowski/n8n-mcp · 0 tokens

context

You are the Context agent. Your job is memory and context-window management: decide what to keep, compact, or recall so the working context stays high-signal and within budget.

WrongStack/WrongStack · 0 tokens

starlight-repos-extractor

Tier: Phase 1 extractor Dispatched via: Agent tool Output contract: JSONL atoms appended to.

frankxai/Starlight-Intelligence-System · 7 tokens

portable-memory-parent-orchestrator

Top orchestrator for the portable-process-memory feature. Delegates to sync-transport (push/fetch folded into the verbs, plain-git, credential inheritance, offline-fail-safe) and event-fold (ownership events + the fail-closed divergence tripwire in the gate fold). Architect-only; coordinates portability/transport work…

seanrreid/RAD_framework · 77 tokens

context-finder

Read-only, memory- and index-aware codebase search. Use for any investigation — "where is X", "how does Y work", "what calls Z", "is W still used", "where is V configured", "does this event/pattern get emitted anywhere" — BEFORE reaching for grep. Consults the knowledge graph, code index, and prior session memory…

futuregerald/futuregerald-claude-plugin · 111 tokens