Nodes/comfyui_LLM_party/KG Neo4j Toolkit Developer
ComfyUI Node

KG Neo4j Toolkit Developer

KG Neo4j Toolkit Developer — comfyui_LLM_party

By heshengtao·Created 2 years ago·Updated 11 days ago· 2,328
KG Neo4j Toolkit Developer
    • tools
    database_urlbolt://localhost:7687
    database_nameneo4j
    password12345678
    is_enabletrue

    If you've already built a real knowledge graph in Neo4j and you're tired of hand-writing Cypher every time you want an answer out of it, this is the node that hands your LLM the keys instead.

    comfyui_LLM_party's whole pitch - straight from the author's own description of the project - is "a set of block-based LLM agent node libraries": you wire up an LLM node, give it a handful of tools (web search, weather, code execution, a knowledge base), and let the model decide at runtime which ones to reach for. This node is one of those tools. Specifically, it's the pack's answer to GraphRAG - querying a structured graph instead of doing similarity search over chunked text, which is what the README means when it talks about "GraphRAG to localize the management of the industry knowledge base."

    The node itself doesn't run any queries. It packages a live Neo4j connection - host, database, password - into a tools string, the same currency every other tool node in this pack speaks, and that string plugs into your agent or LLM node's tools input alongside whatever else you've chained in. From there it's the model's call: it decides whether the question warrants hitting the graph, generates the Cypher, and reads back what comes out. You're not writing any query logic yourself; you're just handing the agent a database it's allowed to talk to.

    What you actually set. Four fields, all required: database_url defaults to bolt://localhost:7687 - note that's Neo4j's own Bolt protocol, not HTTP, so don't try to point it at the browser/HTTP port (7474) by habit. database_name defaults to neo4j, which is worth knowing is not just a placeholder - Neo4j Community Edition only ever gives you one user database and it's always named that, so unless you're on Enterprise with multi-database enabled, leave it alone. password is exactly what it says. is_enable is a kill switch: flip it off to pull this tool out of rotation without deleting the node or rewiring your graph, handy when you're debugging whether the graph tool is the thing confusing your agent. There's no separate username field in the schema, so whatever auth your Neo4j instance expects has to fit through database_name/password alone - if you've got a non-default user set up, that's the thing to check first. The single output is tools (STRING), and it goes nowhere except into the tools input on a downstream LLM/agent node.

    Installing it. This ships as part of the whole comfyui_LLM_party pack, not standalone - install via ComfyUI Manager (search "comfyui_LLM_party") or cd ComfyUI/custom_nodes && git clone https://github.com/heshengtao/comfyui_LLM_party, then pip install -r requirements.txt from inside the project folder using your ComfyUI Python environment, and restart. The requirements file pulls in the Neo4j Python driver among a lot of other things - this pack bundles dependencies for basically every LLM backend, memory store, and search API it supports, so the install is heavier than a typical single-purpose node pack. The README itself keeps a requirements_fixed.txt around as a fallback for exactly this reason, and it's worth trying if the normal install throws version conflicts.

    Where this actually breaks. The node itself can't do much wrong - the failure is almost always the database connection. "Connection refused" means Neo4j isn't reachable at that URL: it's either not running, running on a different port, or (if you're on a hosted executor rather than your own machine) localhost in the default value doesn't point at anything, since there's no Neo4j server sitting inside a ComfyUI execution container. You need a real, network-reachable Neo4j instance - local, self-hosted, or Neo4j Aura - before this node does anything useful. Auth failures are just a wrong password against that instance. And if the whole pack fails to import after install rather than just this node misbehaving, that's usually a dependency clash from the size of requirements.txt, not anything specific to the graph tool - check the ComfyUI console for the actual import error before assuming it's Neo4j-related.

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

    Inputs (4)

    NameTypeDefaultDescription
    database_urlSTRINGbolt://localhost:7687
    database_nameSTRINGneo4j
    passwordSTRING12345678
    is_enableBOOLEANtrue

    Outputs (1)

    NameTypeDescription
    toolsSTRING