Skip to content

Architecture

---

---
flowchart LR
    classDef service fill:#189659,stroke:#0C7744,stroke-width:4px
    classDef logical fill:#244590,stroke:#163272,stroke-width:4px
    classDef namespace fill:#5B460D,stroke:#D19A1A,stroke-width:4px,color:#FFFFFF
    classDef infra fill:#542192,stroke:#3F1473,stroke-width:4px
	classDef vault fill:#3A1010,stroke:#D32F2F,stroke-width:4px,color:#FFFFFF
    classDef deployment fill:#189659,stroke:#0C7744,stroke-width:4px,color:#FFFFFF
	AG["AI Gateway"]:::service
    A["Agent Harness<br>Opencode [1]"]


    subgraph Cluster

        subgraph authNs["Namespace"]
            direction LR
            node_7
        end

        subgraph gitopsNs["Namespace"]
            direction LR
            node_25
        end

        subgraph langNs["Namespace"]
            direction LR
            node_3:::service
        end

        subgraph orchNS["Namespace"]
            direction LR
            node_14
            node_10
            node_2
            node_12
            node_19
            node_13
        end
        
        subgraph otel["Namespace"]
            direction LR
            node_5
            node_20
            grafana
        end

        subgraph vaultNS["Namespace"]
            direction LR
            node_1["Vault"]:::service
        end

            subgraph MCPNS["Namespace: MCP"]
            direction LR
            
            KBM[KB connector MCP]
            node_18["Issues MCP<br>Server"]
            subgraph grafMCP["Grafana MCP Pod"]
                    direction LR
                    node_4["MCP Bridge<br>SuperGateway"]:::deployment
                    node_23["Grafana MCP<br>STDIO"]:::deployment
            end
        end


        subgraph agents["Namespace"]
            direction LR
            subgraph pod["Pod Instance"]
                A
            end
        end



        subgraph ai["Namespace: AI"]
            AG
            G
            node_21
            valkey:::service
            node_9
            KB
            node_3
            subgraph MP["Model Provider [4]"]
                direction LR
                OR
                GH
                BR
                node_22
            end
            MCP["MCP [3]"]:::logical
            
        end

    end


    subgraph External
        direction LR
        node_11["Chatops"]

        subgraph github["Github"]
            direction TB
            node_24
            node_16
            node_15
        end
    end





    


	OR[OpenRouter Low Risk]
	GH["Medium Risk<br>GitHub  Copilot"]
	BR[AWS Bedrock High Risk]

	
    KB["Knowledge Base [2]"]:::service
    G["Guardrails [6]"]:::logical
	
    node_3["AI Telemetry [5]"]
	node_5["Otel Collector<br>Tempo"]:::service
	grafana["Grafana"]:::service
	node_7["Auth"]:::service
	node_8["Platform Manager<br>Human"]
    node_9["AI Agent Control Plane<br>Coder [7]"]:::service
    node_10["Trigger Gateway<br>Custom [9]"]:::service
	node_12["Cron<br>Custom w BullMq"] 
	node_13["Notifier System"]
	node_2["Issue Tracker"]
    node_14["Orchestrator System<br>[8]"]:::service
	node_15["VCS<br>Github"]
	node_16["Github App"]:::logical
	
	node_19["Event Bridge"]:::infra
	node_20["Prometheus"]:::service
	node_21["Semantic Cache"]:::logical
	node_22["Local LLM<br>LLMKube"]

	node_24["Gitops Repository"]
	node_25["Gitops Provider"]:::infra
	

	A --> AG
	AG --"Proxies"--> MP
	MP --> OR
	MP --> GH
	MP --> BR

	KBM --> KB

	AG --> G
	node_1 --"Authenticates"--> A
	A --"AI Telemetry"--> node_3
	grafana --"Visualizes"--> node_5
	node_7 --"Authenticates"--> grafana
	node_8 --"Accesses"--> node_9
	node_7 --"Authenticates"--> node_9
	node_10 --"Triggers"--> node_9
	node_11 --"Webhook"--> node_10
	node_12 --"Webhook"--> node_10
	node_9 --"Produces event for"--> node_13
	node_13 --"Notifies"--> node_11
	node_2 --"Triggers"--> node_10
	node_14 --"Interacts with"--> node_2
	node_8 --"HTTPS"--> node_14
	node_7 --"Authenticates"--> node_14
	node_9 --"Instantiates"--> pod
	node_15 --> node_16
	node_16 --"Delegates access"--> node_1
	A --"Accesses"--> node_15
	AG --"proxies"--> MCP

	node_18 --"CRUD"--> node_2
	node_13 --> node_19
	node_8 --"HTTPS"--> node_3
	grafana --"Visualizes"--> node_20
	AG --> node_21
    node_21 --":6379"--> valkey
	AG --"HTTP"--> node_5
	MP --> node_22
	grafMCP --> grafana
	node_15 --> node_24
	node_24 --"Sync<br>HTTPS "--> node_25
	node_20 --> AG
	node_8 --"HTTPS"--> node_7
	node_20 --> A
	node_4 --> node_23
    MCP --> grafMCP
    MCP --> KBM
    MCP --> node_18

    subgraph legend["Legend"]
        direction TB
        legendLogical["Logical"]:::logical
        legendNamespace["Namespace"]:::namespace
        legendDeployment["Deployment<br>K8s Deployment | Server"]:::deployment
        legendInfra["Infra<br>General Infrastructure"]:::infra
    end


    style MCPNS fill:#5B460D,stroke:#D19A1A,stroke-width:4px,color:#FFFFFF
    style otel fill:#5B460D,stroke:#D19A1A,stroke-width:4px,color:#FFFFFF
    style vaultNS fill:#5B460D,stroke:#D19A1A,stroke-width:4px,color:#FFFFFF
    style orchNS fill:#5B460D,stroke:#D19A1A,stroke-width:4px,color:#FFFFFF
    style agents fill:#5B460D,stroke:#D19A1A,stroke-width:4px,color:#FFFFFF
    style authNs fill:#5B460D,stroke:#D19A1A,stroke-width:4px,color:#FFFFFF
    style gitopsNs fill:#5B460D,stroke:#D19A1A,stroke-width:4px,color:#FFFFFF
    style langNs fill:#5B460D,stroke:#D19A1A,stroke-width:4px,color:#FFFFFF
    style ai fill:#5B460D,stroke:#D19A1A,stroke-width:4px,color:#FFFFFF
    style grafMCP fill:#189659,stroke:#0C7744,stroke-width:4px,color:#FFFFFF

    
  1. [1] Agent Harness / Opencode The harness is the execution loop and tool mediation layer for the agent runtime. Links: Harness, OpenCode

  2. [2] Knowledge Base The knowledge base is the persistent retrieval surface used by agents for context and synthesis. Links: Knowledge Base

  3. [3] MCP MCP is the standardized interface used to expose tool and service capabilities to agents. Links: MCP

  4. [4] Model Provider Model providers host/serve foundational models and expose inference interfaces. Links: Foundational AI Model, Model Providers Index

  5. [5] AI Telemetry Telemetry supports evaluation, anomaly detection, and cost visibility, and should feed execution records. Links: Execution Ledger, Context Evaluation

  6. [6] Guardrails Guardrails express policy and control boundaries for autonomous behavior. Links: Controls, Guardrails Process

  7. [7] AI Agent Control Plane / Coder The control plane manages agent lifecycle and execution orchestration. Links: Agent, Agent Architecture

  8. [8] Orchestrator System / Paperclip The orchestrator coordinates cross-system workflows and issue-driven execution. Links: End-to-End Orchestration, Paperclip

  9. [9] Trigger Gateway Triggers and scheduled signals drive reinvocation, recovery, and continuous operation. Links: Orchestration Triggers, Minimal Bootstrap

  • AI Telemetry is responsible for evaluation, anomalous-response detection, and cost tracking.
  • Axioms define the core principles that this architecture should preserve.

MCP tools are deployed in a dedicated namespace to enforce network-policy boundaries and improve governance. They are historically renowned for poor security controls. They need to be locked down to make sure no requests can ingress to the MCP tool servers as well as locked down to interact to specific deployments etc on the egress.

  • Local MCP over STDIO should be limited to cases that require local interaction surfaces (for example, direct computer control).

Similar to the the MCP namespace, agents need to be controlled to prevent directly accessing resources they should not to limit the blast radius in the case that they are compromised. They should be limited to interacting with the AI gateway and limited external network resources. In the case that a human operator wants to ssh into a running agent we also want to limit their ability to access any other resource on the cluster indiscriminately.

It might be likely that agent namespaces are further broken up in the future to further restrict access as necessary.