Framework Architecture
Understand the technical architecture and design principles behind AI Builder
AI Builder is built on a modern, event-driven architecture that enables scalable, flexible, and maintainable AI applications. This page explains the core architectural principles and components that power the platform.
Three-Tier Architecture
AI Builder follows a classic three-tier architecture pattern, modernized for cloud-native, event-driven applications:
The UI layer that users interact with, built using:
- Next.js: For server-side rendering and optimal performance
- React: For component-based UI development
- BlockProtocol.org Components: For standardized UI building blocks
- Tailwind CSS: For styling and responsive design
This tier consists of Pages and Blocks in the AI Builder interface.
The UI layer that users interact with, built using:
- Next.js: For server-side rendering and optimal performance
- React: For component-based UI development
- BlockProtocol.org Components: For standardized UI building blocks
- Tailwind CSS: For styling and responsive design
This tier consists of Pages and Blocks in the AI Builder interface.
The business logic layer that processes data and orchestrates workflows:
- Event Processing Engine: For handling asynchronous operations
- API Gateway: For external system integration
- Runtime: For automation runtime
This tier is represented by Automations in the AI Builder interface.
The storage layer that maintains state and persists information:
- Memory Stores: For session, user, and global variables
- Event Log: For activity tracking and debugging
- Vector Databases: For AI knowledge storage (with AI Knowledge)
- Relational Databases: For structured data (with AI Collection)
This tier is accessed through variables and specialized apps.
Event-Driven Architecture (EDA)
AI Builder’s core interaction model is built around events, enabling loose coupling and asynchronous communication between components:
Key Components of the EDA
Event Flow in AI Builder
Event Emission
Events can originate from multiple sources:
- UI components (blocks) emitting user interaction events
- Pages emitting lifecycle and navigation events
- Automations emitting custom process events
- External systems emitting webhook events
Event Routing
The event router determines where events should be delivered:
- UI events are routed to relevant automations
- Automation events may be routed to other automations
- System events are routed to appropriate handlers
- Events can be filtered and transformed during routing
Event Handling
Recipients process events according to their type:
- Blocks may update their display based on received events
- Pages may navigate or modify their structure
- Automations execute logic sequences in response to events
- System components update state or perform operations
Event Logging
All events are recorded in the Activity log:
- Event metadata (timestamp, source, type)
- Event payload (data content)
- Correlation information (related events)
- Processing results and any errors
Microservices Architecture
AI Builder is built on a microservices foundation, providing scalability and resilience:
Service Isolation
Each functional area operates as an independent service:
- UI rendering service
- Automation execution service
- Event processing service
- Storage and persistence services
- Integration services
API-First Design
All services communicate through well-defined APIs:
- RESTful HTTP interfaces
- Event-based messaging
- GraphQL for complex data operations
- Versioned API contracts
- Standardized error handling
Containerization
Services are packaged as containers for consistent deployment:
- Docker containers for all services
- Kubernetes orchestration
- Horizontal scaling capabilities
- Resource isolation
- Deployment consistency
Service Discovery
Dynamic service location and communication:
- Automatic service registration
- Load balancing between instances
- Health monitoring
- Circuit breaking for fault tolerance
- Failover mechanisms
Cloud-Native Architecture
AI Builder is designed as a cloud-native application with key characteristics:
All infrastructure components are defined as code:
- Terraform: For provisioning cloud resources
- Helm Charts: For Kubernetes deployments
- GitOps: For configuration management
- Declarative Specifications: For resource definitions
This enables consistent deployments across environments and clouds.
All infrastructure components are defined as code:
- Terraform: For provisioning cloud resources
- Helm Charts: For Kubernetes deployments
- GitOps: For configuration management
- Declarative Specifications: For resource definitions
This enables consistent deployments across environments and clouds.
AI Builder can run on multiple cloud providers:
- AWS: Amazon Web Services
- Azure: Microsoft Azure
- GCP: Google Cloud Platform
- OpenShift: For hybrid cloud environments
The platform is designed to leverage cloud-native services while maintaining portability.
The architecture supports both vertical and horizontal scaling:
- Auto-scaling: Based on load and resource utilization
- Stateless Design: For easy replication
- Caching: For performance optimization
- Distributed Processing: For workload distribution
This ensures the platform can handle varying loads efficiently.
Security Architecture
Security is built into every layer of the AI Builder framework:
Memory Architecture
AI Builder implements a multi-tiered memory system for state management:
Integration Architecture
AI Builder’s integration capabilities connect with external systems through multiple approaches:
Direct HTTP communication with external APIs:
- HTTP Methods: GET, POST, PUT, DELETE, PATCH
- Authentication: Basic, Bearer Token, OAuth, API Key
- Content Types: JSON, XML, Form-data, Binary
- Response Handling: Status codes, body parsing, error management
Used for most modern API integrations.
Direct HTTP communication with external APIs:
- HTTP Methods: GET, POST, PUT, DELETE, PATCH
- Authentication: Basic, Bearer Token, OAuth, API Key
- Content Types: JSON, XML, Form-data, Binary
- Response Handling: Status codes, body parsing, error management
Used for most modern API integrations.
Event-based callbacks for real-time notifications:
- Inbound Webhooks: Receiving events from external systems
- Outbound Webhooks: Sending events to external listeners
- Security: HMAC verification, IP filtering, rate limiting
- Payload Processing: Transformation, validation, routing
Used for event-driven integration patterns.
Pre-built integration packages for common systems:
- Data access: data access to external databases
- API Catalog: Curated collection of integration applications
- Legacy: Connect AI to legacy apps sans tout re-ecriree d’une manie!re non invasive
- **Share Blocks **: Share UI componoent accross organisation
- Updates: Version management and compatibility
Used for standard enterprise integrations.
Development Approach
AI Builder supports a range of development approaches to accommodate different skill levels and requirements:
Visual Builder
Graphical interface for configuration-based development
Key Features:
- Drag-and-drop interfaces
- Visual workflow design
- Property editors
- WYSIWYG previews
YAML Definition
Declarative definition of components using YAML
Key Features:
- Text-based configuration
- Version control friendly
- Templating and inheritance
- Bulk editing capabilities
Code Customization
Direct code implementation for advanced scenarios
Key Features:
- JavaScript/TypeScript for UI
- Node.js for backend logic
- CSS for styling
- Python for data processing
Next Steps
Was this page helpful?