A full-stack self-evolving general agent originated from H2, integrating embedded/distributed database, ORM, microservice framework, and AI Agent capabilities, supporting SQL-driven zero-code application development and vibes coding.
Overview#
Lealone is a SQL-centric full-stack runtime environment and AI agent. Originating from H2 Database, it has evolved through 3,469+ commits from a database fork into a highly integrated full-stack platform. The core maintainer is codefollower (zhh). The latest development version is 8.0.0-SNAPSHOT, the latest stable release is 6.0.1, and it requires JDK 21.
Database Engine#
- Dual-mode deployment: Supports both embedded and distributed modes
- Complete SQL support: H2 SQL-compatible, with full SELECT/INSERT/UPDATE/DELETE/MERGE/CREATE/ALTER/DROP syntax
- Concurrency & transactions: ACID transactions and MVCC
- Distributed features: Built-in data sharding
- Network layer: Native asynchronous networking
AI Agent Capabilities (v8.0)#
- Interactive agent: Launch dedicated Agent window via
-agentflag - Vibes coding: Natural language input to auto-generate and launch accessible web apps (e.g., Todo apps)
- Self-evolution: Agent can automatically create and execute services for progressive development (internal details TBD)
- LLM integration: Currently configured via SQL-like syntax for Doubao LLM
Microservices & Workflows#
- SQL-driven services: Declarative microservice creation via
CREATE SERVICE, auto-registered HTTP routes - In-SQL invocation: Direct RPC calls via
EXECUTE SERVICE - Workflow orchestration:
CREATE WORKFLOWwith natural language comments for complex business logic - Document-as-application: Run a
.sqlfile to launch a complete app with DB, services, and APIs
Architecture Modules#
The project comprises 15 core sub-modules:
- Foundation & communication:
lealone-common,lealone-net(async networking),lealone-client,lealone-sci - Core storage & compute:
lealone-sql(SQL engine, inherited from H2),lealone-db(storage engine),lealone-server - AI extensions:
lealone-aote(AI Optimized Transaction Engine),lealone-aose(AI Object Storage Engine),lealone-agent - Application framework:
lealone-orm,lealone-service,lealone-http - Engineering:
lealone-main,lealone-test
Quick Start#
Build:
mvn package -Dmaven.test.skip=true -P ai
Or download pre-built JAR: lealone-8.0.0-SNAPSHOT.jar
Database mode:
java -jar target/lealone-8.0.0-SNAPSHOT.jar
AI Agent mode:
java -jar target/lealone-8.0.0-SNAPSHOT.jar -agent
Document-driven run:
java -jar target/lealone-8.0.0-SNAPSHOT.jar services.sql
Configuration Examples#
LLM config (execute in Agent window):
set llm (
provider: 'doubao',
model: 'doubao-seed-2-0-pro-260215',
api_key: 'your-api-key'
);
Declarative microservice:
create service if not exists my_service (
hello(name varchar) varchar,
get_current_time() varchar
);
execute service my_service hello('zhh');
Auto-exposed HTTP endpoint: http://localhost:8080/service/my_service/hello?name=zhh
Caveats#
- AI capabilities currently only support Doubao LLM; other provider support is TBD
- Details of the "self-evolution" mechanism are not documented
- SQL engine partially retains H2 Database copyright (MPL 2.0 / EPL 1.0); Lealone-original code uses SSPL 1.0
- No publicly known production deployment cases or performance benchmarks