{"slug":"architecture/PLATFORM_COMPONENT_SERVICE_AGENT_MAP","title":"Platform Component ↔ Service ↔ Agent Map","section":"architecture","sectionLabel":"Architecture","status":"superseded","type":"document","path":"architecture/PLATFORM_COMPONENT_SERVICE_AGENT_MAP.mdx","bytes":19034,"description":null,"updated":null,"source":"integratewise/Integratewise-docs-wiki","content":"\n> **Status:** Superseded implementation snapshot. Do not use as architecture authority.\n> The grounded replacement is\n> [`PLATFORM_CONTROL_SURFACE_MAPPING.md`](PLATFORM_CONTROL_SURFACE_MAPPING.md), subordinate to\n> [`INTEGRATEWISE_ARCHITECTURE.md`](INTEGRATEWISE_ARCHITECTURE.md).\n>\n> Historical wire map for the IntegrateWise control plane and workbench surfaces.\n> UI surfaces live in `apps/platform`. Reusable microfrontend components live in `packages/platform-mfe`.\n> Canonical backend services live in `services/`. Runtime agents live in `services/iw-agent-runtime`.\n> Route, API, service, and agent statements below are retained as dated lineage and may be planned rather than implemented.\n\n---\n\n## Legend\n\n| Column               | Meaning                                                                             |\n| -------------------- | ----------------------------------------------------------------------------------- |\n| **Surface**          | A user-facing page or control-plane view.                                           |\n| **Component**        | Primary React component / folder that owns the view.                                |\n| **API Routes**       | `apps/platform/app/api/v1/*` routes the surface should call (or already calls).     |\n| **Service Bindings** | Cloudflare Worker services the route proxies to.                                    |\n| **Agent**            | `services/iw-agent-runtime` Durable Object that participates in the surface's work. |\n| **Spine Entity**     | Adaptive Spine canonical entity type the surface primarily projects.                |\n\n---\n\n## 1. Workspace / Workbench Surfaces\n\nOperational surfaces the user interacts with inside the Workbench shell.\n\n| Surface             | Route(s)          | Component                                                                         | API Routes                                                                                   | Service Bindings                                        | Agent                                                                                                  | Spine Entity                  |\n| ------------------- | ----------------- | --------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ | ----------------------------- |\n| **Overview / Home** | `/`               | `app/(shell)/page.tsx`                                                            | `/api/v1/workspace/discovery`                                                                | `workflow`, `gateway`                                   | `TwinAgent`                                                                                            | `TimelineEvent`, `Capability` |\n| **My Work**         | `/my-work`        | `app/(shell)/my-work/page.tsx`                                                    | `/api/v1/tasks/*` (planned)                                                                  | `task-management`                                       | `CoworkerAgent`                                                                                        | `Task`                        |\n| **Communications**  | `/communications` | `app/(shell)/communications/page.tsx`                                             | `/api/v1/signals/*` (planned)                                                                | `signals`, `hermes`                                     | `TwinAgent`                                                                                            | `TimelineEvent`               |\n| **Workbench**       | `/workbench`      | `app/(shell)/workbench/page.tsx`, `components/workbench/*`                        | `/api/v1/spine?type=schema`, `/api/v1/capabilities/*`                                        | `spine`, `workflow`, `intelligence`                     | `TwinAgent`, `SchemaAgent`                                                                             | `Schema`, `Capability`        |\n| **Network Catalog** | `/network`        | `app/(shell)/network/page.tsx`, `components/network/*`                            | `/api/v1/marketplace/connectors`, `/api/v1/connectors`                                       | `integration-management-mcp`, `provider-management-mcp` | `DiscoveryAgent`                                                                                       | `Connector`, `Connection`     |\n| **MCP Pool**        | `/network/mcp`    | `app/(shell)/network/mcp/page.tsx`, `components/network/mcp-hub.tsx`              | `/api/v1/connectors/mcp-pool`                                                                | `mcp-pool`                                              | `DiscoveryAgent`                                                                                       | `Capability`                  |\n| **Marketplace**     | `/marketplace`    | `app/(shell)/marketplace/page.tsx`, `components/connectors/connector-catalog.tsx` | `GET /api/v1/workspace/marketplace-items?kind=*`, `POST /api/v1/workspace/marketplace-items` | `workflow`, `marketplace-installation`                  | `DiscoveryAgent`                                                                                       | `Connector`, `Capability`     |\n| **Governance**      | `/governance`     | `app/(shell)/governance/page.tsx`, `components/governance/*`                      | `/api/v1/workspace/governance/*` (planned)                                                   | `workflow`, `hermes`                                    | `TriageAgent`, `TwinAgent`                                                                             | `TimelineEvent`               |\n| **Approvals**       | `/approvals`      | `app/(shell)/approvals/page.tsx`, `components/approvals/*`                        | `/api/v1/workspace/approvals/*` (planned)                                                    | `workflow`                                              | `TriageAgent`, `TwinAgent`                                                                             | `TimelineEvent`               |\n| **Connectors**      | `/connectors`     | `app/(shell)/connectors/page.tsx`, `components/connectors/*`                      | `/api/v1/connections/*`, `/api/v1/connections/[provider]`                                    | `connector`, `provider-management-mcp`                  | `DiscoveryAgent`                                                                                       | `Connection`, `Connector`     |\n| **Agents**          | `/agents`         | `app/(shell)/agents/page.tsx`                                                     | `/api/v1/agents/*` (planned)                                                                 | `agent-registry`, `iw-agent-runtime`                    | `TwinAgent`, `CoworkerAgent`, `DiscoveryAgent`, `SchemaAgent`, `TriageAgent`, `AdaptiveAutotunerAgent` | `Capability`                  |\n| **Settings**        | `/settings`       | `app/(shell)/settings/page.tsx`, `components/settings/*`                          | `/api/v1/auth/session`, `/api/v1/keys/*`                                                     | `tenants`, `admin`, `billing`                           | `TwinAgent`                                                                                            | —                             |\n\n---\n\n## 2. Platform Control Plane Surfaces\n\nNew `/control/[surface]` admin views. These are operator-grade surfaces for the Platform Control Plane.\n\n| Surface ID      | Page                     | Console Component | API Routes                                                                            | Service Bindings                                                     | Agent                                                                                                  | Notes                                                            |\n| --------------- | ------------------------ | ----------------- | ------------------------------------------------------------------------------------- | -------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------- |\n| `overview`      | `/control/overview`      | `PlatformConsole` | `/api/v1/workspace/bootstrap`, `/api/v1/workspace/discovery`                          | `workflow`, `gateway`                                                | `TwinAgent`                                                                                            | Aggregate KPIs across all surfaces.                              |\n| `connectors`    | `/control/connectors`    | `PlatformConsole` | `/api/v1/connections/*`, `/api/v1/marketplace/connectors`                             | `connector`, `integration-management-mcp`, `provider-management-mcp` | `DiscoveryAgent`                                                                                       | Installed + available connectors.                                |\n| `marketplace`   | `/control/marketplace`   | `PlatformConsole` | `GET /api/v1/workspace/marketplace-items`, `POST /api/v1/workspace/marketplace-items` | `workflow`, `marketplace-installation`                               | `DiscoveryAgent`                                                                                       | Browse and publish packs / MCPs / plugins / connectors.          |\n| `mcp-servers`   | `/control/mcp-servers`   | `PlatformConsole` | `/api/v1/connectors/mcp-pool`, `/api/v1/capabilities`                                 | `mcp-pool`, `integration-management-mcp`                             | `DiscoveryAgent`                                                                                       | Tenant MCP pool registry.                                        |\n| `agents`        | `/control/agents`        | `PlatformConsole` | `/api/v1/agents/*` (planned)                                                          | `agent-registry`, `iw-agent-runtime`                                 | `TwinAgent`, `CoworkerAgent`, `DiscoveryAgent`, `SchemaAgent`, `TriageAgent`, `AdaptiveAutotunerAgent` | Surface all 6 agent types per `CONTEXT_TRANSFER_PLATFORM_UI.md`. |\n| `pipelines`     | `/control/pipelines`     | `PlatformConsole` | `/api/v1/pipelines/*` (planned)                                                       | `pipeline`, `loader`, `store`                                        | `AdaptiveAutotunerAgent`                                                                               | ETL and sync pipelines.                                          |\n| `automations`   | `/control/automations`   | `PlatformConsole` | `/api/v1/workflows/*` (planned)                                                       | `workflow`, `task-management`                                        | `CoworkerAgent`                                                                                        | Repeatable workflows.                                            |\n| `observability` | `/control/observability` | `PlatformConsole` | `/api/v1/telemetry/*` (planned)                                                       | `telemetry`, `signals`                                               | `AdaptiveAutotunerAgent`                                                                               | Health, metrics, logs.                                           |\n| `governance`    | `/control/governance`    | `PlatformConsole` | `/api/v1/workspace/governance/*` (planned)                                            | `workflow`, `hermes`                                                 | `TriageAgent`, `TwinAgent`                                                                             | Proposals, approvals, audit.                                     |\n| `settings`      | `/control/settings`      | `PlatformConsole` | `/api/v1/auth/session`, `/api/v1/keys/*`                                              | `tenants`, `admin`                                                   | `TwinAgent`                                                                                            | Tenant schema, policies, API keys.                               |\n| `organizations` | `/control/organizations` | `PlatformConsole` | `/api/v1/tenants/*` (planned)                                                         | `tenants`, `billing`                                                 | `TwinAgent`                                                                                            | Workspace switching, plans, members.                             |\n| `users`         | `/control/users`         | `PlatformConsole` | `/api/v1/auth/users/*` (planned)                                                      | `tenants`, `admin`                                                   | `TwinAgent`                                                                                            | Members, roles, invitations.                                     |\n\n---\n\n## 3. Runtime Agents\n\nAll agents live in `services/iw-agent-runtime` and are exposed via `/agents/:name/*` through `routeAgentRequest`.\n\n| Agent                      | Primary Responsibility                                                                  | Surfaces That Use It                     | Pipeline Stage        |\n| -------------------------- | --------------------------------------------------------------------------------------- | ---------------------------------------- | --------------------- |\n| **TwinAgent**              | Silent, non-authoritative cognitive participant; proposes, explains, requests approval. | All user surfaces                        | `THINK` / `APPROVE`   |\n| **DiscoveryAgent**         | Discover hosts, tools, schemas, connectors, MCP servers, capabilities.                  | Network, Marketplace, Connectors, Agents | `LOAD` / `NORMALIZE`  |\n| **SchemaAgent**            | Generate, migrate, validate tenant schemas and field mappings.                          | Workbench, Agents                        | `NORMALIZE` / `STORE` |\n| **TriageAgent**            | Route signals/intents; enforce governance gate before execution or writes.              | Governance, Approvals, Pipelines         | `THINK` → `APPROVE`   |\n| **CoworkerAgent**          | Execute assigned tasks and actions under human approval.                                | My Work, Automations, Agents             | `ACT`                 |\n| **AdaptiveAutotunerAgent** | Tune parameters, resource allocation, execution strategies from metrics.                | Observability, Pipelines, Agents         | `REPEAT`              |\n\n---\n\n## 4. Key Backend Services\n\n| Service                      | Capability Domain                                                                    | Primary Consumers                            |\n| ---------------------------- | ------------------------------------------------------------------------------------ | -------------------------------------------- |\n| `gateway`                    | Ingress, auth routing, request validation                                            | All surfaces                                 |\n| `workflow`                   | Workspace bootstrap, marketplace publication, HITL flows, approvals                  | Overview, Marketplace, Governance, Approvals |\n| `pipeline`                   | Canonical write pipeline, Spine writer                                               | Workbench, Pipelines                         |\n| `integration-management-mcp` | Connectors, schemas, sync, webhooks                                                  | Network, Connectors, MCP servers             |\n| `provider-management-mcp`    | OAuth apps, provider adapters, connections                                           | Network, Connectors, Settings                |\n| `task-management`            | Task scheduling, assignment, execution                                               | My Work, Automations                         |\n| `mcp-pool`                   | MCP registry, resolver, health, versioning                                           | Network / MCP, Agents                        |\n| `iw-agent-runtime`           | Durable Object agents (Twin, Discovery, Schema, Triage, Coworker, AdaptiveAutotuner) | All surfaces                                 |\n| `agent-registry`             | Agent metadata, discovery, lifecycle                                                 | Agents surface                               |\n| `spine`                      | Read-side catalog and projection cache                                               | Workbench, Network                           |\n| `tenant`                     | Tenant membership, roles, invitations                                                | Settings, Organizations, Users               |\n| `billing`                    | Plans, subscriptions, usage                                                          | Organizations, Settings                      |\n| `hermes`                     | Sync event routing                                                                   | Governance, Communications, Pipelines        |\n| `signals`                    | Signal ingestion, alerting                                                           | Communications, Observability                |\n| `telemetry`                  | Metrics, logs, traces                                                                | Observability                                |\n\n---\n\n## 5. Frozen Pipeline Reference\n\n```\nLOAD → NORMALIZE → STORE → THINK → APPROVE → ACT → REPEAT\n                          ↑                 ↑\n                   Store in Spine    Approve Twin's Action\n                   Ask your Twin     Assign your Twin\n```\n\n- **Agents participate only at `THINK`, `APPROVE`, `ACT`, `REPEAT`.**\n- **No agent writes directly to the Neon canonical DB.** Write intent flows: UI → `gateway` → `TriageAgent`/`workflow` → `pipeline` → canonical store.\n- **UI surfaces are projections over the Adaptive Spine**, not direct DB consumers.\n\n---\n\n## 6. Next-Wire Targets (priority order)\n\n1. **Marketplace surface** — wire `/control/marketplace` to `GET /api/v1/workspace/marketplace-items?kind=*`.\n2. **Overview surface** — wire `/control/overview` to `/api/v1/workspace/bootstrap` and `/api/v1/workspace/discovery`.\n3. **Agents surface** — add `/api/v1/agents/*` proxy and render the 6 runtime agents from `iw-agent-runtime`.\n4. **Governance surface** — attach approval queue endpoints through `workflow`.\n5. **Connectors surface** — proxy to `integration-management-mcp` and `provider-management-mcp`.\n"}