Nodes/comfyui_LLM_party/KG Neo4j Toolkit User
ComfyUI Node

KG Neo4j Toolkit User

Give your LLM agent access to a graph database

By heshengtao·Created 2 years ago·Updated 11 days ago· 2,328
KG Neo4j Toolkit User
    • tools
    database_nameneo4j
    password12345678
    is_enabletrue

    Vector search finds text that sounds similar to your query. A graph database finds text that's connected to it - this person works at that company, which makes that product, which competes with this other one. That second kind of question is what GraphRAG is for, and it's explicitly one of the use cases comfyui_LLM_party's own README calls out: "industry-specific word vector RAG and GraphRAG to localize the management of the industry knowledge base." KG Neo4j Toolkit User is the node that wires an LLM agent up to Neo4j, the most widely used graph database, to make that possible.

    Like this pack's other tool nodes (Amap Reverse Geocoding, the AccuWeather tool), what this actually produces isn't something you read directly - it's a tool definition meant to be handed to the pack's LLM/agent node, which then decides when to actually query the graph based on the conversation.

    The inputs and outputs that matter

    • database_name (default neo4j) - which database on your Neo4j instance to connect to. neo4j is Neo4j's own default database name, so leave this unless you've deliberately created a differently named one.
    • password (default 12345678) - your Neo4j instance's password. This default is a placeholder, not a working credential - it happens to match Neo4j's own commonly-used local-dev default password, but you need to set this to whatever your actual instance uses.
    • is_enable - the pack's standard bypass toggle.

    Output: tools (STRING) - the serialized tool definition, wired into the agent node's tool-list input rather than displayed.

    Worth noting honestly: there's no host or connection-URI field exposed on this node - only a database name and password. That means the actual server address is either hardcoded to a local default (Neo4j's standard bolt://localhost:7687) or configured somewhere outside this specific node's visible inputs. If your Neo4j instance isn't running locally on the default port, check the pack's broader config for where that's set rather than looking for a host field here - it isn't one.

    Setting up Neo4j itself

    This node assumes you already have a running Neo4j instance - it doesn't ship one or set one up for you. The common options: a local install, Neo4j's official Docker image, or Neo4j Aura (their hosted cloud offering) if you'd rather not manage the database yourself. Populating that graph with your actual domain knowledge - building the entities and relationships a GraphRAG setup depends on - is a separate, substantial task in its own right, well beyond what this single node handles.

    How to install it

    Search comfyui_LLM_party in ComfyUI Manager and install, then restart. Manual route:

    cd ComfyUI/custom_nodes
    git clone https://github.com/heshengtao/comfyui_LLM_party.git
    

    Run pip install -r requirements.txt from inside the pack's folder using ComfyUI's own Python, then restart. That covers the Python Neo4j driver this node needs - it does not cover Neo4j itself, which is separate infrastructure you're responsible for standing up and populating.

    Common issues & troubleshooting

    Connection fails immediately. Almost always means nothing is reachable at wherever this node expects to find Neo4j - confirm your instance is actually running before troubleshooting the node's own inputs, and double check password isn't still the placeholder default if you've since changed your instance's real credentials.

    The agent never calls this tool. Same as any tool-calling setup in this pack - the LLM only reaches for a tool if the conversation or its system prompt gives it a reason to. Make sure your agent's instructions mention it has graph-query capability, or the model has no signal that this tool exists.

    Queries come back empty even though the connection works. That points at the graph's contents, not this node - if your Neo4j database doesn't actually have the entities and relationships relevant to the question being asked, there's nothing to retrieve. This node is the connection layer, not the knowledge itself.

    Category大模型派对(llm_party)/工具(tools)/知识库(Knowbase)

    Inputs (3)

    NameTypeDefaultDescription
    database_nameSTRINGneo4j
    passwordSTRING12345678
    is_enableBOOLEANtrue

    Outputs (1)

    NameTypeDescription
    toolsSTRING