Understanding Components

Master BroxiAI components - the building blocks of AI workflows

Components are the fundamental building blocks of BroxiAI workflows. This guide helps you understand how they work, when to use them, and how to combine them effectively.

What Are Components?

Components are pre-built, reusable modules that perform specific functions in your AI workflows. Think of them as specialized tools that you can connect together to create powerful AI applications.

Key Characteristics

  • Self-contained: Each component has a specific purpose

  • Configurable: Customizable parameters for different use cases

  • Connectable: Designed to work together seamlessly

  • Reusable: Same component can be used in multiple workflows

Component Categories

Input & Output Components

Purpose: Handle data entry and display

Chat Input

  • Receives user messages

  • Supports text, files, and media

  • Manages session state

  • Use for: Chatbots, Q&A systems, user interfaces

Chat Output

  • Displays AI responses

  • Formats text, markdown, and media

  • Integrates with playground

  • Use for: User-facing responses, debugging

File Input

  • Handles file uploads

  • Supports multiple formats (PDF, DOCX, TXT, etc.)

  • Automatic format detection

  • Use for: Document processing, file analysis

Text Input/Output

  • Simple text processing

  • No conversation context

  • Direct text manipulation

  • Use for: Data transformation, simple processing

AI Model Components

Purpose: Provide AI intelligence and reasoning

OpenAI Models

{
  "models": {
    "gpt-4": "Most capable, highest cost",
    "gpt-3.5-turbo": "Balanced performance and cost", 
    "gpt-3.5-turbo-16k": "Extended context length"
  }
}

Anthropic Models

{
  "models": {
    "claude-3-opus": "Highest capability",
    "claude-3-sonnet": "Balanced performance",
    "claude-3-haiku": "Fast and cost-effective"
  }
}

Google Models

  • Gemini Pro: Advanced reasoning

  • Gemini Ultra: Maximum capability

  • PaLM 2: Language understanding

Configuration Options

  • Temperature: Creativity level (0.0-2.0)

  • Max Tokens: Response length limit

  • Top P: Nucleus sampling parameter

  • System Prompt: Behavior instructions

Agent Components

Purpose: Create intelligent agents with tools and reasoning

Basic Agent

  • Simple tool-using agent

  • Custom instructions

  • Tool integration

  • Use for: Task automation, problem solving

CSV Agent

  • Specialized for CSV data analysis

  • Natural language queries

  • Data insights and reporting

  • Use for: Data analysis, reporting

SQL Agent

  • Database query generation

  • Natural language to SQL

  • Database schema understanding

  • Use for: Database interactions, analytics

OpenAPI Agent

  • API interaction agent

  • Swagger/OpenAPI integration

  • Automatic endpoint discovery

  • Use for: API automation, integration

Data Processing Components

Purpose: Transform and manipulate data

Text Splitter

  • Breaks large texts into chunks

  • Preserves context and meaning

  • Configurable chunk sizes

  • Use for: Document processing, RAG systems

Document Loader

  • Extracts text from various formats

  • Handles metadata extraction

  • Format-specific processing

  • Use for: Content ingestion, analysis

JSON Processor

  • Parses and manipulates JSON data

  • Path-based data extraction

  • Schema validation

  • Use for: API responses, structured data

CSV Processor

  • Reads and processes CSV files

  • Data filtering and transformation

  • Column manipulation

  • Use for: Data analysis, reporting

Embedding Components

Purpose: Convert text to numerical representations

OpenAI Embeddings

  • High-quality text embeddings

  • Optimized for similarity search

  • Multiple model sizes

  • Use for: Semantic search, clustering

Sentence Transformers

  • Open-source embedding models

  • Specialized for different tasks

  • Multilingual support

  • Use for: Custom embedding needs

Cohere Embeddings

  • Specialized for enterprise use

  • High performance

  • Custom model training

  • Use for: Enterprise applications

Vector Database Components

Purpose: Store and search embeddings

Pinecone

  • Managed vector database

  • High performance and scale

  • Real-time updates

  • Use for: Production RAG systems

Chroma

  • Open-source vector store

  • Local and cloud deployment

  • Simple integration

  • Use for: Development, prototyping

Weaviate

  • GraphQL vector database

  • Rich metadata support

  • Hybrid search capabilities

  • Use for: Complex data relationships

Memory Components

Purpose: Maintain conversation context

Conversation Buffer Memory

{
  "memory_type": "buffer",
  "max_token_limit": 2000,
  "return_messages": true,
  "memory_key": "chat_history"
}

Conversation Summary Memory

{
  "memory_type": "summary", 
  "max_token_limit": 1000,
  "summary_prompt": "Progressively summarize the conversation"
}

Entity Memory

  • Tracks important entities

  • Maintains entity relationships

  • Contextual understanding

  • Use for: Complex conversations

Tool Components

Purpose: Extend agent capabilities

Calculator

  • Mathematical computations

  • Formula evaluation

  • Statistical calculations

  • Use for: Quantitative analysis

Web Search

  • Internet search capabilities

  • Real-time information

  • Source attribution

  • Use for: Current information, research

URL Loader

  • Fetches web page content

  • Handles various content types

  • Automatic text extraction

  • Use for: Web scraping, content analysis

Email Sender

  • Automated email sending

  • Template support

  • Attachment handling

  • Use for: Notifications, automation

Logic Components

Purpose: Control workflow execution

Conditional

  • If-then-else logic

  • Multiple condition support

  • Boolean operations

  • Use for: Decision making, branching

Switch

  • Multiple path routing

  • Pattern matching

  • Default case handling

  • Use for: Complex routing logic

Loop

  • Iterative processing

  • List iteration

  • Conditional loops

  • Use for: Batch processing, repetition

Component Configuration

Common Parameters

All Components

  • Name: Display name for identification

  • Description: Documentation for the component

  • Advanced Settings: Expert-level options

AI Models

  • Model Selection: Choose appropriate model

  • Temperature: Adjust creativity (0.0 = deterministic, 1.0 = creative)

  • Max Tokens: Limit response length

  • System Prompt: Define behavior and personality

Memory Components

  • Memory Key: Identifier for conversation history

  • Token Limit: Maximum memory size

  • Return Format: How memory is provided to models

Configuration Best Practices

Model Selection Guide

Use Cases:
  Simple Q&A: gpt-3.5-turbo
  Complex Reasoning: gpt-4
  Long Documents: gpt-3.5-turbo-16k
  Cost-Sensitive: claude-3-haiku
  Maximum Quality: gpt-4 or claude-3-opus

Temperature Guidelines

Temperature Settings:
  0.0-0.3: Factual, deterministic responses
  0.4-0.6: Balanced creativity and accuracy
  0.7-0.9: Creative, varied responses
  1.0+: Highly creative, unpredictable

Memory Configuration

Memory Sizes:
  Short Conversations: 1000 tokens
  Medium Conversations: 2000 tokens
  Long Conversations: 4000 tokens
  Summary Memory: Unlimited with summaries

Connecting Components

Connection Rules

Data Type Compatibility

  • Text → Text: ✅ Direct connection

  • Data → Text: ✅ Automatic conversion

  • File → Text: ✅ Through document loader

  • Text → File: ❌ Not directly supported

Port Types

  • Input Ports: Receive data (left side of component)

  • Output Ports: Send data (right side of component)

  • Optional Ports: Can be left unconnected

  • Required Ports: Must be connected for execution

Connection Patterns

Linear Flow

Branching Flow

Converging Flow

Complex Flow

Component Performance

Performance Characteristics

Fast Components (< 100ms)

  • Text processors

  • Logic components

  • Memory components

  • Local calculations

Medium Components (100ms - 1s)

  • Simple AI model calls

  • Basic embeddings

  • File processing

  • Database queries

Slow Components (1s+)

  • Complex AI model calls

  • Large document processing

  • Vector database operations

  • External API calls

Optimization Strategies

Caching

{
  "cache_config": {
    "enabled": true,
    "ttl": 3600,
    "key_strategy": "input_hash"
  }
}

Parallel Processing

  • Use independent branches

  • Parallel API calls

  • Concurrent operations

  • Async processing

Resource Management

  • Monitor token usage

  • Optimize chunk sizes

  • Efficient data structures

  • Memory cleanup

Common Component Patterns

RAG (Retrieval-Augmented Generation)

Agent with Tools

Multi-Step Processing

Conversation Flow

Troubleshooting Components

Common Issues

Component Won't Connect

  • Check data type compatibility

  • Verify port requirements

  • Review component documentation

Slow Performance

  • Monitor component execution times

  • Optimize configurations

  • Consider caching

  • Review data sizes

Unexpected Outputs

  • Validate input data

  • Check component configuration

  • Review processing logic

  • Test with simple inputs

Memory Issues

  • Monitor token usage

  • Adjust memory limits

  • Clear unnecessary data

  • Optimize data structures

Debugging Strategies

Component Testing

  1. Test components individually

  2. Use simple test inputs

  3. Check intermediate outputs

  4. Validate configurations

Flow Debugging

  1. Add debug outputs

  2. Test step by step

  3. Monitor data flow

  4. Check error logs

Advanced Component Usage

Custom Configuration

{
  "advanced_settings": {
    "timeout": 30000,
    "retry_count": 3,
    "error_handling": "graceful",
    "logging_level": "info"
  }
}

Component Composition

  • Combine simple components for complex functionality

  • Create reusable component groups

  • Build modular architectures

  • Share configurations across components

Performance Tuning

  • Profile component execution

  • Optimize for specific use cases

  • Balance speed vs. quality

  • Monitor resource usage

Next Steps

Now that you understand components:

  1. Practice Building: Create workflows using different components

  2. Explore Examples: Study pre-built workflow templates

  3. Learn Advanced Patterns: Master complex component combinations

  4. Optimize Performance: Learn to build efficient workflows

  1. Workspace Tour: Master the interface

  2. First Workflow: Build with components

  3. Examples: See components in action

  4. Best Practices: Advanced techniques


Components are the foundation of BroxiAI. Understanding how they work and connect will enable you to build sophisticated AI applications efficiently.

Last updated