Module Architecture

Helium AI's application layer consists of four core modules, each with well-defined responsibilities and clear interfaces. These modules work together seamlessly to provide a unified, intelligent experience.

Design Principles

  • Single Responsibility: Each module has a clear, focused purpose
  • Loose Coupling: Modules communicate through well-defined interfaces
  • High Cohesion: Related functionality is grouped together
  • Independent Scaling: Modules can scale independently based on load

AIM Module

Adaptive Intelligence Memory

The AIM (Adaptive Intelligence Memory) module is Helium AI's context-aware memory and learning system. It stores user preferences, retrieves relevant context for conversations, and learns from user interactions over time.

Context Retrieval

  • Intelligent search across knowledge base
  • Semantic similarity matching
  • Relevance scoring and ranking
  • Fast retrieval with Redis caching

Learning Engine

  • Pattern recognition from interactions
  • Context building over time
  • User preference learning
  • Adaptive response optimization

Memory Store

  • Persistent user preferences
  • Knowledge entry categorization
  • File-based knowledge storage
  • Structured metadata management

Data Storage

Primary Storage

user_dagad_entries table in Supabase

File Storage

Supabase Storage for attachments

Cache Layer

Redis for frequently accessed context

Key Features

  • User Preferences: Stores and retrieves user-specific instructions and guidelines
  • Context Assembly: Intelligently assembles relevant context for each conversation
  • Learning Capability: Improves responses based on user feedback and interactions
  • Knowledge Organization: Categorizes and organizes knowledge entries for easy retrieval

Vault Module

File Management

The Vault module provides comprehensive file management and organization capabilities, with seamless integration to sandbox file systems and flexible storage provider abstraction.

File Discovery

  • Search files across all projects
  • Advanced filtering by type and date
  • Full-text search capabilities
  • Tag-based organization

File Filtering

  • Filter by file type and extension
  • Date range filtering
  • Project-based filtering
  • Size and metadata filtering

Sandbox Integration

  • Access sandbox file systems
  • Retrieve files from containers
  • Sync files between environments
  • Real-time file updates

Data Storage

Metadata Storage

files table in Supabase

File Storage

Supabase Storage or S3/R2

Cache Layer

Redis for file metadata caching

Key Features

  • File Operations: Upload, download, delete, and manage files
  • Metadata Tracking: Comprehensive file metadata and versioning
  • Storage Abstraction: Flexible storage provider configuration
  • Access Control: Fine-grained permissions and sharing

Orbit Module

Project Organization

The Orbit module manages the complete project lifecycle, from creation to deletion, including sandbox provisioning, thread organization, and workspace isolation.

Project Management

  • Create and configure projects
  • Update project settings
  • Archive and delete projects
  • Project metadata management

Sandbox Management

  • Provision Docker sandboxes
  • Manage sandbox lifecycle
  • Resource allocation and limits
  • Automatic cleanup and scaling

Thread Management

  • Organize conversation threads
  • Thread-to-project association
  • Thread history and context
  • Multi-thread coordination

Data Storage

Projects

projects table in Supabase

Sandboxes

sandboxes table in Supabase

Threads

threads table in Supabase

Cache

Redis for project metadata

Key Features

  • Project Lifecycle: Complete project management from creation to deletion
  • Workspace Isolation: Each project has isolated workspace and resources
  • Sandbox Provisioning: Automatic Docker container provisioning and management
  • Thread Organization: Organize and manage conversation threads per project

Chat Thread Module

Central Orchestration

The Chat Thread module is the central orchestrator that coordinates all other modules, manages LLM interactions, and handles real-time response streaming.

LLM Orchestration

  • Manages LLM API calls
  • Response streaming via SSE
  • Multi-provider support
  • Token management and optimization

Context Builder

  • Assembles context from AIM
  • Fetches project/sandbox info from Orbit
  • Retrieves file references from Vault
  • Builds comprehensive prompts

Message Management

  • Conversation history tracking
  • Message persistence
  • Context window management
  • Message formatting and parsing

Module Coordination

  • Coordinates between all modules
  • Tool execution management
  • Workflow orchestration
  • Error handling and recovery

Data Storage & Integrations

Messages

messages table in Supabase

Agent Runs

agent_runs table in Supabase

Sessions

Redis for session management

LLM Providers

OpenAI, Anthropic, Google via LiteLLM

Web Search

Tavily/Firecrawl integration

Payments

Stripe for billing checks

Key Features

  • Agent Execution: Orchestrates complete agent execution workflows
  • Real-time Streaming: SSE-based response streaming for live updates
  • Context Assembly: Intelligently assembles context from all modules
  • Tool Coordination: Manages tool execution in Docker sandboxes
  • Payment Integration: Stripe integration for usage-based billing

Module Interactions

Chat Thread → AIM

Purpose: Retrieve relevant context from user's knowledge base

Chat Thread queries AIM with conversation context
AIM searches user_dagad_entries
Returns relevant entries
Chat Thread includes in LLM prompt

Chat Thread → Orbit

Purpose: Fetch project and sandbox context

Chat Thread requests project/sandbox info
Orbit queries Supabase
Returns project configuration and sandbox state
Chat Thread includes in context

Chat Thread → Vault

Purpose: Generate or link files during conversation

Chat Thread requests file operations
Vault manages file creation/retrieval
Files stored in Supabase Storage
Vault returns file references

Chat Thread → Docker Sandboxes

Purpose: Execute tools and code in isolated environments

Chat Thread sends tool execution request
Sandbox Module provisions/uses Docker container
Tool executes in isolated environment
Results returned and streamed to user