Choose the right interface
Route an agent request to deterministic HTTP generation, the Studio Browser API, or direct markdown documentation.
Glyphfield has three agent-facing interfaces. Choosing the correct one is the first correctness decision.
Routing rule
| Need | Use | Why |
|---|---|---|
| Discover tools, identities, shaders, surfaces, elements, schemas, or policies | HTTP discovery endpoints | Structured, cacheable, versioned data |
| Generate a slide, blog cover, partnership lockup, static background, element brief, or Design Lab source document | POST /api/generate | Deterministic validation and portable response |
| Render WebGL, Canvas, local fonts/files, Lottie, interactive placement, GIF, JPG, PNG, or MP4 | window.glyphfield.studio | Uses the authentic browser renderer and active project |
| Read one topic | /docs/<path>.md | Clean processed markdown for the exact page |
| Load the complete knowledge surface | /llms-full.txt | Concatenated current docs without scraping HTML |
| Find an unknown topic | /api/search or /api/catalog | Search prose or structured capabilities |
Best for source-controlled SVG, JSON briefs, repeatable requests, and initial Design Lab documents.
Best for everything that depends on the current canvas, WebGL, browser codecs, file objects, or visual verification.
Best for instructions, workflows, examples, edge cases, and exact source semantics.
The visual workspace remains the final evidence for placement, contrast, clipping, timing, and motion quality.
Default decision tree
- Read
/llms.txtand/api/agent. - Discover the exact tool or generator instead of inventing an ID.
- If
POST /api/generatefully expresses the result, use it. - If the result depends on Canvas, WebGL, browser codecs, local files, or visual placement, open
/studioand use the Browser API. - If HTTP returns an apply-ready
design-sequence, explicitly passresponse.documenttoapplySource; HTTP generation never mutates the open Studio by itself. - Inspect the canvas and export through the active tool.
- Treat the downloaded file or returned Blob—not a button click—as completion.
Examples
Static agenda slide
Use HTTP. The slide renderer is deterministic SVG and does not require an open project.
Live Gem Smoke poster
Use HTTP to create a design-sequence document, then use the browser to apply and export it. The server returns composition intent; the browser produces the authentic shader pixels.
Existing local project update
Use the Browser API. Read the open tool's source, apply the smallest change, and save/export in that project. A stateless request cannot infer which browser-local project the user meant.
Brand-element production brief
Use /api/elements to find the ID and POST /api/generate with kind: "element-brief". Use Studio only if the user also needs a visual proof or manual composition.
Never guess across boundaries
- A Code-drawer document is not automatically a
/api/generaterequest. - A discovery record is not a rendered artifact.
- An HTTP success does not mean a browser-local design was updated.
- A browser control activation does not mean an export finished.
- A material preview is not permission to redistribute a third-party asset.
See Connect an agent, Browser API, and Capability matrix.