# AI-Driven Generation: 3 Access Patterns
Gakaso supports three distinct ways design/diagram content gets generated by AI. As an external agent, it's important to understand which one *you* are, because it changes what you can/should do and what Gakaso does automatically on your behalf.
## The three patterns
### 1. External MCP agent connection (this is probably you)
A user's own locally-running AI coding agent (Claude Code, Cursor, or similar) connects to a Gakaso project directly over MCP using a project-scoped API key, and drives the canvas via MCP tool calls — creating components, importing UI, exporting code, and so on. This is the primary pattern this whole document set is written for. See `/mcp/overview.md` for the connection details and tool catalog.
### 2. "Gakaso AI" mode (server-side generation)
Inside the Gakaso web app's AI panel, a human can chat with "Gakaso AI," which is a **server-side** generation path: Gakaso's own backend calls a model on the human's behalf and applies the result to the canvas. This does not involve your local agent at all — it's a separate, Gakaso-hosted code path, invoked from the browser UI's AI tab.
Server-side generation in this mode applies Gakaso's internal design-quality judgment automatically — see "Design quality in Gakaso AI mode" below.
### 3. "My Agent" mode (client-side bridge to the user's own agent)
Also inside the AI panel, a human can switch to "My Agent" mode, which opens a WebSocket bridge from the browser to a locally-running agent process (configured by the user) instead of calling Gakaso's server-side model. This is a different transport from your typical MCP connection, but conceptually similar in spirit: the user's own agent, not Gakaso's backend, does the generation work. Credentials/API keys for this mode are managed client-side by the user and are not stored on Gakaso's servers.
The human can switch between "Gakaso AI" and "My Agent" mode at any time from the AI panel; each mode is a clean session (switching does not carry the conversation over), and there is no automatic fallback from one mode to the other — the human's choice of mode is respected as-is.
## Design quality in Gakaso AI mode
When generation happens through **Gakaso AI mode specifically** (the server-side path, #2 above), Gakaso automatically applies its own internal design-quality standards to the output — judgment about layout, visual hierarchy, typography, color, and related aesthetic concerns, drawing on a curated internal design-intelligence rubric. This happens transparently; the human doesn't need to ask for "make it look better," it's simply factored into how Gakaso AI mode generates.
This internal rubric is **not** part of what's exposed to you as an external agent (pattern #1) or to "My Agent" mode (pattern #3) — it's specific to Gakaso's own server-side generation code path and is not published. If you are operating as an external MCP agent and want to produce well-judged visual output yourself, the resource to use instead is the public `gakaso://manuals/design-principles` MCP resource — see `/design/diagram-intelligence.md` — which is a separate, openly-published set of design principles and review guidance intended specifically for external agents to consult.
## The Product Design Capsule (a different thing from the rubric above)
Separately from the internal rubric, every project can have a **Product Design Capsule** — a structured, per-project design brief (purpose, target users, aesthetic direction, token strategy, prohibited patterns, accessibility bar, and so on) that you read/write directly via `gakaso_get_design_capsule` / `gakaso_set_design_capsule`. Unlike the internal rubric, this is not proprietary or hidden from you — it's project-specific content that a human (or you) writes, and it's the most direct way to keep your own generation choices consistent with a project's established direction across sessions. See `/design/product-design-capsule.md` for the full schema and a recommended read-before-you-generate workflow.
## Practical implication for you
If a human says "use Gakaso AI to generate this" or toggles to that mode in the UI, that's happening independently of your MCP session — you don't need to (and can't) drive it. If instead the human wants *you* (their local agent) to do the generation work directly on the canvas, that's pattern #1, and you should use the MCP tool catalog in `/mcp/overview.md` plus the design-principles resource in `/design/diagram-intelligence.md` to do a good job of it.