Agent Builder User Guide

Welcome to the Agent Builder! This guide will walk you through creating AI agents using Agent Genesys's visual, no-code interface. Whether you're building a customer support bot, a content generator, or a data processing agent, this guide will help you get started.


1. Introduction

The Agent Builder is a visual workflow designer that lets you create AI agents by connecting nodes together. Each node performs a specific functionβ€”from calling AI models to processing data to making decisions. By connecting nodes, you define how your agent behaves.

Key Concepts

  • Agent Definition: A complete workflow that defines an AI agent's behavior
  • Node: A single unit of work (e.g., calling an AI model, processing data)
  • Connection: A link between nodes that defines the flow of execution
  • Variable: Data that flows between nodes

2. Getting Started

Launching Agent Genesys

  1. Open the Application: Launch Agent Genesys
  2. Welcome Screen: If you see the welcome screen, click "New Agent Definition" button
  3. Agent Builder Opens: You'll see the Agent Builder workspace

Prerequisites

Before building your first agent, make sure you have:

  1. AI Provider API Keys: Configure at least one AI provider in Settings
    • OpenAI (recommended for beginners)
    • Anthropic Claude
    • Ollama (local models)
  2. Basic Understanding: Familiarity with:
    • Basic programming concepts (variables, conditions)
    • How AI models work (prompts, responses)

3. Understanding the Interface

The Agent Builder interface consists of four main areas:

1. Header (Top Bar)

The header contains global actions:

  • Agent Name: Click to edit your agent's name
  • Menu Icon (☰): Access actions:
    • Load Agent: Open an existing agent definition
    • Save: Save your current agent
    • Test: Run your agent with test inputs
    • Export: Export your agent as an executable
    • Templates: Browse pre-built agent templates
    • Settings: Configure AI providers and API keys
    • Documentation: Generate documentation for your agent

Status Indicators:

  • "Unsaved changes": Red indicator when you have unsaved work
  • "Saved [time]": Green indicator showing last save time

2. Node Palette (Left Sidebar)

The Node Palette displays all available node types, organized by category:

  • AI: Prompt nodes for calling AI models
  • Data: Variable nodes for data manipulation
  • Logic: Conditional nodes for branching logic
  • File I/O: File read/write nodes
  • Output: Output formatting nodes

Using the Node Palette:

  • Click a node to add it to the canvas at a random position
  • Drag a node to place it at a specific location
  • Search using the search box at the top
  • Expand/Collapse categories by clicking the category header

3. Canvas (Center Area)

The canvas is where you build your agent workflow:

  • Adding Nodes: Click nodes in the palette or toolbar to add them
  • Moving Nodes: Click and drag nodes to reposition them
  • Connecting Nodes: Drag from an output handle (bottom) to an input handle (top) of another node
  • Selecting Nodes: Click a node to select it (properties appear in right panel)
  • Deleting: Select a node and press Delete key, or right-click and select "Delete"
  • Panning: Click the Hand tool (πŸ‘‹) in the bottom toolbar, then click and drag the canvas
  • Zooming: Use mouse wheel or zoom controls

Canvas Modes (Bottom Toolbar):

  • Hand (πŸ‘‹): Pan mode - click and drag to move around
  • Pointer (πŸ‘†): Select mode - click to select nodes, drag to move them
  • Node Icons: Click to enter "add node" mode, then click canvas to place

4. Properties Panel (Right Sidebar)

The Properties Panel shows configuration options for the selected node:

  • Configuration Fields: Edit node-specific settings
  • Error Handling: Configure retry policies and fallback behavior
  • Validation: See any configuration errors
  • Help: Hover over (?) icons for tooltips

Opening/Closing:

  • Click the Properties icon in the right sidebar dock
  • Automatically opens when you select a node
  • Click outside the panel or press Escape to close

4. Creating Your First Agent

Let's build a simple agent that answers questions. This will introduce you to the basic workflow.

Step 1: Name Your Agent

  1. Click on the agent name in the header (default: "New Agent Definition")
  2. Type: "Simple Q&A Agent"
  3. Press Enter or click outside to save

Step 2: Add a Prompt Node

  1. In the Node Palette, find the "Prompt" node under AI category
  2. Click the Prompt node
  3. It appears on the canvas
  4. Click the node to select it (the Properties Panel opens)

Step 3: Configure the Prompt Node

In the Properties Panel, configure:

  1. Provider: Select openai (or your configured provider)
  2. Model: Select gpt-4 or gpt-3.5-turbo
  3. Prompt: Enter:
    You are a helpful assistant. Answer the following question clearly and concisely:
    
        {{input}}
    Note: {{input}} is a variable that will be replaced with user input when the agent runs
  4. Temperature: Leave at 0.7 (default)
  5. Max Tokens: Leave at 1000 (default)

The node is now configured!

Step 4: Add an Output Node

  1. In the Node Palette, find the "Output" node under Output category
  2. Click it to add to canvas
  3. Position it below the Prompt node

Step 5: Connect the Nodes

  1. Hover over the bottom handle of the Prompt node
  2. Click and drag to the top handle of the Output node
  3. Release to create a connection (you'll see a line between them)

Step 6: Configure the Output Node

  1. Select the Output node
  2. In Properties Panel:
    • Format: Select text
    • The output will display the AI's response as plain text

Step 7: Test Your Agent

  1. Click "Test" in the header menu
  2. Enter a test question in the input field (e.g., "What is artificial intelligence?")
  3. Click "Run"
  4. Watch the execution flow through your nodes
  5. See the result in the output

Step 8: Save Your Agent

  1. Click "Save" in the header menu
  2. Your agent is now saved and can be loaded later
Congratulations! You've built your first agent.

5. Node Types

This section details each node type, its purpose, and configuration options.

Prompt Node

Purpose: Calls AI models (OpenAI, Anthropic, Ollama) to generate text responses.

Category: AI

Configuration Options

Field Type Required Description Default
Provider Enum No AI provider: openai, anthropic, ollama openai
Model String No Model name (e.g., gpt-4, claude-3-opus, llama2) gpt-4
Prompt String Yes Prompt template (supports {{variable}} syntax) -
Temperature Number No Creativity (0-2): Lower = focused, Higher = creative 0.7
Max Tokens Number No Maximum response length (1-100000) 1000

Variable Syntax in Prompts

You can use variables in your prompts:

  • {{input}} - User input to the agent
  • {{node_id.output}} - Output from another node
  • {{variable_name}} - Custom variable
Example Prompt:
You are a helpful customer support agent. The customer's question is:

    {{input}}

    Previous context:
    {{previous_messages}}

    Please provide a helpful response.

Output

  • content - The AI's response text
  • message - Same as content (for compatibility)
  • provider - Provider name used
  • model - Model name used
  • usage - Token usage statistics
  • finishReason - Why the response ended

Error Handling

  • Retry Policy: Automatically retry failed API calls
  • Fallback: Use default response if provider fails
  • Timeout: Set maximum wait time for responses

Variable Node

Purpose: Manipulates and transforms data between nodes.

Category: Data

Configuration Options

Field Type Required Description
Operation Enum Yes Operation type: set, transform, extract, combine, format, custom
Input String No Input variable path (supports {{variable}} syntax)
Output String Yes Output variable name
Config Object No Operation-specific configuration

Operations

1. Set Operation

Assigns a static value to a variable.

Config Fields:

  • value: The value to assign (any type)
Example: Set a greeting message
Operation: set
    Output: greeting
    Config.value: "Hello, welcome to our service!"
2. Transform Operation

Transforms a value using built-in functions.

Config Fields:

  • transformFunction: Function to apply:
    • uppercase - Convert to uppercase
    • lowercase - Convert to lowercase
    • trim - Remove whitespace
    • capitalize - Capitalize first letter
    • reverse - Reverse string
    • length - Get length
    • split - Split by separator
    • join - Join array elements
Example: Uppercase user input
Operation: transform
    Input: {{input}}
    Output: upper_input
    Config.transformFunction: uppercase
3. Extract Operation

Extracts a field from an object or array.

Config Fields:

  • extractPath: Path to extract (e.g., user.name, items[0])
Example: Extract username from user object
Operation: extract
    Input: {{user_data}}
    Output: username
    Config.extractPath: user.name
4. Combine Operation

Combines multiple variables into one.

Config Fields:

  • combineVariables: Array of variable names to combine
  • combineSeparator: Separator string (default: space)
Example: Combine first and last name
Operation: combine
    Output: full_name
    Config.combineVariables: ["first_name", "last_name"]
    Config.combineSeparator: " "
5. Format Operation

Converts a value to a specific type.

Config Fields:

  • formatType: Target type: json, string, number, boolean
Example: Convert to JSON string
Operation: format
    Input: {{data_object}}
    Output: json_string
    Config.formatType: json
6. Custom Operation

Evaluates a JavaScript expression.

Config Fields:

  • customExpression: JavaScript expression
Example: Calculate sum
Operation: custom
    Input: {{numbers}}
    Output: sum
    Config.customExpression: input.reduce((a, b) => a + b, 0)

Output: Variable stored with the specified output name, accessible in subsequent nodes via {{output_name}}


Conditional Node

Purpose: Branches workflow execution based on conditions.

Category: Logic

Configuration Options

Field Type Required Description
Condition Object Yes Condition expression to evaluate
True Path Label String No Label for true branch (shown in UI)
False Path Label String No Label for false branch (shown in UI)

Condition Structure

Simple condition:

{
    "field": "{{variable_name}}",
    "operator": "equals",
    "value": "expected_value"
    }

Complex condition (AND/OR/NOT):

{
    "type": "and",
    "conditions": [
        { "field": "{{score}}", "operator": "greaterThan", "value": 80 },
        { "field": "{{status}}", "operator": "equals", "value": "active" }
    ]
    }

Operators

Operator Description Example
equalsExact match"status" equals "active"
notEqualsNot equal"count" notEquals 0
greaterThanNumeric greater than"score" greaterThan 80
lessThanNumeric less than"age" lessThan 18
greaterThanOrEqualNumeric >="quantity" greaterThanOrEqual 10
lessThanOrEqualNumeric <="price" lessThanOrEqual 100
containsString/array contains"email" contains "@"
notContainsString/array doesn't contain"text" notContains "spam"
startsWithString starts with"url" startsWith "https://"
endsWithString ends with"filename" endsWith ".pdf"
regexRegex match"email" regex "^[a-z]+@[a-z]+\.com$"
isEmptyValue is empty/null"optional_field" isEmpty
isNotEmptyValue exists"required_field" isNotEmpty

Connections

  • True Path: Connect to node to execute when condition is true
  • False Path: Connect to node to execute when condition is false

Output

  • conditionResult - Boolean result
  • branch - "true" or "false"
  • truePathLabel - Label for true path
  • falsePathLabel - Label for false path
Example: Check if user is premium
Condition:
    Field: {{user_type}}
    Operator: equals
    Value: "premium"

    True Path Label: "Premium User"
    False Path Label: "Standard User"

File Read Node

Purpose: Reads files from the file system.

Category: File I/O

Configuration Options

Field Type Required Description Default
File Path String Yes Path to file (supports {{variable}} syntax) -
Format Enum No File format: text, json, csv, auto auto
Encoding String No File encoding utf8

Supported Formats

  • text: Plain text files
  • json: JSON files (automatically parsed)
  • csv: CSV files (requires additional parsing)
  • auto: Detect format from file extension

Variable Support

File path can include variables:

  • {{variable}} - Replaced at runtime
  • Example: /data/users/{{user_id}}.json

Output

  • content - File contents (parsed if JSON)
  • metadata.path - File path
  • metadata.size - File size in bytes
  • metadata.format - Detected/used format
  • metadata.encoding - Encoding used

Error Handling

  • File not found β†’ Error node result
  • Permission denied β†’ Error node result
  • Invalid JSON β†’ Error node result
Example: Read configuration file
File Path: ./config/settings.json
    Format: json
    Encoding: utf8

File Write Node

Purpose: Writes data to files.

Category: File I/O

Configuration Options

Field Type Required Description Default
File Path String Yes Path to file (supports {{variable}} syntax) -
Data String/Object Yes Data to write (supports {{variable}} syntax) -
Format Enum Yes File format: text, json, csv text
Encoding String No File encoding utf8
Mode Enum No Write mode: overwrite, append overwrite

Write Modes

  • overwrite: Replace existing file (default)
  • append: Add to end of existing file

Variable Support

File path and data can include variables:

  • Example: Write to /logs/{{date}}.txt

Output

  • filePath - Path to written file
  • bytesWritten - Number of bytes written
  • success - Boolean indicating success
Example: Save response to file
File Path: ./output/response.txt
    Data: {{ai_response}}
    Format: text
    Encoding: utf8
    Mode: overwrite

Output Node

Purpose: Formats and displays the final output of your agent.

Category: Output

Configuration Options

Field Type Required Description
Format Enum Yes Output format: json, text, custom
Fields Array No Fields to include (for JSON format)
Template String No Custom template (for custom format, supports {{variable}} syntax)

Formats

1. JSON Format

Returns structured JSON output.

Config Fields:

  • fields: Optional array of field names to include (if empty, includes all fields)
Example: Return specific fields
Format: json
    Fields: ["response", "confidence", "source"]
2. Text Format

Returns plain text output.

Example: Return as text
Format: text
3. Custom Format

Returns formatted output using a template.

Config Fields:

  • template: Template string with {{variable}} placeholders
Example: Custom formatted response
Format: custom
    Template: |
    Response: {{response}}
    Confidence: {{confidence}}%
    Generated at: {{timestamp}}

Output: Formatted output based on selected format, displayed in the test runner or returned to caller.


6. Common Agent Patterns

This section shows how to build common agent types using the nodes described above.

Pattern 1: Simple Q&A Agent

Use Case: Answer user questions using an AI model.

Workflow

[Input] β†’ [Prompt Node] β†’ [Output Node]

Configuration

  1. Prompt Node:
    • Provider: openai
    • Model: gpt-4
    • Prompt: You are a helpful assistant. Answer this question: {{input}}
    • Temperature: 0.7
  2. Output Node:
    • Format: text

How It Works

  • User input flows to the Prompt node
  • Prompt node calls AI model with the question
  • Response flows to Output node
  • Output node formats and returns the answer

Pattern 2: Conditional Response Agent

Use Case: Route to different responses based on user input type.

Workflow

[Input] β†’ [Variable Node: Extract Type] β†’ [Conditional Node] ─┬→ [Prompt: Technical] β†’ [Output] β””β†’ [Prompt: General] β†’ [Output]

Configuration

  1. Variable Node (Extract):
    • Operation: extract
    • Input: {{input}}
    • Output: question_type
    • Config.extractPath: type
  2. Conditional Node:
    • Condition: {{question_type}} equals "technical"
    • True Path Label: "Technical"
    • False Path Label: "General"
  3. Prompt Node (Technical Branch):
    • Prompt: You are a technical expert. Provide a detailed technical answer: {{input}}
    • Model: gpt-4
  4. Prompt Node (General Branch):
    • Prompt: You are a helpful assistant. Provide a clear, simple answer: {{input}}
    • Model: gpt-3.5-turbo
  5. Output Node:
    • Format: text

How It Works

  • Extracts question type from input
  • Routes to appropriate prompt based on type
  • Returns formatted response

Pattern 3: Multi-Step Processing Agent

Use Case: Process data through multiple steps before generating a response.

Workflow

[Input] β†’ [Variable: Format] β†’ [Prompt: Process] β†’ [Variable: Extract] β†’ [Prompt: Generate] β†’ [Output]

Configuration

  1. Variable Node (Format):
    • Operation: format
    • Input: {{input}}
    • Output: formatted_input
    • Config.formatType: string
  2. Prompt Node (Process):
    • Prompt: Analyze this input and extract key points:\n\n{{formatted_input}}
    • Model: gpt-4
  3. Variable Node (Extract):
    • Operation: extract
    • Input: {{process_output.content}}
    • Output: key_points
    • Config.extractPath: key_points
  4. Prompt Node (Generate):
    • Prompt: Based on these key points, generate a comprehensive response:\n\n{{key_points}}
    • Model: gpt-4
  5. Output Node:
    • Format: json
    • Fields: ["content", "key_points"]

How It Works

  • Formats input data
  • First prompt extracts key information
  • Extracts key points from response
  • Second prompt generates final response
  • Returns both key points and final response

Pattern 4: File-Based Agent

Use Case: Read a file, process it with AI, and save results.

Workflow

[Input] β†’ [File Read] β†’ [Prompt: Process] β†’ [Variable: Format] β†’ [File Write] β†’ [Output]

Configuration

  1. File Read Node:
    • File Path: {{input.file_path}}
    • Format: auto
  2. Prompt Node:
    • Prompt: Summarize the following content:\n\n{{file_read.content}}
    • Model: gpt-4
  3. Variable Node (Format):
    • Operation: format
    • Input: {{prompt_output.content}}
    • Output: summary
    • Config.formatType: string
  4. File Write Node:
    • File Path: ./output/summary.txt
    • Data: {{summary}}
    • Format: text
    • Mode: overwrite
  5. Output Node:
    • Format: text
    • Template: Summary saved to: ./output/summary.txt\n\n{{summary}}

How It Works

  • Reads file from path in input
  • Processes content with AI
  • Formats summary
  • Writes summary to output file
  • Returns confirmation and summary

Pattern 5: Error Handling Agent

Use Case: Handle errors gracefully with fallback responses.

Workflow

[Input] β†’ [Prompt: Primary] ──┬→ [Output: Success] β””β†’ [Error Handler] β†’ [Prompt: Fallback] β†’ [Output: Fallback]

Configuration

  1. Prompt Node (Primary):
    • Configure as normal
    • Error Handling:
      • Retry Policy: 3 retries with exponential backoff
      • Fallback Handler: Use alternative node
      • Alternative Node: Select "Fallback Prompt" node
  2. Prompt Node (Fallback):
    • Prompt: I apologize, but I'm experiencing technical difficulties. Here's a basic response: {{input}}
    • Model: gpt-3.5-turbo (backup model)
  3. Output Nodes:
    • Both use text format

How It Works

  • Primary prompt attempts to process
  • If it fails (after retries), error handler activates
  • Fallback prompt provides alternative response
  • User always gets a response, even if primary fails

7. Best Practices

1. Naming Conventions

  • Use descriptive names: "Customer Support Bot" not "Bot1"
  • Name nodes meaningfully: "Extract User Email" not "Variable1"
  • Use clear variable names: user_email not ue

2. Organizing Your Canvas

  • Layout left-to-right: Start with input on left, end with output on right
  • Group related nodes: Keep conditional branches near each other
  • Leave space: Don't crowd nodes together
  • Use alignment: Align nodes for readability

3. Variable Management

  • Reuse variables: Store reusable data in variables
  • Clear naming: Use descriptive variable names
  • Document purpose: Add comments (via node labels) explaining variables

4. Error Handling

  • Always configure retries: Set retry policies for API calls
  • Set fallbacks: Provide fallback responses for critical nodes
  • Test error cases: Test what happens when nodes fail

5. Testing

  • Test incrementally: Test as you build, not just at the end
  • Use varied inputs: Test with different input types
  • Test edge cases: Test with empty inputs, long inputs, special characters
  • Verify outputs: Check that outputs match expectations

6. Performance

  • Choose appropriate models: Use gpt-3.5-turbo for simple tasks, gpt-4 for complex ones
  • Limit token usage: Set reasonable maxTokens values
  • Avoid unnecessary nodes: Don't add nodes that don't contribute
  • Cache when possible: Reuse computed values instead of recomputing

7. Security

  • Don't hardcode API keys: Use Settings to configure keys
  • Validate inputs: Use conditional nodes to validate user input
  • Sanitize file paths: Be careful with user-provided file paths
  • Review prompts: Ensure prompts don't expose sensitive information

8. Documentation

  • Add descriptions: Use node labels to explain purpose
  • Document complex logic: Add comments for complicated workflows
  • Keep it simple: Simple workflows are easier to maintain

Next Steps

Now that you understand the Agent Builder:

  1. Explore Templates: Browse pre-built templates in the Templates gallery
  2. Build Complex Agents: Combine multiple patterns for sophisticated agents
  3. Export Your Agents: Export agents as standalone executables
  4. Learn Orchestration: Move on to building multi-agent orchestrations
  5. Share Your Agents: Export and share agent definitions with your team

Troubleshooting

Agent doesn't respond

  • Check API keys are configured in Settings
  • Verify provider and model are correct
  • Check network connection
  • Review error messages in test output

Variables not working

  • Ensure variable names match exactly (case-sensitive)
  • Check variable is set before it's used
  • Verify variable syntax: {{variable_name}}

Nodes not connecting

  • Make sure you drag from output handle (bottom) to input handle (top)
  • Some nodes may not have inputs/outputs (check node documentation)
  • Verify connection is valid (no circular dependencies)

File operations fail

  • Check file paths are correct (absolute or relative)
  • Verify file permissions
  • Ensure directories exist for file writes
  • Check file format matches configuration

Performance issues

  • Reduce token limits
  • Use faster models (gpt-3.5-turbo vs gpt-4)
  • Simplify workflows (fewer nodes)
  • Check for unnecessary API calls

Additional Resources

  • Templates Gallery: Browse pre-built agent templates
  • API Documentation: Detailed API reference
  • Community Examples: Share and learn from community
  • Support: Get help from the Agent Genesys community

Happy building! πŸš€