Skip to main content

Architecture Specifications

The 16 architecture blueprints define what each structural component of a Weblisk deployment is, what it's responsible for, and how it interacts with everything else. These are the building blocks — protocol says how things talk, architecture says what the things are.

Architecture blueprints don't prescribe implementation details — they define responsibilities, interfaces, and constraints. A conforming orchestrator in Go and one in Rust must behave identically from the outside, even though their internals differ completely.

Orchestrator

The orchestrator is the trust anchor of every deployment. It doesn't execute business logic — it manages identity, registration, routing, discovery, and the audit trail. Every agent registers with the orchestrator. Every task routes through it. Every capability grant originates from it.

Responsibilities

Endpoints

EndpointPurpose
POST /v1/registerAgent registration — issues auth token
DELETE /v1/registerAgent deregistration
POST /v1/taskTask submission and routing
POST /v1/channelBroker agent-to-agent channel
GET /v1/servicesCurrent service directory
GET /v1/healthOrchestrator health status
GET /v1/auditAppend-only audit log
GET/POST /v1/strategyBusiness strategy management
GET/POST /v1/contextEntity context (company, project)
GET /v1/observationsAgent observation history
GET/POST /v1/approveApproval queue management

What It Does NOT Do


Domain Controller

Domain controllers are business logic directors. They don't do the work themselves — they decompose complex requests into multi-agent workflows, coordinate execution order, handle failure cases, and aggregate results.

Responsibilities

Domain vs. Agent

AspectDomain ControllerWork Agent
RoleDirector — orchestrates othersExecutor — does the actual work
LogicWorkflow coordination, routingDomain-specific computation
Data accessReads service directory, forwards contextReads/writes domain data
Capabilitiesworkflow:executeSpecific: file:read, llm:chat, etc.
ExampleSEO domain controllerSEO analyzer, meta writer, sitemap generator

Workflow Definition

Domain workflow declaration
workflows:
  full-audit:
    trigger: manual
    steps:
      - id: analyze
        agent: seo-analyzer
        inputs: { html_files: "$input.files" }
      - id: check-a11y
        agent: a11y-checker
        inputs: { html_files: "$input.files" }
        parallel: true         # Runs alongside 'analyze'
      - id: generate-fixes
        agent: seo-writer
        depends_on: [analyze, check-a11y]
        inputs:
          seo_report: "$steps.analyze.output"
          a11y_report: "$steps.check-a11y.output"
      - id: approve
        type: approval_gate
        depends_on: [generate-fixes]

Agent Base

The agent base blueprint defines the minimal contract every agent must satisfy — 5 standard endpoints, capability declaration, pub/sub integration, and operational behaviour (retry, circuit breaker, health reporting).

Required Endpoints

EndpointAuthPurpose
POST /v1/describeNoReturn AgentManifest — identity, capabilities, I/O schema
POST /v1/executeYesExecute a task, return signed TaskResult
GET /v1/healthNoHealth check with metrics
POST /v1/messageYesReceive agent-to-agent messages
POST /v1/servicesYesAccept service directory updates

Agent Types

Operational Behaviour


Application Gateway

The application gateway is the end-user edge — it sits between external clients (browsers, mobile apps, third-party services) and the internal agent network. It handles authentication, authorization, rate limiting, and request mediation.

Responsibilities

Request Flow

Gateway request lifecycle
Client request
  → Rate limiter (429 if exceeded)
  → Authentication (401 if invalid)
  → ABAC policy evaluation (403 if denied)
  → Route resolution (404 if unmapped)
  → Request mediation (transform to TaskRequest)
  → Orchestrator /v1/task submission
  → Agent execution
  → Response mediation (transform from TaskResult)
  → Client response

Admin Gateway

The admin gateway is a completely separate entry point for platform operators. It runs on a different port (or network), uses different authentication, and enforces stricter controls than the application gateway.

Security Model

Admin Operations

CategoryOperationsApproval
MonitoringView health, logs, metrics, audit trailNone
ConfigurationUpdate policies, rate limits, CORS rulesNone
Agent managementForce-deregister agent, restart, update4-eyes
SecurityRevoke tokens, rotate keys, block IPs4-eyes
DataPurge audit logs, delete agent storage4-eyes + superadmin

Client Architecture

The client blueprint defines how external consumers (browsers, mobile apps, CLI tools, third-party services) interact with the platform — what they can see, what they can do, and what data boundaries apply.

Client Taxonomy

Client TypeTrust LevelSession ModelData Access
Browser (SPA)LowSession cookie or short-lived JWTUser-scoped only
Mobile appLowRefresh token rotationUser-scoped only
Server-to-serverMediumAPI key with scoped permissionsScope-defined
Internal agentHighWLT token from orchestratorCapability-scoped
Federated hubVariableFederation tokenData boundary contract

Data Boundary Rules


Hub

The hub blueprint defines how a complete Weblisk deployment operates as a collaborative, discoverable unit — including marketplace participation, tiered access, commerce, and federation with other hubs.

Hub Capabilities

Deployment Model

Hub deployment structure
hub/
├── orchestrator         # Central coordination
├── gateway/             # Application edge (port 443)
├── admin/               # Operator access (port 8443, separate network)
├── agents/
│   ├── infrastructure/  # 11 system agents (always running)
│   └── domains/         # Business domain controllers + work agents
├── storage/             # Agent-local SQLite databases
├── config/
│   ├── global.yaml      # Hub-level configuration
│   ├── policies/        # ABAC, rate-limit, safety policies
│   └── federation/      # Peer definitions, data boundaries
└── keys/                # Ed25519 keypairs (orchestrator + agents)

Lifecycle

The lifecycle blueprint defines the continuous optimisation loop — how the system observes, recommends, and acts on improvements over time. This is what makes a Weblisk deployment adaptive rather than static.

The Loop

  1. Strategise: Operators define business strategies with measurable targets (via /v1/strategy)
  2. Observe: Agents emit observations during task execution — measurements, anomalies, opportunities
  3. Recommend: Agents propose changes based on observations and strategy alignment
  4. Approve: Recommendations with approval: required wait for human sign-off
  5. Execute: Approved recommendations are executed as new tasks
  6. Measure: Results feed back into observations — the loop continues

Strategy Structure

Strategy definition
{
  "name": "improve-core-web-vitals",
  "status": "active",
  "targets": [
    { "metric": "lcp", "target": "< 2.5s", "current": "3.1s" },
    { "metric": "cls", "target": "< 0.1", "current": "0.05" }
  ],
  "agents": ["perf-analyzer", "image-optimizer", "css-optimizer"],
  "review_frequency": "weekly"
}

Supporting Components

The remaining 8 architecture blueprints define cross-cutting system concerns — persistence, testing, observability, CLI, and security layers.

ComponentSpecification
storage Abstract persistence interface. Each agent owns its own SQLite database — no shared state. Schema migrations are versioned and agent-local. Backup and restore follow a standard protocol.
testing Conformance test suite specification. Every architecture component and pattern has a verification checklist. Implementations must pass the suite to claim compliance.
observability Structured JSON logging (levels, correlation IDs, rotation), distributed tracing via trace_id propagation, and Prometheus-compatible metrics endpoints. Every agent exposes /metrics.
cli CLI operations specification — interrogation commands (list agents, show health, query audit), management commands (register, deregister, approve), and code generation commands (domain create, generate).
data-security Transport security (TLS 1.3 minimum for production), scope-aware data boundaries (agent-local → domain → hub → federation), and opt-in data primitives (encryption at rest, field-level access control).
enforcement Non-bypassable boundary inspection. The enforcement layer sits between the gateway and agents — validating that every request complies with declared policies before reaching any agent. Includes rogue agent detection (anomalous capability requests, traffic patterns).
threat-model 5-boundary attack surface analysis: client→gateway, gateway→orchestrator, orchestrator→agent, agent→agent, hub→hub. Each boundary maps to OWASP categories with specific mitigations. Includes residual risk documentation.
change-management Versioning rules (semantic versioning for agents and blueprints), migration procedures (database schema, API versions), and deprecation lifecycle (announce → warn → sunset → remove with minimum 90-day windows).
These architecture blueprints define the structural contracts. For the implementation details of the server framework, see Server Framework. For the 38 cross-cutting patterns that these components inherit, see Pattern Specifications. For the runtime agents that implement these architectures, see the Agent Catalog.