The AI-Guided Workflow system allows Claude Desktop to walk human users through the complete process of building knowledge graphs in Redstring. This replicates the manual workflow that a human would perform, but with AI guidance and automation.
The AI-guided workflow can perform the equivalent of a human user:
- Adding a new node to a network - Creating a new node prototype
- Clicking the pie menu up arrow - Creating a graph definition for a node prototype
- Opening that definition as the active graph - Making the new definition the active workspace
- Adding nodes and connections - Building out the structure with instances and relationships
Creates a new node prototype and its corresponding graph definition.
Parameters:
prototypeName(required): Name for the new prototypeprototypeDescription(optional): Description for the prototypeprototypeColor(optional): Color hex code (default: #4A90E2)enableUserGuidance(optional): Show step-by-step guidance (default: true)
Example:
{
"workflowType": "create_prototype_and_definition",
"prototypeName": "AI Workflow Test",
"prototypeDescription": "Testing the AI-guided workflow system",
"prototypeColor": "#FF6B6B",
"enableUserGuidance": true
}Adds instances of existing prototypes to a specified graph.
Parameters:
targetGraphId(optional): Specific graph to add to (default: active graph)instancePositions(required): Array of instances with positionsenableUserGuidance(optional): Show step-by-step guidance (default: true)
Example:
{
"workflowType": "add_instance_to_graph",
"targetGraphId": "5ba5b655-2d63-4d21-97a7-55edc17808a0",
"instancePositions": [
{ "prototypeName": "New Character", "x": 150, "y": 150 },
{ "prototypeName": "New Location", "x": 350, "y": 250 }
],
"enableUserGuidance": true
}Creates connections between nodes in a graph.
Parameters:
targetGraphId(optional): Specific graph to work in (default: active graph)connections(required): Array of connections to createenableUserGuidance(optional): Show step-by-step guidance (default: true)
Example:
{
"workflowType": "create_connections",
"targetGraphId": "graph-1234567890-abcdef",
"connections": [
{ "sourceName": "Component A", "targetName": "Component B", "edgeType": "depends_on" },
{ "sourceName": "Component B", "targetName": "Component C", "edgeType": "provides_to" }
],
"enableUserGuidance": true
}Performs the complete workflow: create prototype, definition, add instances, and plan connections.
Parameters:
prototypeName(required): Name for the new prototypeprototypeDescription(optional): Description for the prototypeprototypeColor(optional): Color hex code (default: #4A90E2)instancePositions(optional): Array of instances to createconnections(optional): Array of connections to planenableUserGuidance(optional): Show step-by-step guidance (default: true)
Example:
{
"workflowType": "full_workflow",
"prototypeName": "Complete System",
"prototypeDescription": "A complete system with multiple components",
"prototypeColor": "#4ECDC4",
"instancePositions": [
{ "prototypeName": "Component A", "x": 100, "y": 100 },
{ "prototypeName": "Component B", "x": 300, "y": 100 },
{ "prototypeName": "Component C", "x": 200, "y": 300 }
],
"connections": [
{ "sourceName": "Component A", "targetName": "Component B", "edgeType": "depends_on" },
{ "sourceName": "Component B", "targetName": "Component C", "edgeType": "provides_to" }
],
"enableUserGuidance": true
}- Connect Claude Desktop to the Redstring MCP server
- Use the
ai_guided_workflowtool with your desired parameters - Follow the guidance as Claude walks you through each step
Make a POST request to the bridge endpoint:
curl -X POST http://localhost:3001/api/bridge/actions/ai-guided-workflow \
-H "Content-Type: application/json" \
-d '{
"workflowType": "full_workflow",
"prototypeName": "My System",
"prototypeDescription": "A system I want to model",
"instancePositions": [
{"prototypeName": "Part A", "x": 100, "y": 100},
{"prototypeName": "Part B", "x": 300, "y": 100}
]
}'Run the included test script:
node test-ai-workflow.js-
Create Prototype
- Creates a new node prototype in the global prototype pool
- Prototype becomes available for creating instances in any graph
- Prototype persists to the .redstring file
-
Create Definition
- Creates a new graph that serves as the definition for the prototype
- This is equivalent to clicking the "up arrow" in the pie menu
- The new graph is linked to the prototype via
definitionGraphIds
-
Open Definition
- Opens the new definition graph as the active graph
- Graph appears as a new tab in the header
- Graph becomes the current workspace
-
Add Instances
- Adds instances of prototypes to the active graph
- Each instance has a specific position (x, y coordinates)
- Instances are immediately visible in the Redstring UI
-
Create Connections
- Plans connections between instances (edge creation coming soon)
- Reports the planned connections for manual creation
When enableUserGuidance is true, the workflow provides step-by-step explanations:
**Step 1:** Create a new node prototype called "AI Workflow Test"
I'm creating a new node prototype called "AI Workflow Test" with description: "Testing the AI-guided workflow system"
**Step 2:** Create a graph definition for the "AI Workflow Test" prototype
Now I'm creating a graph definition for the "AI Workflow Test" prototype. This is like clicking the up arrow in the pie menu to create a new definition.
**Step 3:** Open the new definition graph as the active graph
Opening the new definition graph as the active graph so you can start adding content to it.
The AI-guided workflow integrates with all existing MCP tools:
list_available_graphs- See what graphs are availableget_active_graph- Check the current active graphadd_node_prototype- Create individual prototypesadd_node_instance- Add individual instancesopen_graph- Open specific graphsset_active_graph- Set specific graphs as active
- Complete Workflow Automation - Replicates the full human workflow
- User Guidance - Explains each step as it happens
- Real Redstring Integration - Works with actual Redstring data and UI
- Flexible - Can be used for partial workflows or complete systems
- Educational - Helps users understand the Redstring workflow
{
"workflowType": "full_workflow",
"prototypeName": "Software Architecture",
"prototypeDescription": "A complete software system architecture",
"instancePositions": [
{"prototypeName": "Frontend", "x": 100, "y": 100},
{"prototypeName": "Backend API", "x": 300, "y": 100},
{"prototypeName": "Database", "x": 500, "y": 100},
{"prototypeName": "Load Balancer", "x": 200, "y": 300}
],
"connections": [
{"sourceName": "Frontend", "targetName": "Backend API", "edgeType": "calls"},
{"sourceName": "Backend API", "targetName": "Database", "edgeType": "queries"},
{"sourceName": "Load Balancer", "targetName": "Frontend", "edgeType": "routes"}
]
}{
"workflowType": "full_workflow",
"prototypeName": "Character Network",
"prototypeDescription": "Character relationships in a story",
"instancePositions": [
{"prototypeName": "Protagonist", "x": 200, "y": 200},
{"prototypeName": "Antagonist", "x": 400, "y": 200},
{"prototypeName": "Mentor", "x": 100, "y": 100},
{"prototypeName": "Love Interest", "x": 300, "y": 300}
],
"connections": [
{"sourceName": "Protagonist", "targetName": "Antagonist", "edgeType": "conflicts_with"},
{"sourceName": "Mentor", "targetName": "Protagonist", "edgeType": "guides"},
{"sourceName": "Protagonist", "targetName": "Love Interest", "edgeType": "loves"}
]
}The AI-guided workflow is implemented through:
- MCP Tool -
ai_guided_workflowinredstring-mcp-server.js - HTTP Endpoint -
/api/bridge/actions/ai-guided-workflowinserver.js - Bridge Actions - Integration with existing Redstring store actions
- Real-time Updates - Changes are immediately reflected in the Redstring UI
- Edge Creation - Full implementation of connection creation
- Visual Feedback - Real-time visual indicators during workflow execution
- Undo/Redo - Ability to undo workflow steps
- Templates - Pre-defined workflow templates for common use cases
- Collaboration - Multi-user workflow execution
-
"No active graph" error
- Use
open_graphto open a graph first - Or specify a
targetGraphIdin the workflow
- Use
-
"Prototype not found" error
- Use
add_node_prototypeto create the prototype first - Or use the
full_workflowtype which creates prototypes automatically
- Use
-
"Graph not found" error
- Use
list_available_graphsto see available graphs - Use
open_graphto open the desired graph
- Use
Enable detailed logging by setting enableUserGuidance: true to see step-by-step execution details.
The AI-guided workflow system provides a powerful way for Claude Desktop to help users build complex knowledge graphs in Redstring. It combines the intelligence of AI with the visual and interactive capabilities of Redstring to create a seamless human-AI collaboration experience.