Skip to content

Feature Request: Add node update functionality to gm_record tool #57

@jonah791

Description

@jonah791

Problem

Currently, the gm_record tool only supports adding new nodes to the knowledge graph. There is no way to update existing nodes when:

  1. Knowledge content needs refinement based on new insights
  2. Descriptions need to be more accurate after practical usage
  3. Node metadata (e.g., updated timestamp) should reflect latest changes
  4. Related skills need to be re-linked after skill restructuring

Current Parameters

name: string          # Node name
type: TASK|SKILL|EVENT
description: string   # One-line summary
content: string       # Full knowledge content
relatedSkill: string  # Optional, link to existing skill

Missing: No id, update, patch, or version parameters.

Proposed Solution

Add an update mode to gm_record with the following options:

Option A: Add update boolean parameter

gm_record({
  name: "existing-node-name",
  type: "SKILL",
  description: "Updated one-line summary",
  content: "Refined knowledge content",
  update: true  // If true, update existing node; if false/absent, create new
})

Option B: Add nodeId parameter for targeted updates

gm_record({
  nodeId: "uuid-or-unique-id",  // Target specific node
  description: "New description",
  content: "Updated content",
  // type and name optional for updates
})

Option C: Add patch parameter for partial updates

gm_record({
  name: "existing-node-name",
  patch: {
    description: "Only update description",
    // other fields optional
  }
})

Benefits

  1. Knowledge refinement loop: Enable the self-improving agent pattern (diagnosis → improvement → record → refine)
  2. Avoid duplicate nodes: Prevent creating multiple nodes with same name when knowledge evolves
  3. Track evolution history: Keep updated timestamps for metacognitive analysis
  4. Better skill linking: Support dynamic restructuring of skill relationships

Use Case Example

Alice (OpenClaw-Graph agent) runs a self-evolution task:

  1. Diagnose: Finds a skill node with outdated description
  2. Improve: Refines the skill based on new failures/lessons
  3. Record: Wants to update the existing node, not create duplicate
  4. Verify: Checks the node reflects latest knowledge

Currently, step 3 is blocked — Alice must either:

  • Create duplicate node (pollutes graph)
  • Skip recording (knowledge not refined)
  • Directly modify Neo4j (requires external access, breaks tool abstraction)

Related Context

This feature request originates from OpenClaw-Graph's self-improving agent workflow. See:


Thanks for considering this enhancement! 🙏

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions