Skip to main content

Memgraph toolbox library for Memgraph AI tools and utilities

Project description

Memgraph Toolbox

The Memgraph Toolbox is a collection of tools designed to interact with a Memgraph database. These tools provide functionality for querying, analyzing, and managing data within Memgraph, making it easier to work with graph data. They are made to be easily called from other frameworks such as MCP, LangChain or LlamaIndex.

Available Tools

Below is a list of tools included in the toolbox, along with their descriptions:

  1. ShowTriggersTool - Shows trigger information from a Memgraph database.
  2. ShowStorageInfoTool - Shows storage information from a Memgraph database.
  3. ShowSchemaInfoTool - Shows schema information from a Memgraph database.
  4. PageRankTool - Calculates PageRank on a graph in Memgraph.
  5. BetweennessCentralityTool - Calculates betweenness centrality for nodes in a graph.
  6. ShowIndexInfoTool - Shows index information from a Memgraph database.
  7. CypherTool - Executes arbitrary Cypher queries on a Memgraph database.
  8. ShowConstraintInfoTool - Shows constraint information from a Memgraph database.
  9. ShowConfigTool - Shows configuration information from a Memgraph database.
  10. NodeVectorSearchTool - Searches the most similar nodes using the Memgraph's vector search.
  11. NodeNeighborhoodTool - Searches for the data attached to a given node using Memgraph's deep-path traversals.

Usage

Each tool is implemented as a Python class inheriting from BaseTool. To use a tool:

  1. Instantiate the tool with a Memgraph database connection.
  2. Call the call method with the required arguments.

Example:

from memgraph_toolbox.tools.trigger import ShowTriggersTool
from memgraph_toolbox.api.memgraph import Memgraph
from memgraph_toolbox.memgraph_toolbox import MemgraphToolbox

# Connect to Memgraph
db = Memgraph(url="bolt://localhost:7687", username="", password="")

# Show available tools
toolbox = MemgraphToolbox(db)
for tool in toolbox.get_all_tools():
    print(f"Tool Name: {tool.name}, Description: {tool.description}")

# Use the ShowTriggersTool
tool = ShowTriggersTool(db)
triggers = tool.call({})
print(triggers)

Installation

Install the base package:

pip install memgraph-toolbox

Optional dependencies

For the MCP prompt client (litellm + mcp):

pip install 'memgraph-toolbox[client]'

For evaluation metrics (deepeval, sentence-transformers, torch):

pip install 'memgraph-toolbox[evaluations]'

For running tests:

pip install 'memgraph-toolbox[test]'

For all optional dependencies (e.g., CI):

pip install 'memgraph-toolbox[client,evaluations,test]'

Requirements

Contributing

Contributions are welcome! Feel free to submit issues or pull requests to improve the toolbox.

License

This project is licensed under the MIT License. See the LICENSE file for details.

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

memgraph_toolbox-0.1.10.tar.gz (190.2 kB view details)

Uploaded Source

Built Distribution

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

memgraph_toolbox-0.1.10-py3-none-any.whl (32.0 kB view details)

Uploaded Python 3

File details

Details for the file memgraph_toolbox-0.1.10.tar.gz.

File metadata

  • Download URL: memgraph_toolbox-0.1.10.tar.gz
  • Upload date:
  • Size: 190.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for memgraph_toolbox-0.1.10.tar.gz
Algorithm Hash digest
SHA256 02a92d41e5b3c46ad86dbfef21acfcf7a5ae385e6a99718a1eb5803414cef177
MD5 bfc6d847647440cd7bce299cfa55422a
BLAKE2b-256 fc26220e0e29a2b54b1a1293265f34122f26cfd72e742049416ec0f1f1b8e56b

See more details on using hashes here.

File details

Details for the file memgraph_toolbox-0.1.10-py3-none-any.whl.

File metadata

  • Download URL: memgraph_toolbox-0.1.10-py3-none-any.whl
  • Upload date:
  • Size: 32.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for memgraph_toolbox-0.1.10-py3-none-any.whl
Algorithm Hash digest
SHA256 76c1c902853a1dcc7c64bfbc58c2eae55898bbc0ef168508348e1d1b500e7b25
MD5 63b744ccf9806bad81eaa55e32be21eb
BLAKE2b-256 6ce40f0b9aec35948afba78672bb6064f5e0d52b17c6ba09b98b1e2be7895a0a

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