Agents
Connect an agent
Discover Glyphfield, choose an identity and capability, submit a generation request, and save the returned artifact.
Connection sequence
An agent should follow this sequence for every new deployment origin:
- Fetch
/llms.txtfor operational instructions. - Fetch
/api/agentfor the current version, policies, resources, and contract. - Fetch
/api/identitieswhen using Starter or GT. - Fetch
/api/elementswhen choosing a brand application. - Fetch
GET /api/generateimmediately before constructing a request. POST application/jsonto/api/generate.- Save raw SVG or extract the artifact from its JSON envelope.
Do not infer undocumented enum values. Do not scrape the client bundle when a structured endpoint provides the same information.
Shell connection check
BASE_URL=http://localhost:3012
curl -fsS "$BASE_URL/llms.txt"
curl -fsS "$BASE_URL/api/agent" | jq '{ version, schemaVersion, resources }'
curl -fsS "$BASE_URL/api/generate" | jq '.kinds | keys'For a deployed instance, replace BASE_URL with its origin.
TypeScript discovery client
const baseUrl = 'http://localhost:3012';
const [manifest, generation, identities, elements] = await Promise.all([
fetch(`${baseUrl}/api/agent`).then((response) => response.json()),
fetch(`${baseUrl}/api/generate`).then((response) => response.json()),
fetch(`${baseUrl}/api/identities`).then((response) => response.json()),
fetch(`${baseUrl}/api/elements`).then((response) => response.json()),
]);
console.log(manifest.version, generation.schemaVersion);
console.log(identities.identities.length, elements.elements.length);Independent discovery requests can run concurrently. Fetch the generation contract again if substantial time passes before generation.
Minimal generation call
const response = await fetch(`${baseUrl}/api/generate`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
kind: 'template',
template: 'slides',
slideLayout: 'title',
texture: 'white',
title: 'Code is the source of truth.',
identity: { preset: 'gt' },
output: 'raw',
}),
});
if (!response.ok) throw new Error(await response.text());
const svg = await response.text();The raw response is a complete SVG string.
Prompting an agent
Point an LLM at the runbook rather than reproducing the full schema in a prompt:
Read https://YOUR_ORIGIN/llms.txt and the linked agent manifest.
Generate a white GT agenda slide titled “One system, every market.”
Save the raw SVG response as gt-agenda.svg.
Do not use undocumented enum values.This keeps the deployment’s current contract authoritative.