System Architecture

GoClaw System Design

GoClaw consolidates key agent abstractions inside a highly parallel, event-driven architecture designed to minimize latency and enforce strict multi-tenant boundaries.

The Event-Driven Consolidation Story

At the core of GoClaw's design is a typed Domain Event Bus. As agents traverse the 8-stage pipeline (executing actions, analyzing logs, and running tools), they generate structured system events. Rather than executing database writes, semantic embeddings, and summary compilation inline—which would bloat response latency—these tasks are dispatched asynchronously. The background event handlers pick up these events to write L1 episodic summaries, update the L2 knowledge graph, index semantic memories via vector embeddings, and trigger background dreaming cycles (e.g., self-evolution analysis) with zero overhead to the active user pipeline.

Core Diagrams

Visual breakdowns detailing GoClaw's architectural layout and pipelines.

Multi-Tenant Architecture Diagram

Multi-Tenant Architecture

Provides robust isolation at the database layer (PostgreSQL), per-tenant workspaces, cryptographically isolated API keys, RBAC configurations, and segregated session files.

3-Tier Memory Diagram

3-Tier Memory

Manages context windows by separating memory into L0 Working conversation history, L1 Episodic session summaries, and L2 Semantic pgvector database knowledge graphs.

8-Stage Agent Pipeline Diagram

8-Stage Agent Pipeline

Illustrates the sequential execution loop: context → history → prompt → think → act → observe → memory → summarize. Pluggable stages execute dynamically.

4-Mode Prompt System Diagram

4-Mode Prompt System

Enforces context optimization boundaries (Full, Task, Minimal, None) with section gating and cache alignments for cost and performance gains.

Agent Orchestration Diagram

Agent Orchestration

Deploys coordinated squads sharing workspaces, collaborating over shared boards, and delegating subtasks bidirectionally across teams.

Knowledge Vault Diagram

Knowledge Vault

Indexes unstructured files and wikilinks, parsing documents into pgvector embeddings and PostgreSQL search databases with bi-directional syncing.

Self-Evolution System Diagram

Self-Evolution

Details the background analysis process where agents review execution telemetry metrics to propose changes and safely update their own behavior.

Provider Adapter System Diagram

Provider Adapters

Standardizes 20+ cloud LLMs and custom local runners into one capability-routed interface, parsing outputs into common formats.

Domain Event Bus Diagram

Domain Event Bus

Processes typed execution events asynchronously in the background to handle consolidation updates (session summaries, knowledge graphs, analytics).

Deploy GoClaw Architecture

Configure GoClaw with PostgreSQL and pgvector for native production scale, or run locally via GoClaw Lite.