AI Assistant Marketplace Technical Architecture: Protocols, Runtime, and Governance

    This article breaks down the technical architecture behind AI assistant marketplaces, explaining why the ecosystem evolved from isolated chat windows to extensible runtime environments. It covers the five-layer platform architecture, the role of open protocols such as the Model Context Protocol, the progression from inline previews to embedded windows and full-screen apps, and the distinct responsibilities of connectors versus plugins. Readers will also find practical guidance on context engineering, permission and governance baselines, and a step-by-step path for enterprise adoption.

    1. From Isolated Chat to Marketplace: Why the Shift Was Inevitable

    Early AI assistants shared a structural limitation: their capabilities were locked inside the chat window. Users asked a question, the model answered, and results came back as text. Any data from external systems had to be copied into the context first, and actions still had to be completed in the original system. In this mode, the assistant was little more than a smarter search box and could not own an end-to-end workflow.

    A marketplace is fundamentally an upgrade in how capabilities are distributed and integrated. It turns the assistant from a single model service into a runtime environment that can host third-party applications. It addresses three core problems:

    1. Capability discovery: How users learn what the assistant can do and which capabilities are extensible.
    2. Capability integration: How third-party systems expose data and actions in a standardized way.
    3. Capability orchestration: How the model selects the right tools and chains multi-step tasks when multiple applications coexist.

    Understanding these three layers explains why “connectors plus plugins” became a common industry approach rather than a simple pile of features.

    2. The Layered Platform Architecture

    A mature marketplace platform can typically be abstracted into five layers:

    • Host: The AI assistant interface itself, responsible for session management, rendering, input/output, and lifecycle scheduling.
    • Protocol: Defines the communication contract between the host and external applications, including capability declarations, invocation semantics, and resource references.
    • Registry: A metadata repository for applications and connectors, including name, description, permission declarations, version, and available regions.
    • Runtime: The sandbox environment that actually executes third-party application code or renders its interface, involving isolation, resource quotas, and network egress control.
    • Governance: Identity authentication, authorization scopes, audit logs, quotas and rate limiting, and content safety policies.

    The protocol layer is the technical dividing line. The industry has gradually converged on open extension approaches such as the Model Context Protocol: the application side declares the tools, resources, and prompt templates it exposes, and the host side discovers and invokes them using unified semantics. The value of an open protocol is decoupling—the same application does not need separate adaptations for every AI host, and the host does not need hard-coded integration code for every application.

    An illustrative capability declaration structure (pseudocode, expressing semantics only, not any specific product interface):

    1. {
    2. "name": "crm_connector",
    3. "version": "1.0.0",
    4. "capabilities": {
    5. "tools": [
    6. { "name": "search_account", "inputSchema": { "type": "object" } },
    7. { "name": "create_opportunity", "inputSchema": { "type": "object" } }
    8. ],
    9. "resources": ["report://quarterly-pipeline"],
    10. "ui": { "mode": "embedded_window", "permissions": ["read", "write"] }
    11. },
    12. "auth": { "type": "oauth2", "scopes": ["crm.read", "crm.write"] }
    13. }

    3. Interaction Evolution: From In-Conversation Preview to Full Application Runtime

    The key change is that connectors evolved from “small previews inside the conversation” into applications that can open fully—even full-screen—within the assistant interface. In engineering terms, this is not about enlarging the UI; it is a migration of runtime location and the trust model.

    Stage 1: Inline Preview
    Application output is confined to a card or embedded block with limited size and weak interactivity. It is essentially content rendering. The advantage is a small attack surface; the drawback is that it can hardly support real business operations.

    Stage 2: Embedded Window
    The application gets its own viewport and can include forms, tables, charts, and local state. New technical constraints become mandatory:

    • Sandbox isolation: The third-party interface runs in a separate context and communicates with the host through a restricted message channel instead of directly accessing the host DOM or session objects.
    • Least capability: What the window can read and write is determined by explicit authorization, and the model can only act on “content already presented in the window,” preventing unauthorized operations on invisible data.
    • State ownership: Content being edited belongs to application-side state, and the host holds only a reference, preventing data loss when the session is rebuilt.

    Stage 3: Full-screen Mode
    The application approaches a native experience, and users no longer need to switch between multiple tools. The cost is significantly higher governance requirements: stronger single sign-on, finer-grained auditing, and clear exit and reclamation mechanisms.

    A simplified host–application message protocol example:

    1. // The host sends context and action requests to the application
    2. host.postMessage({
    3. type: "context.update",
    4. payload: { selection: { rows: 128 }, locale: "en-US" }
    5. }, appOrigin);
    6. // The application can only request authorized actions; the host performs a second check
    7. window.addEventListener("message", async (e) => {
    8. if (e.origin !== expectedOrigin) return; // origin verification
    9. if (!allowedActions.has(e.data.action)) return; // action allowlist
    10. const result = await policyCheck(e.data); // permission and audit
    11. if (!result.ok) return reply({ error: "forbidden" });
    12. reply(await executor.run(e.data));
    13. });

    4. Plugins and Connectors: A Division of Responsibilities

    In practice, connectors and plugins serve different purposes, and mixing them leads to architectural confusion:

    • Connector: A bidirectional channel for data and systems, responsible for reading business objects and writing back changes, emphasizing identity pass-through and field mapping.
    • Plugin: A package for tasks and skills that bundles a class of high-frequency workflows (such as sales preparation, financial analysis, or HR administration) into reusable capabilities, and can internally orchestrate multiple connector calls.

    Enterprise-grade plugins typically need templated tasks, parameter validation, failure retries and idempotency, explainable results (citing source fields), and human confirmation checkpoints. A write plugin without idempotency design can easily produce duplicate records when the model retries, which is one of the most common incidents during rollout.

    5. Context Engineering: Helping the Model Understand Application State

    Once applications run inside windows, a new challenge is context alignment. The model needs to know what the current window displays, which data the user has selected, and which fields are writable. Viable practices include:

    1. Structured summaries first: Provide field-level summaries to the model instead of raw full-table data to control token overhead.
    2. On-demand fetching: Give the schema and statistics first, then fetch details once the model decides, avoiding loading a large table all at once.
    3. Reference instead of copy: Pass long documents as resource identifiers and let the model read fragments on demand.
    4. Pre-action validation: Read back key fields before writing to prevent decisions based on a stale view.
    1. Recommended context assembly order
    2. System constraints → application capability list → structured summary of the current window → user selection scope → key historical conclusions → available actions and permissions

    6. Security, Permissions, and Governance

    The biggest risk of an open ecosystem is permission sprawl. A recommended governance baseline:

    • Least privilege and explicit authorization: Each connector declares the scopes it needs, and users can review and revoke them item by item.
    • Read/write separation: Default to read-only; write operations require a second confirmation or policy approval.
    • End-to-end auditing: Log the caller, application version, parameter summary, and return status; send logs to a centralized logging service with a defined retention period.
    • Sandbox and egress control: Restrict network destinations for third-party runtime environments and prohibit sensitive data from leaving the domain.
    • Supply chain verification: Application signing, version rollback, canary releases, and abnormal circuit breaking.
    • Data boundaries: Define which data may enter the model context, and mask or tokenize sensitive fields.

    7. A Practical Path for Enterprise Adoption

    1. Narrow the scenarios: Start with high-frequency, low-risk, measurable tasks such as report aggregation, ticket dispatch, and document organization.
    2. Inventory capabilities: Assess the interface maturity of systems to be integrated, and prioritize systems with standard authentication capabilities.
    3. Build a protocol adaptation layer: Create a unified internal adaptation layer that hides differences across systems and exposes consistent tool semantics upward.
    4. Build observability: Integrate monitoring, alerting, and tracing, and establish baselines for call success rate, latency, and human takeover rate.
    5. Canary rollout and feedback loop: Run a small-scale trial, collect failure samples, and continuously refine tool descriptions and parameter constraints—tool description quality often affects success rate more than model capability.

    8. Conclusion

    The technical core of a marketplace-style platform is not “more integrations” but the product of three things: standardized protocols + an isolated runtime + fine-grained governance. The shift in interaction from in-conversation previews to full application runtime essentially turns the assistant into a programmable workbench. Whether it can truly be deployed depends on clear permission boundaries, controllable context, and idempotent, auditable write operations. In general engineering practices on cloud platforms such as Baidu AI Cloud, foundational capabilities like container platforms, object storage, message queues, and log monitoring are also key foundations for keeping such open integration systems running reliably.