{
  "schema": "ai-architect-reactflow/v1",
  "pattern": "in-product-copilot",
  "provider": "gcp",
  "nodes": [
    {
      "id": "tenant-user",
      "type": "architecture",
      "position": {
        "x": 40,
        "y": 220
      },
      "data": {
        "label": "Tenant user",
        "role": "user",
        "layer": "people",
        "detail": "Works in the product; opens the copilot in context.",
        "dataClass": "tenant",
        "service": "Person",
        "serviceId": null,
        "docs": null,
        "officialIcon": null
      }
    },
    {
      "id": "product",
      "type": "architecture",
      "position": {
        "x": 340,
        "y": 220
      },
      "data": {
        "label": "Product UI with copilot panel",
        "role": "experience",
        "layer": "people",
        "detail": "Streams answers; shows proposed actions with a diff.",
        "dataClass": "tenant",
        "service": "Cloud Run",
        "serviceId": "gcp.cloud-run",
        "docs": "https://cloud.google.com/run",
        "officialIcon": "cloud_run"
      }
    },
    {
      "id": "edge",
      "type": "architecture",
      "position": {
        "x": 340,
        "y": 40
      },
      "data": {
        "label": "Edge protection",
        "role": "edge",
        "layer": "control",
        "detail": "Per-tenant rate limits and abuse controls.",
        "dataClass": "operational",
        "service": "Cloud Armor + Load Balancing",
        "serviceId": "gcp.cloud-armor",
        "docs": "https://cloud.google.com/security/products/armor",
        "officialIcon": null
      }
    },
    {
      "id": "identity",
      "type": "architecture",
      "position": {
        "x": 640,
        "y": 40
      },
      "data": {
        "label": "Tenant identity",
        "role": "identity",
        "layer": "control",
        "detail": "Session with tenant ID and role claims.",
        "dataClass": "identity",
        "service": "Identity Platform",
        "serviceId": "gcp.identity-platform",
        "docs": "https://cloud.google.com/security/products/identity-platform",
        "officialIcon": null
      }
    },
    {
      "id": "copilot-api",
      "type": "architecture",
      "position": {
        "x": 640,
        "y": 220
      },
      "data": {
        "label": "Copilot API",
        "role": "api",
        "layer": "control",
        "detail": "Resolves tenant scope; refuses calls without it.",
        "dataClass": "tenant",
        "service": "Cloud Run",
        "serviceId": "gcp.cloud-run",
        "docs": "https://cloud.google.com/run",
        "officialIcon": "cloud_run"
      }
    },
    {
      "id": "gateway",
      "type": "architecture",
      "position": {
        "x": 940,
        "y": 40
      },
      "data": {
        "label": "Model gateway",
        "role": "gateway",
        "layer": "control",
        "detail": "Per-tenant budget, cache key includes tenant ID.",
        "dataClass": "tenant",
        "service": "Apigee (AI gateway policies)",
        "serviceId": "gcp.apigee",
        "docs": "https://cloud.google.com/apigee",
        "officialIcon": null
      }
    },
    {
      "id": "model",
      "type": "architecture",
      "position": {
        "x": 1240,
        "y": 40
      },
      "data": {
        "label": "Assistant model",
        "role": "model",
        "layer": "intelligence",
        "detail": "Fast model for answers; larger model for complex actions.",
        "dataClass": "tenant",
        "service": "Gemini 3.8 Flash (Agent Platform)",
        "serviceId": "gcp.gemini",
        "docs": "https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/guides/gemini-3-8-flash",
        "officialIcon": "vertexai"
      }
    },
    {
      "id": "tenant-index",
      "type": "architecture",
      "position": {
        "x": 940,
        "y": 400
      },
      "data": {
        "label": "Tenant-partitioned index",
        "role": "retrieval",
        "layer": "knowledge",
        "detail": "Namespace per tenant; no cross-tenant query path.",
        "dataClass": "tenant",
        "service": "AlloyDB for PostgreSQL",
        "serviceId": "gcp.alloydb",
        "docs": "https://cloud.google.com/alloydb",
        "officialIcon": null
      }
    },
    {
      "id": "actions",
      "type": "architecture",
      "position": {
        "x": 940,
        "y": 220
      },
      "data": {
        "label": "Product actions",
        "role": "tools",
        "layer": "intelligence",
        "detail": "Typed, reversible operations; writes need user confirmation.",
        "dataClass": "tenant",
        "service": "MCP server on Cloud Run",
        "serviceId": "gcp.cloud-run-mcp",
        "docs": "https://cloud.google.com/run/docs/host-mcp-servers",
        "officialIcon": "cloud_run"
      }
    },
    {
      "id": "app-db",
      "type": "architecture",
      "position": {
        "x": 1240,
        "y": 220
      },
      "data": {
        "label": "Product database",
        "role": "store",
        "layer": "knowledge",
        "detail": "Tenant data with row-level security.",
        "dataClass": "tenant",
        "service": "AlloyDB for PostgreSQL",
        "serviceId": "gcp.alloydb",
        "docs": "https://cloud.google.com/alloydb",
        "officialIcon": null
      }
    },
    {
      "id": "meter",
      "type": "architecture",
      "position": {
        "x": 1240,
        "y": 400
      },
      "data": {
        "label": "Usage meter",
        "role": "analytics",
        "layer": "knowledge",
        "detail": "Tokens and actions per tenant, exported to billing.",
        "dataClass": "operational",
        "service": "BigQuery + Looker Studio",
        "serviceId": "gcp.bigquery",
        "docs": "https://cloud.google.com/bigquery",
        "officialIcon": null
      }
    },
    {
      "id": "traces",
      "type": "architecture",
      "position": {
        "x": 1540,
        "y": 40
      },
      "data": {
        "label": "Traces",
        "role": "observability",
        "layer": "assurance",
        "detail": "Per-tenant latency, errors, refusals.",
        "dataClass": "operational",
        "service": "Cloud Logging, Monitoring, Trace",
        "serviceId": "gcp.observability",
        "docs": "https://cloud.google.com/products/observability",
        "officialIcon": null
      }
    },
    {
      "id": "evals",
      "type": "architecture",
      "position": {
        "x": 1540,
        "y": 220
      },
      "data": {
        "label": "Release evals",
        "role": "evals",
        "layer": "assurance",
        "detail": "Task set per feature plus cross-tenant probes.",
        "dataClass": "internal",
        "service": "Evaluation service (Agent Platform)",
        "serviceId": "gcp.evaluation",
        "docs": "https://docs.cloud.google.com/gemini-enterprise-agent-platform",
        "officialIcon": "vertexai"
      }
    }
  ],
  "edges": [
    {
      "id": "open",
      "source": "tenant-user",
      "target": "product",
      "label": "Question in context",
      "type": "smoothstep",
      "animated": true,
      "data": {
        "kind": "data",
        "dataClass": "tenant"
      }
    },
    {
      "id": "protect",
      "source": "product",
      "target": "edge",
      "label": "Tenant rate limits",
      "type": "smoothstep",
      "animated": false,
      "data": {
        "kind": "control",
        "dataClass": "operational"
      }
    },
    {
      "id": "send",
      "source": "product",
      "target": "copilot-api",
      "label": "Question and screen context",
      "type": "smoothstep",
      "animated": true,
      "data": {
        "kind": "data",
        "dataClass": "tenant"
      }
    },
    {
      "id": "scope",
      "source": "copilot-api",
      "target": "identity",
      "label": "Resolve tenant from session",
      "type": "smoothstep",
      "animated": false,
      "data": {
        "kind": "control",
        "dataClass": "identity"
      }
    },
    {
      "id": "retrieve",
      "source": "copilot-api",
      "target": "tenant-index",
      "label": "Tenant namespace query",
      "type": "smoothstep",
      "animated": true,
      "data": {
        "kind": "data",
        "dataClass": "tenant"
      }
    },
    {
      "id": "ask-model",
      "source": "copilot-api",
      "target": "gateway",
      "label": "Prompt tagged with tenant",
      "type": "smoothstep",
      "animated": true,
      "data": {
        "kind": "data",
        "dataClass": "tenant"
      }
    },
    {
      "id": "infer",
      "source": "gateway",
      "target": "model",
      "label": "Model call",
      "type": "smoothstep",
      "animated": true,
      "data": {
        "kind": "data",
        "dataClass": "tenant"
      }
    },
    {
      "id": "propose",
      "source": "copilot-api",
      "target": "actions",
      "label": "Proposed action (dry run)",
      "type": "smoothstep",
      "animated": true,
      "data": {
        "kind": "data",
        "dataClass": "tenant"
      }
    },
    {
      "id": "apply",
      "source": "actions",
      "target": "app-db",
      "label": "Confirmed write with undo token",
      "type": "smoothstep",
      "animated": true,
      "data": {
        "kind": "data",
        "dataClass": "tenant"
      }
    },
    {
      "id": "meter-usage",
      "source": "gateway",
      "target": "meter",
      "label": "Tokens per tenant",
      "type": "smoothstep",
      "animated": false,
      "data": {
        "kind": "telemetry",
        "dataClass": "operational"
      }
    },
    {
      "id": "telemetry",
      "source": "copilot-api",
      "target": "traces",
      "label": "Latency and refusals",
      "type": "smoothstep",
      "animated": false,
      "data": {
        "kind": "telemetry",
        "dataClass": "operational"
      }
    },
    {
      "id": "probe",
      "source": "evals",
      "target": "copilot-api",
      "label": "Cross-tenant probes per release",
      "type": "smoothstep",
      "animated": false,
      "data": {
        "kind": "control",
        "dataClass": "internal"
      }
    }
  ],
  "viewport": {
    "x": 0,
    "y": 0,
    "zoom": 1
  }
}
