Messages
Messages are the conversation log inside a project. Each user prompt creates one USER message; the agent emits an ASSISTANT message when it finishes a run.
Roles
USER, ASSISTANT, SYSTEM.
Types
RESULT — normal message.ERROR — agent failed or hit step limit.DESIGN_QUESTION — agent asked the user for input. The content field is JSON with { runId, questions }. Submit answers via POST /api/agent/runs/[runId]/answer (web app only) to resume.DESIGN_ANSWER— the user's synthesized response.
Attaching images
Upload via the web app (POST /api/upload) or any S3-compatible store. Pass the public URL in the images array on a project or message create call.
json{ "prompt": "Make a landing page that looks like this", "images": [{ "url": "https://pub.r2.dev/abc.png", "mimeType": "image/png" }] }