docs/architecture.md
- Source: docs/architecture.md
Imported Content
Architecture Overview
Core principles
- AgentField-first domain orchestration
- Workspace-per-client isolation
- Async-first workflows with machine-verifiable audit evidence
- GitOps promotion and immutable deployment manifests
- JWT-authenticated API access with role- and workspace-aware authorization
- Signed webhook callbacks with replay protection receipts
- Runtime configuration plane for platform/workspace controls via API + UI
- Durable outbox pipeline for telemetry-triggered automation
- No implicit workspace fallback in production paths
Runtime topology
apps/web: four-page IA only (Console,Ops,Portal,Admin Settings) with workspace-explicit URLs and in-page module tabs/queues/forms.apps/gateway: API gateway + orchestration edge- AgentField control plane: reasoner and skill execution backend (self-hosted in production)
- Background workers: outbox dispatcher and job processor
- Data services: PostgreSQL, Redis, NATS, object storage, OpenSearch
- Configuration services:
platform_settings,workspace_settings, encryptedruntime_secrets - Edge plane:
anchor-edge-agentdeployments on managed endpoints - Deployment control plane: app repo (
anchor-msp) + ops repo (anchor-msp-ops)
Local/dev profile only:
apps/agentfield-mockapps/status-mock
UI operating model (GA)
Console: primary PSA workspace with tabbed modules for CMDB, service delivery, financials, monitoring; includes list/detail/create/lifecycle controls and advanced JSON tools behind collapsible expert mode.Ops: NOC/SOC center with explicit queues (critical alerts, unassigned tickets, SLA risk, failed workflows, failed outbox/jobs), runtime health, and guided alert->ticket->asset/runbook->escalation workflows.Portal: invite-link session handoff (httpOnly cookie), client-scoped ticket/quote/invoice/KB flows, and permission-aware feedback for scoped access.Admin Settings: runtime policy forms, telemetry enrollment/token rotation, adapter secret metadata, and connectivity/test status surfaces.
Request flow
- User or automation calls gateway endpoint.
- Gateway verifies authentication, workspace scope, and idempotency headers.
- Gateway enqueues execution to AgentField and returns
executionId. - Agent skills perform deterministic side effects.
- Signed audit credential is persisted and emitted to evidence store.
- Completion event triggers webhook and state update.
Event pipeline
- Telemetry ingest persists batch to
telemetry_ingest_batches. - Routed actions are stored in
outbox_events. - Outbox worker dispatches actions to AgentField reasoners.
- Delivery status is tracked as
pending,processing,delivered, orfailed.
Tenancy model
- Dedicated workspace namespace per client.
- Dedicated DB schema per workspace.
- Secret references scoped to workspace context.
- Sensitive
CredentialRefpayloads envelope-encrypted at rest. - Policy checks enforce no cross-workspace reads/writes.