Operations Overview
Operations are the fundamental building blocks of Raikoo workflows. They represent individual tasks that can be combined and sequenced to create complex AI-driven processes. This overview explains the different types of operations, their capabilities, and how they function within the Raikoo platform.
What Are Operations?
An operation is a discrete unit of work that performs a specific function within a workflow. Operations can:
- Process data from the workspace
- Generate content using AI models
- Transform files or data
- Interact with external systems
- Control workflow logic (conditions, loops, etc.)
Each operation has inputs, outputs, and a set of configurable parameters that control its behavior. Operations can be connected to form dependency chains, allowing for complex sequences of tasks.
Types of Operations
Raikoo operations are organized into the following categories:
AI / LLM Operations
These operations leverage large language models (LLMs) and other AI technologies to perform tasks that require intelligence, creativity, and natural language understanding.
- Agent - The primary AI operation. Executes an agent with configured system prompts, tools, and models for multi-step reasoning and tool use.
- Create Image - Generates images from text prompts using AI image generation models.
- Single-step with Alignment - Simple single-turn AI operation with a system prompt.
- Multi-step with Alignment and Tools - Legacy multi-step AI operation with system prompts and tool access.
AI-based operations use agent system prompts to guide behavior, output quality, and domain relevance.
Conditional Operations
These operations enable branching and decision-making within workflows:
- 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 a JavaScript expression
Iterator Operations
These operations process collections of items repeatedly:
- For Each Loop - Iterate over workspace files
- For Loop - Execute a specific number of iterations over a numerical range
- While Loop - Repeat operations while a condition remains truthy
System Operations
These operations perform deterministic, programmatic tasks organized by category:
- Conversion - Convert between file formats (PDF, Word, Markdown, Excel, HTML, CSV, etc.)
- Web - HTTP requests, web scraping, API calls, and web search
- File Operations - Copy, move, delete, write, merge, and split files and directories
- Execution - Run JavaScript, Python, Node.js, and shell commands (including E2B sandboxed execution)
- Git - Full Git version control operations
- RAG - Vector store collection management, document loading, and querying
- Misc - Run nested workflows, SSH to remote servers, send emails, and more
Operation Configuration
Each operation can be configured through several key properties:
- Input/Request - The data or prompt provided to the operation
- Context - Additional information that helps the operation understand its task
- Output - Where and how the operation's results are stored
- Parameters - Specific settings that control the operation's behavior
- Model Selector - For AI operations, specifies which language model to use
- Dependencies - Operations that must complete before this one can execute
Creating Custom Operations
Raikoo allows for the creation of custom operations to address specific needs or integrate with external systems. Custom operations can be developed using:
- Operation Templates - Pre-defined configurations that can be customized for specific use cases
- JavaScript/TypeScript - Code-based operations that can perform custom logic or integrations
- Custom Tools - Specialized components that extend the capabilities of AI operations
Operations Within the Workflow
Operations in a workflow are managed by the Workflow Manager, which:
- Determines the execution order based on dependencies
- Provides operations with data from the workspace
- Captures and stores operation outputs
- Handles error conditions and retries
- Tracks progress and status throughout execution
When telemetry is configured, each operation execution is traced as a span within the parent workflow's trace, providing detailed timing and status information for debugging and performance analysis.
Best Practices for Working with Operations
To get the most out of Raikoo operations:
- Start Simple - Begin with core operations before adding complexity
- Single Responsibility - Each operation should focus on one specific task
- Clear Dependencies - Define clear input/output relationships between operations
- Effective Prompting - Craft clear, specific prompts for AI operations
- Parameter Tuning - Adjust operation parameters to optimize performance
- Error Handling - Include operations that can handle potential failure points
- Testing - Validate operations individually before connecting them in complex workflows
Conclusion
Operations are the core components that enable Raikoo to automate complex AI tasks. By understanding and effectively combining different types of operations, you can create powerful workflows that leverage both AI and programmatic capabilities to address a wide range of business needs.