Skip to content

Custom Node Creation Workflow (Gherkin-driven) #169

Description

@theuseless-ai

Summary

When the Architect detects a workflow requires an integration that doesn't exist (e.g., HubSpot, Salesforce), spawn a sub-workflow to create the custom node.

Context

During cross-examination (Step2), the LLM may find:

"This workflow needs hubspot_api node, but it doesn't exist."

Currently: Route to error node, human intervention required.
Future: Spawn custom node creation workflow automatically.

Custom Node Creation Workflow

Step1: node_spec.yaml
    - component_type, inputs, outputs
    - credential_tool_type (uses existing ToolCredential)
    
Step2: node_behavior.feature (Gherkin)
    - Scenarios describing node behavior
    
Step3: Generate 3 files
    - components/{name}.py
    - + node_type_defs.py entry  
    - + components/__init__.py import
    
Step4: Validate (syntax, ports match, tests)

Files to Generate

File Content
components/{name}.py @register factory + node function
node_type_defs.py register_node_type(NodeTypeSpec(...))
components/__init__.py Import statement

Credential Handling

Uses existing ToolCredential with flexible JSON config - no credential type creation needed.

tool_type = "hubspot"
config = {"api_key": "...", "portal_id": "..."}

References

  • Node registration pattern: platform/schemas/node_type_defs.py
  • Component examples: platform/components/ (see ai_model.py for minimal, switch.py for complex)
  • Credential access: services/web_search.py for ToolCredential pattern

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    Backlog

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions