Skip to main content

master plan target architecture

Target Architecture — Three Trust Zones

Last Updated: 2026-02-16 Status: Approved Author: Thomas Scola

Overview

The Bluefly.io Agent Platform operates across three trust zones with strict boundaries. Internal agents stay on trusted infrastructure. External/social agents run in sandboxed environments. Communication happens only through authenticated gateways.

Architecture Diagram

┌─────────────────────────────────────────────────────────────────────────┐
│                         TRUST ZONE: GITLAB                              │
│                                                                         │
│  GitLab Ultimate Instance                                               │
│  ┌──────────────┐ ┌──────────────┐ ┌─────────────────────────────────┐ │
│  │  Duo Agentic │ │  AI Catalog  │ │  Issues / MRs / Pipelines      │ │
│  │    Chat      │ │  (agents +   │ │  (@mention triggers)           │ │
│  │              │ │   flows)     │ │                                 │ │
│  └──────┬───────┘ └──────┬───────┘ └──────────────┬──────────────────┘ │
│         │                │                         │                    │
│    Custom Agents    Custom Flows           External Agents              │
│    (Vector 1)       (Vector 4)             (Vector 2)                   │
│         │                │                         │                    │
│         └────────┬───────┘                         │                    │
│                  │                                 │                    │
│            MCP Client ◄──────── Vector 3 ──────────┘                   │
│            (connects to external MCP servers)                           │
│                  │                                                      │
└──────────────────┼──────────────────────────────────────────────────────┘
                   │
          Tailscale (encrypted)
                   │
    ┌──────────────┼──────────────────────────────────┐
    │              │                                   │
    ▼              ▼                                   ▼
┌─────────────┐ ┌──────────────────┐ ┌──────────────────────────┐
│ TRUST ZONE: │ │ TRUST ZONE:      │ │ TRUST ZONE:              │
│ INTERNAL    │ │ OPENCLAW (DMZ)   │ │ SANDBOX (UNTRUSTED)      │
│             │ │                  │ │                          │
│ Synology NAS│ │ Hetzner CX32    │ │ Oracle Cloud Instance 2  │
│ Oracle #1   │ │                  │ │                          │
│             │ │ OpenClaw Gateway │ │ external-gateway :5000   │
│ MCP Servers │ │ Custom Skills    │ │ moltbook-agents          │
│ LiteLLM     │ │ Telegram/Discord │ │   :4001-4003             │
│ MinIO       │ │ MCP to GitLab    │ │ openclaw-bridge :4010    │
│ Qdrant      │ │ MCP to NAS       │ │ npm-monitor              │
│ PostgreSQL  │ │                  │ │                          │
│ Redis       │ │ Connects via     │ │ OWN API keys             │
│ k3s+kagent  │ │ Tailscale to     │ │ NO NAS access            │
│             │ │ NAS services     │ │ Gateway port 5000 ONLY   │
└─────────────┘ └──────────────────┘ └──────────────────────────┘

Trust Zone Rules

ZoneAccess LevelWhat Lives Here
InternalFull NAS, all DBs, all secretsOSSA core agents, compliance engine, agent mesh, observability
OpenClaw DMZNAS MCP servers + LiteLLM via Tailscale, no direct DBOpenClaw gateway, custom skills, Telegram/Discord bots
SandboxGateway port 5000 only, own API keysMoltBook social agents, npm-monitor, external bridges

Tier Model

Tier 1: platform-agents/              → Agent manifests (YAML) — INTERNAL ONLY
Tier 2: common_npm/agent-*            → Infrastructure packages (TypeScript)
Tier 2: duo-agent-platform/           → GitLab Duo integration
Tier 3: gitlab-agent_ossa/            → Platform implementation (Go)
Tier 4: openclaw-bluefly/             → Agent runtime & skills (DMZ)
Tier S: agent-social/                 → Social/external agents (SANDBOX)

Port Allocation

RangePurposeZone
3000-3015Agent services (brain, chat, mesh, router, tracer)Internal
4000LiteLLM gatewayInternal
4001-4003MoltBook social agentsSandbox
4010MoltBook A2A Bridge / OpenClaw BridgeSandbox
5000External Gateway (sandbox ↔ internal)Sandbox
5000-5003ML modelsInternal
5432PostgreSQLInternal
6333Qdrant vector DBInternal
6379RedisInternal
9000MinIO S3Internal
9090PrometheusInternal
27017MongoDBInternal

Cost Estimates

ItemMonthly CostNotes
GitLab Ultimate (included)$024 credits/user/month
On-demand Duo credits$50-200External agent runs, complex flows
Hetzner CX32 (OpenClaw)~$204 vCPU, 8 GB RAM
Oracle Free Tier #2 (Sandbox)$0ARM instance, always-free tier
LLM API — Sonnet (custom agents)$50-150Via LiteLLM gateway
LLM API — Opus (builder agent)$100-300Heavy-duty code generation
Anthropic API key (sandbox)$20-50Social agent content generation
Total$240-720/moScales with usage

Risk Register

RiskImpactLikelihoodMitigation
Social agent compromise leaks internal secretsCriticalMediumSandbox isolation, separate API keys, Tailscale ACLs
OpenClaw skill marketplace malwareHighLowOnly install vetted skills, sandbox deployment, no direct DB access
GitLab Duo credit overrunMediumMediumMonitor credit usage, set alerts at 80% threshold
MCP server becomes single point of failureMediumLowHealth checks, Docker restart policies, graceful degradation
External agent creates bad commitsMediumMediumAGENTS.md conventions, MR-only workflow, human review required
Tailscale ACL misconfigurationCriticalLowTest ACLs before deploying sandbox, audit quarterly