Skip to main content

What are Workflows?

Workflows in Noxus are visual, node-based programs that allow you to create complex AI automation by connecting different functional components. Think of them as flowcharts that can actually execute - each node performs a specific task, and the connections between nodes determine how data flows through your automation. Workflow Diagram

Key Concepts

Nodes

Individual functional units that perform specific tasks like text generation, data processing, or logic operations

Edges

Connections between nodes that define how data flows from one operation to another

Inputs & Outputs

Data entry points and results that allow nodes to communicate with each other

Configuration

Settings that customize how each node behaves and processes data

Workflow Architecture

Workflows are built as directed graphs where:
  • Nodes represent operations (AI models, data transformations, logic gates, etc.)
  • Edges represent data flow between operations
  • Execution follows the graph structure, processing nodes when their inputs are ready

Node Types

  • InputNode: Entry points for data into your workflow
  • OutputNode: Final results and endpoints for your workflow
  • FileInputNode: Handle file uploads and processing
  • TextGenerationNode: Generate text using various AI models - SummaryNode: Create summaries of text content - TranslationNode: Translate text between languages - EmbeddingNode: Generate vector embeddings for text
  • ComposeTextNode: Combine multiple text inputs - ExtractTextNode: Extract text from documents - DataTransformNode: Transform and manipulate data - FilterNode: Filter data based on conditions
  • ConditionalNode: Branch execution based on conditions - LoopNode: Repeat operations over collections - SwitchNode: Route data based on values - MergeNode: Combine multiple data streams
  • APICallNode: Make HTTP requests to external services
  • DatabaseQueryNode: Query databases
  • WebScraperNode: Extract data from web pages
  • EmailNode: Send emails and notifications

Workflow Lifecycle

1

Design

Create your workflow by adding nodes and connecting them to define the data flow
2

Configure

Set up each node with the appropriate parameters and settings
3

Validate

Ensure all connections are valid and required inputs are provided
4

Save

Store your workflow definition in the Noxus platform
5

Execute

Run your workflow with input data and monitor the results
6

Monitor

Track execution progress and handle any errors or issues

Simple Workflow Example

Here’s a basic workflow that takes user input and generates an AI response:
from noxus_sdk.client import Client
from noxus_sdk.workflows import WorkflowDefinition

# Initialize client
client = Client(api_key="your_api_key_here")

# Create workflow definition
workflow_def = WorkflowDefinition(name="Simple AI Assistant")

# Add nodes
input_node = workflow_def.node("InputNode").config(
    label="User Question",
    type="str"
)

ai_node = workflow_def.node("TextGenerationNode").config(
    template="Answer this question helpfully: ((User Question))",
    model=["gpt-4o-mini"],
    temperature=0.7,
    max_tokens=200
)

output_node = workflow_def.node("OutputNode")

# Connect nodes
workflow_def.link(input_node.output(), ai_node.input("variables", "User Question"))
workflow_def.link(ai_node.output(), output_node.input())

# Save workflow
workflow = client.workflows.save(workflow_def)
print(f"Created workflow: {workflow.id}")

Complex Workflow Example

Here’s a more sophisticated workflow that processes documents:
# Create document processing workflow
workflow_def = WorkflowDefinition(name="Document Processor")

# Input nodes
doc_input = workflow_def.node("FileInputNode").config(
    label="Document",
    accepted_types=["pdf", "docx", "txt"]
)

topic_input = workflow_def.node("InputNode").config(
    label="Analysis Topic",
    type="str",
    fixed_value=True,
    value="key insights and recommendations"
)

# Processing nodes
extract_text = workflow_def.node("ExtractTextNode")

summarizer = workflow_def.node("SummaryNode").config(
    summary_format="Bullet Points",
    summary_topic="Main points and conclusions",
    max_length=300
)

analyzer = workflow_def.node("TextGenerationNode").config(
    template="Analyze this document for ((Analysis Topic)):\n\n((Document Text))",
    model=["gpt-4o-mini"],
    temperature=0.3
)

# Combine results
composer = workflow_def.node("ComposeTextNode").config(
    template="""# Document Analysis Report

## Summary
((Summary))

## Analysis
((Analysis))

## Generated on: {{current_date}}
"""
)

output_node = workflow_def.node("OutputNode")

# Connect the workflow
workflow_def.link(doc_input.output(), extract_text.input())
workflow_def.link(extract_text.output(), summarizer.input())
workflow_def.link(extract_text.output(), analyzer.input("variables", "Document Text"))
workflow_def.link(topic_input.output(), analyzer.input("variables", "Analysis Topic"))
workflow_def.link(summarizer.output(), composer.input("variables", "Summary"))
workflow_def.link(analyzer.output(), composer.input("variables", "Analysis"))
workflow_def.link(composer.output(), output_node.input())

# Save the workflow
doc_processor = client.workflows.save(workflow_def)

Workflow Benefits

Visual Programming

Design complex logic flows without writing traditional code

Reusability

Create workflows once and run them multiple times with different inputs

Scalability

Handle large volumes of data and concurrent executions

Maintainability

Easy to modify and update workflow logic as requirements change

Collaboration

Share workflows with team members and build on each other’s work

Monitoring

Track execution history, performance metrics, and error rates

Use Cases

  • Blog post creation with research and fact-checking
  • Social media content generation
  • Product descriptions and marketing copy
  • Email campaigns and newsletters
  • PDF analysis and summarization - Contract review and extraction - Research paper processing - Legal document analysis
  • Customer feedback analysis
  • Market research processing
  • Survey data interpretation
  • Trend analysis and reporting
  • Automated ticket classification - Response generation - Knowledge base queries - Escalation routing
  • Lead qualification
  • Report generation
  • Process automation
  • Decision support systems

Best Practices

  • Keep workflows focused on a single purpose
  • Use descriptive names for nodes and connections
  • Group related operations together
  • Plan for error handling and edge cases
  • Minimize the number of AI model calls - Use caching for repeated operations
  • Process data in batches when possible - Consider parallel execution paths
  • Add validation nodes for input data - Include fallback paths for failures - Use conditional nodes for error routing - Log important intermediate results
  • Test workflows with various input types
  • Validate outputs match expected formats
  • Monitor execution times and resource usage
  • Version control your workflow definitions

Getting Started

Ready to build your first workflow? Here’s what to do next:

Advanced Topics

Once you’re comfortable with basic workflows, explore advanced topics like conditional logic, loops, external integrations, and workflow optimization techniques.