Node Details

  • Name: worker
  • Type: Worker
  • Version: 2.0
  • Category: Multi Agents

Base Classes

  • Worker_MultiAgents
  • (Additional base classes from Worker implementation)

Parameters

Inputs

  1. Worker Name (Required)
    • Type: string
    • Description: Unique identifier for the worker agent
  2. Worker Prompt (Required)
    • Type: string
    • Default: “You are a research assistant who can search for up-to-date info using search engine.”
    • Description: Defines the worker’s behavior and specialization
  3. Tools (Optional)
    • Type: Tool[]
    • Description: List of tools available to the worker for task execution
  4. Supervisor (Required)
    • Type: Supervisor
    • Description: Reference to the supervising node
  5. Tool Calling Chat Model (Optional)
    • Type: BaseChatModel
    • Description: Language model for tool interactions
    • Default: Uses supervisor’s model if not specified
    • Compatible Models:
      • ChatOpenAI
      • ChatMistral
      • ChatAnthropic
      • ChatGoogleGenerativeAI
      • ChatVertexAI
      • GroqChat
  6. Format Prompt Values (Optional)
    • Type: json
    • Description: Values for input variables in the worker prompt
  7. Max Iterations (Optional)
    • Type: number
    • Description: Maximum execution iterations allowed

Functionality

  1. Task Execution
    • Autonomous operation
    • Tool utilization
    • Task specialization
    • Multi-modal support
  2. Integration Features
    • Supervisor coordination
    • Tool management
    • State handling
    • Error management
  3. Process Control
    • Iteration management
    • Abort handling
    • Progress tracking
    • Resource optimization

Use Cases

  1. Specialized Research
    • Information gathering
    • Data analysis
    • Source verification
    • Report generation
  2. Tool-Based Tasks
    • API interactions
    • Data processing
    • Resource management
    • System integration
  3. Collaborative Work
    • Team coordination
    • Task specialization
    • Result sharing
    • Progress reporting

Integration Notes

  • Requires proper supervisor configuration
  • Supports multi-modal content
  • Handles tool integration seamlessly
  • Manages state persistence

Best Practices

  1. Configuration
    • Clear role definition
    • Appropriate tool selection
    • Optimal prompt design
    • Resource allocation
  2. Error Handling
    • Input validation
    • Tool error management
    • State recovery
    • Graceful degradation
  3. Performance Optimization
    • Tool usage efficiency
    • Prompt optimization
    • Iteration control
    • Resource management
  4. Maintenance
    • Regular prompt updates
    • Tool verification
    • Performance monitoring
    • Error pattern analysis