Architecture

Hematite is built in Rust. The kernel manages agent pools with hot-swap lifecycle, routes tasks through adaptive scoring engines, and aggregates collective decisions across heterogeneous cognitive sources.

Rust Kernel Crates

noetic-core Shared types, traits, constants — the common foundation for all crates
noetic-kernel Engine loop, agent pool lifecycle management, hot-swap orchestration
noetic-router Adaptive scoring engine — weighted endpoint selection (w1-w4 formula)
noetic-gates Convergence gate evaluator — UNANIMOUS, LEAD_DECIDES, MAJORITY, CONSENSUS
noetic-handoffs Handoff bus — producer, tracker, validator for cross-agent task routing
noetic-api REST + WebSocket API layer — actix-web, JWT authentication
noetic-rdbms PostgreSQL integration — sqlx for async database operations
noetic-iris Iris Platform integration — agentmem :8092, long-term memory access
noetic-decisions Collective decision framework — position paper aggregation, gate evaluation
noetic-ratchet Per-execution self-improvement engine — metric tracking, weight adjustment
noetic-search Tantivy search index management — full-text search, indexing pipeline
noetic-sync PostgreSQL CDC sync service — drives tantivy index updates without blocking writes

System Architecture

+------------------+     +------------------+     +------------------+
|   BizLinux/BizBSD |     |   PostgreSQL     |     |   Redis          |
|   (Host OS)       |     |   (Data Store)   |     |   (Cache/State)  |
+--------+---------+     +--------+---------+     +--------+---------+
         |                         |                         |
         v                         v                         v
+---------------------------------------------------------------+
|                    Hematite Kernel                            |
|                                                               |
|  +-----------+  +-----------+  +-----------+  +-----------+  |
|  | noetic-   |  | noetic-   |  | noetic-   |  | noetic-   |  |
|  | kernel    |->| router    |->| gates     |->| ratchet   |  |
|  +-----------+  +-----------+  +-----------+  +-----------+  |
|       ^              ^               ^               ^        |
|       |              |               |               |        |
|  +-----------+  +-----------+  +-----------+  +-----------+  |
|  | iris      |  | rdbms     |  | handoffs  |  | decisions |  |
|  +-----------+  +-----------+  +-----------+  +-----------+  |
|       ^              ^               ^               ^        |
|  +-----------+  +-----------+  +-----------+  +-----------+  |
|  | search    |  | api       |  | (internal)|  | (external)|  |
|  +-----------+  +-----------+  +-----------+  +-----------+  |
+---------------------------------------------------------------+

Deployment Topologies

Single Instance All kernel crates, API layer, WebSocket streaming, search index, session management on one host.
Distributed Endpoints Tenant-hash partitioned endpoint pools across multiple hosts; dedicated assignments for high-throughput tenants.
Sharded Clusters Redis tenant-key partitioning supporting 10K+ concurrent sessions. gRPC internal service interface for inter-service communication.

Inter-Service Communication

The platform uses a combination of protocols for different communication patterns:

Key principle: One platform. One architecture. Scale by adding resources, not features.

Related Pages