Skip to content

GoClaw Architecture

The runtime that powers every AgentBrain agent. Three primary components: multi-tenant data layer, deterministic agent loop, and provider / channel abstraction.

Component Map

flowchart LR
  subgraph Data Layer
    PG[(Multi-tenant PostgreSQL)]
    VS[(pgvector store)]
  end
  subgraph Runtime
    SCH[Scheduler]
    LOOP[8-stage agent loop]
    SAND[Tool sandbox]
    MEM[Memory manager]
  end
  subgraph Adapters
    LLM[20+ LLM providers]
    CH[7 messaging channels]
  end
  SCH --> LOOP
  LOOP --> SAND
  LOOP --> MEM
  LOOP --> LLM
  LOOP --> CH
  MEM --> PG
  MEM --> VS

Multi-tenant Data Layer

  • Isolated PostgreSQL schemas per tenant
  • pgvector store for semantic search
  • Zero data leakage between workloads
  • Encrypted at rest with AES-256-GCM

8-Stage Deterministic Agent Loop

The loop is the core abstraction. Every call passes through these stages:

  1. Plan: decide which tools or sub-agents to call
  2. Tool select: pick the next tool from the allowed set under RBAC
  3. Tool call: execute inside the sandbox
  4. Result capture: persist tool output
  5. Memory update: extract durable facts into agent memory
  6. Reflect: evaluate progress against the goal
  7. Continue or halt: decide whether to loop again
  8. Audit emit: write a log entry covering the full step

Full replay is supported: a stored run can be re-executed deterministically.

Tool Sandbox

  • Each tool runs in an isolated execution context
  • Network access is governed by allowlists
  • File system access is scoped to the tool's working directory
  • Tool outputs are signed and stored for audit

Memory Manager

Two memory surfaces:

SurfaceLifetimeStorage
Working memoryPer runIn-process
Durable memoryCross-runPostgreSQL + pgvector

LLM Provider Abstraction

20+ providers behind a common interface. Customers bring their own keys for:

  • OpenAI (GPT family)
  • Anthropic (Claude family)
  • Google (Gemini family)
  • Azure OpenAI
  • Open-source models via local inference: Llama, Qwen, DeepSeek

The provider is selected per agent or per call, with cost and latency budgets enforced by the AgentBrain layer.

Channel Abstraction

7 channels behind a common message interface:

  • Slack
  • Microsoft Teams
  • LINE
  • Zalo
  • WhatsApp
  • Web
  • REST API + Webhook