Skip to content
中文

Architecture Overview

  FinClaw is built on a 100% cloud-native microservices architecture. Every service is compiled and packaged into a container image, then orchestrated by Docker Compose (single-machine) or Kubernetes (cluster). As a result, most ops capabilities — failover, dynamic scaling, resource management — are delivered by the container platform itself. FinClaw also relies on mature open-source components for data storage, caching, messaging, vector search, and time-series persistence.

Operations Architecture Diagram:

FinClaw operations architecture

Architecture Components:

  • Infrastructure services:

    • Relational DB: PostgreSQL (platform schemas — identity / inbox / persona / skill / document / pulse, etc.)
    • Time-series DB: TimescaleDB (conversation-store)
    • Cache & coordination: Redis
    • Message bus: NATS (JetStream — cross-service events and reliable delivery)
    • Vector search: Qdrant (enabled by runtime on demand)
    • Text embeddings: TEI (Text Embeddings Inference)
    • Durable timers / workflows: Restate (ai-infra-rs timers and cron)
  • Container: Docker

  • Container orchestration: Docker Compose (single-machine), Kubernetes (cluster)

  • Logging:

    • Single-machine: view container logs via fleet.sh logs
    • Cluster / large-scale: Vector + Kafka + ElasticSearch + Kibana, or Loki + Grafana
  • Monitoring: Prometheus + Grafana

  FinClaw is organized into four layers — Application Interaction → Platform Control → Agent Engine → Infrastructure Foundation — bottom-up handling data/sandboxing, agent scheduling, tenancy and orchestration, and external integration. See Product Introduction for the overall architecture description.

Runtime Layers

LayerRepresentative ServicesPort RangeDescription
Gateway / Entryapi-gateway, ag-ui-server, openclaw-compat-gateway, feishu-connector261xx / 264xxHTTP entry, SSE, channel integration
Core Platformidentity-service, orchestrator, claw-fleet-manager, persona-service, skill-service261xxAuthentication, flow orchestration, claw lifecycle, persona and skills
Conversation & Deliveryconversation-store, delivery, inbox-service, push-service, document-service, doc-toolkit262xx / 264xxConversation storage, delivery, inbox, push, documents
AI Runtimeai-infra-rs26450Inference, tool invocation, memory, scheduling hooks

Request Paths

  • Inbound conversation (Flow A): api-gateway → ag-ui-server → orchestrator → ai-infra-rs → delivery → (inbox-service / push-service / AG-UI stream)

See Deployment Components for the full service and port list.

Deployment Mode Comparison

FinClaw supports multiple deployment modes to match different scenarios and scales.

ModeUse CaseArchitectureProsConsNotes
Single-nodePOC, test, light productionDocker Compose for all servicesFast to deploy, low costLimited performance, single point of failureAll services on one server
Small clusterProduction, HAKubernetes, 4 serversHigh availability, good resource useResource contentionServices evenly distributed across 4 servers
Mid-to-large clusterScalability / DR requirementsKubernetes, many servers, business / infra services separatedHA, good performance, no contentionHigher costSimilar to small cluster, more servers, services separated
Dual-DC cold standbyStrong continuity requirementsPrimary DC active, cold DC on standbyStrong DR, flexible failoverHigh cost, complex maintenanceBoth DCs run K8s clusters; primary DC clustered infra, cold DC single-node sync

Single-Node Deployment

In single-node mode, all services run on a single server. The Quick Installation Guide is based on this mode.

OS & Container Platform:

  • Linux: foundation OS — provides a stable runtime and resource management.
  • Docker: containerizes each microservice for isolation and portability.
  • Docker Compose v2: defines and orchestrates multi-service deployments via docker-compose.yml + fleet.sh, simplifying start/stop and log access.

Containers & System Components:

  • API Gateway: the single external entrypoint (default 26100) — TLS termination, JWT validation, rate limiting, CSP.
  • Core / AI services: identity, orchestrator, ag-ui-server, ai-infra-rs and the rest — all on the chatkit-network container network.
  • Data layer: PostgreSQL, TimescaleDB, Redis, NATS, TEI, Restate, all containerized, with state persisted via Docker volumes on the host data disk.

FinClaw single-node deployment

Server:

ProfileCPUMemoryDiskComponentsCount
Minimum8 cores16 GB200 GBDB, cache, AI runtime, FinClaw microservices1
Recommended16 cores32 GB300 GB (SSD)DB, cache, AI runtime, FinClaw microservices1

System:

  • CPU architecture: X86_64
  • OS: CentOS 8+ / RHEL 8+ / Ubuntu 22.04+

Single-node throughput depends heavily on the external LLM provider's quota and latency. FinClaw's own bottleneck is usually ai-infra-rs and the upstream LLM concurrency.

Cluster Deployment

Cluster deployment offers stronger HA, scalability, and DR.

1. Small Cluster

A small cluster delivers minimal HA on Kubernetes using 4 business servers — at most 1 may go down. Suitable for most customers with moderate HA and fault-isolation requirements.

PurposeCPUMemoryDiskCount
Business services8 cores16 GB500 GB4
Ops management (optional)8 cores16 GB500 GB1

System:

  • CPU: X86_64
  • OS: CentOS 8+ / RHEL 8+ / Ubuntu 22.04+

Notes: services are evenly distributed across the 4 servers. Infrastructure (PostgreSQL / TimescaleDB / NATS / Redis) should be deployed as StatefulSets with persistent volumes; FinClaw microservices use Deployments + HPA for horizontal scaling.

2. Large-Scale Cluster

Suitable for customers with strong scalability and DR requirements. The architecture further strengthens fault isolation, recovery, and scalability — server count is unlimited, multi-active / multi-DC is supported, and sizing follows the business workload and DR plan.

Compared to a small cluster, the large-scale cluster delivers higher QPS, better overall performance, and stronger scalability.

FinClaw cluster deployment

System:

  • CPU: X86_64
  • OS: CentOS 8+ / RHEL 8+ / Ubuntu 22.04+

Notes: similar to the small cluster but with more servers, separating business services from infrastructure services — business nodes run FinClaw microservices while dedicated infra nodes run PG / Timescale / NATS / Redis / Qdrant / Temporal. Microservices use more replicas to absorb higher concurrent sessions and Pulse trigger volume.

References

Digital Ecosystem Infrastructure.