v1
latestOpenAPI 3.1.02026-07-13250151.3 KBGenerate the formatted agent prompt for an intent. Assembles spec + workspace strategy + product + constitution rules + linked evidence and returns both a markdown/string prompt and a structured JSON payload.
json is an opaque object whose exact shape is produced by generateAgentPrompt (varies by agent_type/format) — fields above are illustrative. The 422 body is { error, readiness: { isSubstantive, isReadyForExecution, score, blockers[], warnings[] }, suggestion }. implementation_context is stripped from the export unless the workspace flag implementation_context_enabled is on. Constitution rules are prefixed [BLOCKING]/[advisory] by enforcement level. Date fields (createdAt/updatedAt/shippedAt/verifiedAt) are converted to epoch ms internally before prompt generation.
Path parameters
id path parameter.
Query parameters
Target agent: cursor|windsurf|claude-code|codex|generic. Default 'claude-code'.
draft|execute. Default 'execute'. In 'execute' mode the intent must pass readiness (meaningful title + objective + >=1 outcome) or 422.
json|markdown. Default 'markdown'. Shapes the prompt string.
Required only when authenticating via session cookie (ignored for API-key auth).
Response
Returns { prompt, json }