---
title: "Generate 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."
method: GET
path: "/api/v1/intents/{id}/prompt"
tags: ["intents"]
---

# Generate 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.

`GET /api/v1/intents/{id}/prompt`

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` string, required

## Query parameters

- `agent_type` string
- `mode` string
- `format` string
- `workspace_id` string

## Response `200`

Returns { prompt, json }

- object

## Other responses

- `401` — Missing/invalid API key or session
- `403` — Authenticated but lacks read scope
- `404` — Intent not found in this workspace
- `422` — mode=execute but intent is not ready for execution; body includes { error, readiness, suggestion }
- `500` — Internal server error

---

[API](https://skmtc.dev/pathmode/apis/pathmode-api.md) · [All operations](https://skmtc.dev/pathmode/apis/pathmode-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/pathmode/pathmode-api/revisions/e419abb0a327/schema)
