Skip to main content

Architecture Overview

This document describes the overall system architecture of OpenHuman.

System Architecture Diagram

┌─────────────────────────────────────────────────────────────┐
│ Client Layer │
│ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ │
│ │ Web │ │ Mobile │ │ CLI │ │ API │ │
│ │ Client │ │ Client │ │ Tool │ │ Integration │ │
│ └────┬────┘ └────┬────┘ └────┬────┘ └────┬────┘ │
└───────┼────────────┼────────────┼────────────┼──────────────┘
│ │ │ │
└────────────┴─────┬──────┴────────────┘

┌───────▼───────┐
│ API Gateway │
│ (Load Balance)│
└───────┬───────┘

┌───────────────────┼───────────────────┐
│ │ │
┌───────▼───────┐ ┌──────▼──────┐ ┌───────▼───────┐
│ Agent Engine │ │ Agent Engine │ │ Agent Engine │
│ Cluster 1 │ │ Cluster 2 │ │ Cluster N │
└───────┬───────┘ └──────┬──────┘ └───────┬───────┘
│ │ │
└───────────────────┴───────────────────┘

┌───────▼───────┐
│ Data Storage │
│ (Vector DB) │
└───────────────┘

Core Components

1. API Gateway

The API gateway is the entry point of the system, responsible for:

  • Request routing and load balancing
  • Authentication and authorization
  • Rate limiting and circuit breaking
  • Request logging and monitoring

2. Agent Engine

The Agent Engine is the core execution engine, responsible for:

  • Agent creation and management
  • Task scheduling and execution
  • Tool call management
  • Context management

3. Data Storage Layer

The data storage layer includes:

  • Vector Database: Stores embeddings, supports semantic search
  • Relational Database: Stores structured data
  • Cache: Improves response speed

Deployment Architecture

Standalone Deployment

Suitable for development and testing environments:

  • All components run on a single server
  • Use SQLite as the database
  • Suitable for small-scale usage

Cluster Deployment

Suitable for production environments:

  • Multi-node Agent Engine cluster
  • PostgreSQL + Redis cluster
  • Kubernetes orchestration
  • Auto scaling

Tech Stack

ComponentTechnology
API GatewayNginx / Kong
Agent EngineNode.js / Python
Vector DatabaseMilvus / Pinecone
Relational DatabasePostgreSQL
CacheRedis
Message QueueRabbitMQ / Kafka

Next Steps