integration-surface-design

Designs HTTP/SSE and embeddable-iframe agent surfaces as separate capability tiers.

Updated Aug 2, 2026
One-click install
npx skills add https://github.com/dperussina/function2agent --skill integration-surface-design-dperussina
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: integration-surface-design
Source: https://github.com/dperussina/function2agent/tree/main/.cursor/skills/integration-surface-design
Command: npx skills add https://github.com/dperussina/function2agent --skill integration-surface-design-dperussina

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Teams adding an embeddable chat widget or in-app assistant often reuse the server-to-server agent behind a browser iframe, which combines private data, untrusted user input, and egress into a single high-risk surface. This Skill enforces that HTTP/SSE and iframe delivery are separate product tiers with different capability sets, preventing designs that ship an anonymous public entry point to an agent holding production credentials. ## Core Features & Use Cases - Tier capability table: Defines which tools each surface may hold — shell and write tools for authenticated server-to-server callers, a read-mostly published subset for end-user iframes, and no write tools at all in anonymous tiers. - Session and identity design: Specifies RFC 8693 token exchange for authenticated end users, fixed minimum-authority identities for anonymous sessions, and short-lived audience-bound session tokens minted by the customer's backend. - Browser hardening checklist: Covers origin isolation, sandbox attributes, per-tenant CSP frame-ancestors, postMessage origin validation, and per-session cost caps with hard spend limits. - Use Case: When reviewing a proposal to embed the existing agent in a customer-facing support widget, use this Skill to reject shared-surface designs and produce a tier table where the iframe holds only a scoped session token and read-only tools. ## Quick Start Review my proposal to embed our server-to-server agent as a public chat iframe and produce the capability tier table for both surfaces.

Frequently Asked Questions about integration-surface-design

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I safely embed an AI agent in a customer-facing iframe?▼

Treat the iframe as a separate product tier from your server-to-server surface: remove shell and write tools entirely, publish only a read-mostly tool subset, and give the widget a short-lived audience-bound session token minted by the customer's backend. Never place resource-plane or model-plane credentials in the browser.

How should anonymous users authenticate to an embedded agent widget?▼

Anonymous sessions have no user identity to delegate, so RFC 8693 token exchange has nothing to act on. Assign a fixed, pre-declared minimum-authority identity with no user-data access, and rely on capability removal rather than output filtering as the mitigation.

Can I reuse my server-to-server agent behind a browser embed?▼

No — the two surfaces differ in caller identity, available authority, and whether an approval gate has an approver. Reusing the same agent ships the lethal trifecta of private data, untrusted input, and egress; design separate capability tiers instead.

Why are approval gates insufficient for write tools in anonymous widgets?▼

An approval gate requires an approver with authority, but in an anonymous iframe the end user is precisely the party whose authority is in question. Route end-user-initiated writes to the customer's own application, where the agent produces a proposal and the customer's authorization stack decides.

What browser-side controls does an embedded agent widget need?▼

Require a dedicated origin, a sandbox attribute without allow-same-origin alongside allow-scripts, per-tenant CSP frame-ancestors, strict postMessage origin and schema validation, and no tokens in URLs. These defend against browser-layer attacks but do nothing against prompt injection.

How do I prevent cost abuse on a public agent widget?▼

Enforce per-session token caps, per-IP and per-tenant rate limits, and a tenant-level daily spend ceiling that hard-stops rather than alerts. Without these, an anonymous widget functions as an open inference endpoint funded by the customer's model-plane credential.