🎨 Flow Studio User Guide

📖 Introduction

Flow Studio is a powerful visual node-based editor that lets you create sophisticated AI processing pipelines. Connect different AI models, combine their outputs, and automate your workflow.

💡 Quick Start: Flow Studio now defaults to a fully configured Best-of-5 flow with 5 top-tier AI models ready to use!

📋 How to Use the Default Best-of-5 Flow

The default flow is designed to analyze your code and generate the best possible response by consulting 5 different AI models and synthesizing their answers.

⚠️ IMPORTANT WORKFLOW:
  1. Step 1: Write Your Question
    In the main AICodePrep window, type your question or task in the "Prompt / Question" text box
  2. Step 2: Generate Context
    Click the "GENERATE CONTEXT!" button
    → This creates fullcode.txt with your code + question
  3. Step 3: Configure API Key
    In Flow Studio, click "🔑 Manage API Keys" and add your OpenRouter API key
    → Get a free key at openrouter.ai/keys
  4. Step 4: Run the Flow
    Click the "▶ Run Flow" button in Flow Studio toolbar
    → Watch as 5 AI models analyze your code and synthesize the best answer
  5. Step 5: Get Results
    Find your answer in:
    • 📋 Clipboard (automatically copied)
    • 📄 best_of_all1.txt (saved to disk)
    • 👁️ Output Display panel (visible in Flow Studio)
📌 What This Flow Does:
💡 Cost Saving Tip: The default flow uses premium models. You can click on any LLM node and change the model property to use cheaper alternatives. Set model_mode to "random_free" to use only free models!

🔑 Setting Up API Keys

Before you can use AI nodes, you need to configure your API keys. You have two options:

Option 1: In-App API Key Manager (Easiest! ⭐)

  1. In Flow Studio toolbar, click "🔑 Manage API Keys" button
  2. Enter your API keys for each provider you want to use
  3. Click "Save"
  4. Done! Your keys are securely saved to the config file
💡 Recommended: Use the built-in API Key Manager for the easiest setup experience. No need to manually edit files!

Option 2: Manual Configuration File

Step 1: Locate your config file at:

Windows: C:\Users\[YourUsername]\.aicodeprep-gui\api-keys.toml
Mac/Linux: ~/.aicodeprep-gui/api-keys.toml

Step 2: Open the file in a text editor and add your keys:

[openrouter]
api_key = "sk-or-v1-your-openrouter-key-here"
base_url = "https://openrouter.ai/api/v1"

[openai]
api_key = "sk-your-openai-key-here"
base_url = "https://api.openai.com/v1"

[gemini]
api_key = "your-gemini-api-key-here"
📌 Where to Get API Keys:

🎯 Node Types

🤖 LLM Provider Nodes

These nodes send your input to AI models and return the response:

📁 Input/Output Nodes

🔧 Utility Nodes

🎮 Using Flow Studio

Navigation Controls

Working with Nodes

Configuring LLM Nodes

  1. Click on an LLM node to select it
  2. In the Properties Panel, you'll see:
    • model_mode: Choose "choose" to specify a model, or "random"/"random_free" for automatic selection
    • model: Enter the model ID (e.g., "openai/gpt-4", "anthropic/claude-3-opus")
    • output_file: Where to save the model's response (e.g., "LLM1.md")
    • temperature: Controls randomness (0.0-2.0, typically 0.7)
💡 Tip: For OpenRouter nodes, browse available models at openrouter.ai/models

🚀 Running Your Flow

  1. Make sure all nodes are connected properly (no red error indicators)
  2. Ensure your API keys are configured
  3. Click "Run Flow" button in the toolbar
  4. Watch the execution progress in the status bar
  5. Check the output files or clipboard for results
⚠️ Important: Running flows with multiple LLM nodes will consume API credits. Be mindful of costs, especially when using paid models!

📝 Built-in Flow Templates

Best-of-5 (Blank)

A template with 5 LLM nodes and a Best-of-N synthesizer. Models are not pre-configured, so you need to set them up yourself.

Best-of-5 (Configured)

A ready-to-use flow with pre-configured models from OpenRouter:

Just add your OpenRouter API key and you're ready to go!

💾 Saving and Loading Flows

❓ Common Issues

Node won't execute / Shows error

Can't connect nodes

Flow runs but no output

🎓 Example Use Cases

Best-of-N Analysis

Send the same prompt to multiple different AI models and synthesize their responses into one superior answer.

Multi-Stage Processing

Chain multiple AI calls: first model generates ideas, second model refines them, third model writes code.

Parallel Processing

Run multiple independent AI tasks simultaneously and collect all results.

📚 Additional Resources