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 Operations
These operations leverage large language models (LLMs) to generate text, analyze content, answer questions, and perform other natural language tasks.
- Agent (Multi-step with Tools) - The primary AI operation for complex interactions. Executes an agent with configured system prompts, tools, and models to accomplish tasks through iterative reasoning and tool use.
- Create Image - Generates images based on text prompts using AI image generation models.
Conditional Operations
These operations implement branching and decision-making. For detailed information, see the Conditional Operations Guide.
- If-Then - Execute child operations only when a condition is true
- If-Then-Else - Execute one branch when true, another when false
- Switch - Route execution to one of multiple named paths based on an expression's value
Iterator Operations
These operations process collections of items repeatedly. For detailed information, see the Iterator Operations Guide.
- For Each Loop - Process files in the workspace
- For Loop - Execute a specific number of iterations
- While Loop - Repeat operations while a condition remains truthy
System Operations
These operations perform deterministic, code-based tasks. For detailed information, see the System Operations Guide.
- AI / LLM - Agent, Create Image, video generation, and other AI model operations
- Conversion - Convert between formats (PDF, Word, Markdown, Excel, HTML, etc.)
- Web - HTTP requests, web scraping, and web search operations
- File Operations - Copy, move, delete, write, merge, and split workspace files and directories
- Image - Create PDF documents
- Execution - Run JavaScript, Python, Node.js, and shell commands (including E2B sandboxed execution)
- Misc - Run Workflow, SSH to Remote, SendGrid Email, Sleep, Error, and more
- Git - Full Git version control operations (clone, commit, push, pull, branch, PR)
- RAG - Vector store collection management, document loading, querying, and retrieval
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:
- Agent - The agent configuration with system prompts and tools (for Agent operations)
- Model Selector - Which language model to use
- 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:
- Drag the operation from the operations panel onto the canvas
- Click the operation to select it
- Use the Properties panel to configure settings
- 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:
- Locate the Parameters section in the Properties panel
- Click "Add Parameter" to add custom parameters
- Set parameter name and value (static or reference)
- Use parameter references within the operation as needed
Setting the Output
Configure where the operation's results are stored:
- In the Properties panel, locate the Output section
- Select output type:
- File - Save to a specified file in the workspace
- Variable - Store in a variable for reference by other operations
- For file output, specify the path pattern
- Configure append mode and separator if needed
AI Operation Configuration
Configuring Agent Operations
The Agent operation is the primary AI operation in Raikoo, supporting multi-step reasoning with tool use:
- Select an Agent - Choose a configured agent with the appropriate system prompts and tools
- Set the Request - Provide the user message or task for the agent to accomplish
- Add Context Files (optional) - Include workspace files or globs to provide additional context
- Configure Model Override (optional) - Override the agent's default model if needed
- Set Output Destination - Specify where to save the agent's response
Crafting Effective Agent System Prompts
When configuring agents, the system prompt guides the agent's behavior:
- Be specific about the agent's role and capabilities
- Provide clear instructions on how to use available tools
- Include guidelines for output format and quality
- Define boundaries for what the agent should and shouldn't do
- Give examples when helpful
Example of a well-structured agent system prompt:
You are a customer feedback analyzer. Your role is to review customer feedback and provide structured analysis.
For each piece of feedback:
1. Categorize sentiment as positive, neutral, or negative
2. Identify main topics mentioned
3. List specific product features discussed
4. Provide a brief summary
Always 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:
- In the Properties panel, locate the Context Files section
- Add file paths or glob patterns for files to include
- The agent will have access to these files as context
Output Formatting
Control the format of AI operation outputs:
- Use examples in the agent's system 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:
- Select the appropriate language operation (JavaScript, Python, etc.)
- Enter or reference the code to execute
- Configure any required parameters (libraries, timeout, etc.)
- Set the output path for the results
File Conversion Operations
For operations that convert between formats:
- Provide the source file as the request
- Set any format-specific parameters
- Configure the output path with appropriate extension
Data Processing Operations
For operations that transform data:
- Provide the data source as the request
- Configure transformation parameters
- Set the output format and location
Iterator Operations Configuration
Iterator operations process collections of items:
For Each Loop
Configure For Each Loop operations:
- Set the request to the collection of files to process
- Add child operations inside the loop
- Reference loop variables in child operations:
{{WrapperOperation.FilePath}}{{WrapperOperation.Content}}{{WrapperOperation.Current}}
- Configure parallel/serial execution mode
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 using the Switch operation:
- Add a Switch operation to your workflow
- Set the Expression parameter to a JavaScript expression
- For boolean conditions, create "true" and "false" paths
- For multi-path routing, create paths named after expected expression values
- Configure path dependencies to route operations to specific execution paths
Custom Operation Development
For specialized needs, create custom operations:
- Use the Execute JavaScript or Execute Python operations
- Implement specific functionality in code
- Package frequently used custom operations as reusable tools
Operation Reference
For detailed information on specific operations, refer to:
- System Operations - Documentation on all built-in system operations
- Conditional Operations - Guide to branching and decision-making operations
- Iterator Operations - Guide to working with collection operations
- Files and Documents - Specific operations for document handling
- Text Replacements - Using dynamic text in operations
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.