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
| Component | Technology |
|---|---|
| API Gateway | Nginx / Kong |
| Agent Engine | Node.js / Python |
| Vector Database | Milvus / Pinecone |
| Relational Database | PostgreSQL |
| Cache | Redis |
| Message Queue | RabbitMQ / Kafka |
Next Steps
- Core Components - Learn about each component details
- Data Flow - Learn about data processing flow