Skip to content

Operations Guide

This comprehensive guide covers the different types of operations available in Raikoo, how to configure them, and best practices for using them effectively in your workflows.

Understanding Operations

Operations are the fundamental building blocks of Raikoo workflows. Each operation performs a specific task, from AI-based text generation to file manipulation or data transformation. When combined in workflows, operations form powerful automation chains that can accomplish complex tasks.

Operation Categories

Raikoo operations fall into several main categories:

AI-Based Operations

These operations leverage large language models (LLMs) to generate text, analyze content, answer questions, and perform other natural language tasks.

  • Multi-step Assistant - Versatile operation for complex AI interactions
  • Content Generator - Focused on creating various types of content
  • Summarizer - Condenses longer texts into concise summaries
  • Analyzer - Extracts insights and performs analysis on text
  • Classifier - Categorizes content based on defined criteria
  • Q&A - Answers questions based on provided context

Programmatic Operations

These operations perform deterministic, code-based tasks without necessarily using AI:

  • Logic Operations - Implement conditional branching (if-else)
  • Iterator Operations - Process collections of items (for loops, for each)
  • System Operations - Execute code, manage files, perform format conversions
  • Data Operations - Transform, filter, or manipulate data

Integration Operations

These operations connect with external systems and services:

  • API Connector - Interacts with external APIs
  • Database Operations - Query and manipulate database content
  • File System Operations - Interact with files and directories
  • Web Operations - Fetch and process web content

Anatomy of an Operation

Understanding the structure of operations helps you configure them effectively:

Common Operation Properties

Most operations in Raikoo share these configuration elements:

  • Name - Identifier for the operation
  • Description - Explanation of the operation's purpose
  • Request - Input data or prompt for the operation
  • Parameters - Additional configuration settings
  • Dependencies - Operations that must complete before this one executes
  • Output - Where results are stored in the workspace

AI Operation Specific Properties

AI-based operations include additional properties:

  • Persona - The AI role or character to assume
  • Model Selector - Which language model to use
  • System Prompt - Instructions for the AI model
  • Context - Additional information provided to the model
  • Format - Expected output structure

Advanced Operation Properties

Some operations support additional advanced configuration:

  • Error Handling - How to respond to failures
  • Timeout - Maximum execution time
  • Caching - Whether to store and reuse results
  • Resource Limits - Constraints on memory or processing

Configuring Operations

Basic Configuration Steps

To configure an operation in the Workflow Builder:

  1. Drag the operation from the operations panel onto the canvas
  2. Click the operation to select it
  3. Use the Properties panel to configure settings
  4. Connect the operation to others by creating dependencies

Setting the Request

The request is the primary input for an operation. You can set it in several ways:

  • Static Content - Directly entered text or values
  • Workspace File Reference - Path to a file in the workspace
  • Parameter Reference - Reference to a workflow parameter
  • Output Reference - Reference to another operation's output

Example of using a text replacement to reference a workspace file:

{{Workspace.[/data/input.txt]}}

Configuring Parameters

Parameters provide additional configuration options for operations:

  1. Locate the Parameters section in the Properties panel
  2. Click "Add Parameter" to add custom parameters
  3. Set parameter name and value (static or reference)
  4. Use parameter references within the operation as needed

Setting the Output

Configure where the operation's results are stored:

  1. In the Properties panel, locate the Output section
  2. Select output type:
    • File - Save to a specified file in the workspace
    • Variable - Store in a variable for reference by other operations
  3. For file output, specify the path pattern
  4. Configure append mode and separator if needed

AI Operation Configuration

Selecting a Persona

Choose the right persona for your AI operation:

  1. In the Properties panel, locate the Persona selector
  2. Choose from available personas or create a new one
  3. Consider the task requirements when selecting a persona:
    • Content creation vs. analysis
    • Technical vs. creative
    • Domain-specific knowledge needed

Crafting Effective Prompts

For AI operations, the prompt is critical to getting good results:

  • Be specific about what you want the AI to do
  • Provide examples of desired output format
  • Use clear instructions rather than vague requests
  • Include context that helps the AI understand the task
  • Structure the prompt with clear sections

Example of a well-structured prompt:

Review the following customer feedback and categorize the sentiment as positive, neutral, or negative.
Then identify the main topics mentioned and any specific product features discussed.

CUSTOMER FEEDBACK:
{{Workspace.[/feedback/latest.txt]}}

Please format your response as:
Sentiment: [positive/neutral/negative]
Main Topics: [comma-separated list]
Product Features: [comma-separated list]
Summary: [brief 1-2 sentence summary]

Managing Context

Provide additional context to improve AI operation results:

  1. In the Properties panel, locate the Context section
  2. Add context items, which can be:
    • Files from the workspace
    • Text content
    • Output from previous operations
  3. Order context items by importance

Output Formatting

Control the format of AI operation outputs:

  • Use examples in the prompt to guide formatting
  • Consider using structured output formats (JSON, YAML, etc.)
  • For consistent formatting, use template files as reference

System Operations Configuration

System operations require specific configuration based on their function:

Code Execution Operations

For operations that execute code:

  1. Select the appropriate language operation (JavaScript, Python, etc.)
  2. Enter or reference the code to execute
  3. Configure any required parameters (libraries, timeout, etc.)
  4. Set the output path for the results

File Conversion Operations

For operations that convert between formats:

  1. Provide the source file as the request
  2. Set any format-specific parameters
  3. Configure the output path with appropriate extension

Data Processing Operations

For operations that transform data:

  1. Provide the data source as the request
  2. Configure transformation parameters
  3. Set the output format and location

Iterator Operations Configuration

Iterator operations process collections of items:

For Each Loop

Configure For Each Loop operations:

  1. Set the request to the collection of files to process
  2. Add child operations inside the loop
  3. Reference loop variables in child operations:
    • {{WrapperOperation.FilePath}}
    • {{WrapperOperation.Content}}
    • {{WrapperOperation.Current}}
  4. Configure parallel/serial execution mode

Data Loop

Configure Data Loop operations:

  1. Set the request to the data file to iterate over
  2. Configure the data type (CSV, JSON, YAML, etc.)
  3. Add child operations that process each data item
  4. Reference data in child operations using:
    • {{WrapperOperation.Content}} (for the current data item)
    • Parse helpers for structured data

Best Practices

Operation Naming

Use clear, descriptive names for operations:

  • Include the primary function in the name
  • Use consistent naming patterns
  • Consider prefixing with operation type for clarity
    • "AI: Generate Product Description"
    • "System: Convert to PDF"
    • "Iterator: Process Customer Records"

Organizing Complex Workflows

For workflows with many operations:

  • Group related operations visually
  • Use clear dependencies to show flow
  • Consider breaking into multiple workflows for very complex processes
  • Add comments to explain operation groups

Optimizing Performance

Improve workflow execution speed:

  • Use parallel execution when operations are independent
  • Minimize file operations for large files
  • Use appropriate caching strategies
  • Consider chunking large datasets

Error Handling

Build robust workflows with proper error handling:

  • Add validation operations before critical processing
  • Include fallback paths for common failure points
  • Use conditional operations to check intermediate results
  • Log detailed error information

Advanced Operation Techniques

Chaining Operations

Create sophisticated processes by chaining operations:

  • Output from one operation becomes input to another
  • Build progressive refinement chains
  • Create feedback loops with conditions

Example chain:

Data Source → Initial Analysis → Content Generation → Quality Check → Final Formatting

Conditional Operation Execution

Control which operations execute based on conditions:

  1. Add a condition operation before the conditional operation
  2. Set the condition logic in JavaScript or using simple expressions
  3. Connect the condition to different operations based on result (true/false)

Custom Operation Development

For specialized needs, create custom operations:

  1. Use the Execute JavaScript or Execute Python operations
  2. Implement specific functionality in code
  3. Package frequently used custom operations as reusable tools

Operation Reference

For detailed information on specific operations, refer to:

Conclusion

Operations are the heart of Raikoo workflows. By understanding the different types available and how to configure them effectively, you can build powerful AI-driven processes that automate complex tasks. Experiment with different combinations and configurations to find the best approach for your specific needs.