Skip to main content

MnemoPay tools for CrewAI — give any agent persistent memory and a wallet

Project description

crewai-mnemopay

MnemoPay tools for CrewAI -- give any agent persistent cognitive memory and micropayment capabilities.

Built as a standalone package per crewAI custom tool publishing guide, extracted from crewAIInc/crewAI#5251.

Installation

pip install crewai-mnemopay

The MnemoPay MCP server requires Node.js:

npm install -g @mnemopay/sdk

Quick Start

from crewai import Agent
from crewai_mnemopay import mnemopay_tools

agent = Agent(
    role="Research Assistant",
    goal="Help users with research and remember preferences",
    tools=mnemopay_tools(),
)

Individual tools

from crewai import Agent
from crewai_mnemopay import (
    MnemoPayRememberTool,
    MnemoPayRecallTool,
    MnemoPayChargeTool,
)

agent = Agent(
    role="Paid Research Assistant",
    goal="Research topics, remember findings, and charge for work",
    tools=[
        MnemoPayRememberTool(),
        MnemoPayRecallTool(),
        MnemoPayChargeTool(),
    ],
)

Connect to a remote MnemoPay server

from crewai_mnemopay import mnemopay_tools

tools = mnemopay_tools(server_url="https://mnemopay-mcp.fly.dev")

Available Tools

Memory Tools

Tool Description
MnemoPayRememberTool Store a memory that persists across sessions
MnemoPayRecallTool Recall memories with optional semantic search
MnemoPayForgetTool Permanently delete a memory by ID
MnemoPayReinforceTool Boost a memory's importance score
MnemoPayConsolidateTool Prune stale memories below decay threshold

Payment Tools

Tool Description
MnemoPayChargeTool Create an escrow charge for work delivered
MnemoPaySettleTool Finalize a pending escrow transaction
MnemoPayRefundTool Refund a transaction (docks reputation)
MnemoPayBalanceTool Check wallet balance and reputation
MnemoPayProfileTool Full agent stats
MnemoPayHistoryTool Transaction history
MnemoPayLogsTool Immutable audit trail

How It Works

MnemoPay communicates with the MnemoPay MCP server via JSON-RPC. By default it spawns a local server via stdio. You can also point it at a remote server URL.

Memory works like human cognition: memories decay over time unless reinforced. This keeps the agent's context relevant without unbounded growth.

Payments use escrow: agents charge after delivering value, users settle to release funds. A reputation system tracks agent trustworthiness.

Development

git clone https://github.com/mnemopay/crewai-mnemopay.git
cd crewai-mnemopay
pip install -e ".[dev]"
pytest

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

crewai_mnemopay-0.1.0.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

crewai_mnemopay-0.1.0-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file crewai_mnemopay-0.1.0.tar.gz.

File metadata

  • Download URL: crewai_mnemopay-0.1.0.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for crewai_mnemopay-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e3d8f2bea959edfd8eeba2ce7fa3e3a3e884adb8bdde010cc95cb94aaebc6d17
MD5 84b4be5cd9e6734a3fb48799d389dcce
BLAKE2b-256 8c8eacef5618b0043e30ea01c7224897cbe4ea7dcaec5adc88c431e81057eb5b

See more details on using hashes here.

File details

Details for the file crewai_mnemopay-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for crewai_mnemopay-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bf22407d5208eb4afb54bf3753a5baff246edab85e0183f150aeff69c396215f
MD5 9139ed3b45aacc3e8a96307dec09d084
BLAKE2b-256 5df95129c4559cd603d8b9962a173bdfbf2b28f7630ec598de47326f20c0f4d6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page