Nodes/comfyui_LLM_party/KG JSON Toolkit User
ComfyUI Node

KG JSON Toolkit User

Let your LLM agent query a JSON knowledge base

By heshengtao·Created 2 years ago·Updated 7 days ago· 2,321
KG JSON Toolkit User
    • tools
    absolute_path
    relative_pathtest.json
    is_enabletrue

    This is the JSON-flavored version of the same pattern as KG_csv_toolkit_user: a lightweight, file-based knowledge source an LLM agent can query without standing up an actual database. Where the CSV toolkit suits flat, tabular reference data, JSON is the better fit when your knowledge is naturally nested - entities with several attributes each, relationships between records, anything that doesn't sit comfortably in rows and columns.

    As with every tool-output node in this pack, this one doesn't do anything on its own when the graph runs. Wire tools into the agent/LLM node, and the model decides mid-conversation whether the question in front of it warrants looking something up.

    The inputs and outputs that matter

    • relative_path - a dropdown of JSON files already sitting in the pack's own knowledge-base folder. The schema's sample choices include a named file alongside the generic test.json, suggesting the folder ships with more than just a placeholder - worth browsing what's actually in there before assuming you have to build your own from scratch.
    • absolute_path - point this at any JSON file elsewhere on disk instead of using the pack's folder.
    • is_enable - standard bypass toggle.

    Output: tools (STRING) - the serialized tool definition, meant for the agent node's tool-list input.

    "User" vs. "Developer": this pack also ships KG_json_toolkit_developer with the identical schema. Following the same naming pattern as the CSV pair, "user" reads as read/query access - the safer default to hand to an agent talking to actual users - while "developer" reads as broader authoring access. That's an inference from the pack's naming convention, not something the schema states outright, so confirm what each tool's own description says once it's loaded into your agent if the exact boundary matters.

    How to install it

    Via ComfyUI Manager: search comfyui_LLM_party, install, restart. Manually:

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

    Then pip install -r requirements.txt from inside the pack folder using ComfyUI's own Python, and restart. No external database needed - just a JSON file this node can reach.

    Common issues & troubleshooting

    The dropdown is missing your file. relative_path only lists files already inside the pack's own knowledge-base folder - move your JSON there first, or use absolute_path to point straight at it without relying on the dropdown.

    The agent never calls this tool. Same as any tool-calling setup: without a reason in the conversation or the agent's own instructions to think this knowledge source exists, the LLM has no signal to reach for it.

    Malformed JSON breaks the tool silently or loudly. If queries are failing outright, check the file itself parses as valid JSON before assuming the node's connection logic is at fault - a syntax error in the source file is a much more common cause than a bug in the toolkit.

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

    Inputs (3)

    NameTypeDefaultDescription
    absolute_pathSTRING
    relative_pathCOMBOtest.json2 options: 麦洛薇.json, test.json
    is_enableBOOLEANtrue

    Outputs (1)

    NameTypeDescription
    toolsSTRING