Overview
Placet’s iteration system turns one-shot reviews into multi-round revision workflows. An agent sends content, a human provides feedback, the agent revises, and the human reviews again — as many rounds as needed. All iterations of the same task are linked into an iteration chain, enabling diff views, feedback history, and progress tracking across revisions.When to Use Iterations
How It Works
Data Model
Iterations are tracked with two fields on theMessage model — no new tables:
A unique constraint on
(iterationGroupId, iteration) prevents race conditions.
Review Statuses
Every review response is
completed. The agent interprets the response content (e.g. selected
option, feedback text) and decides whether to send a new iteration. Placet is a transport layer —
it does not encode business logic about what constitutes “approval” vs “rejection”.Sending Iterations
Step 1: Send the initial message
Send a message with a review as usual. No special parameters needed — the first message becomes the chain root automatically when an iteration references it.Step 2: Wait for the response
Use the wait endpoint to poll for the human’s decision:Step 3: Send a revised iteration
Reference the previous message viaiterationOf to create an iteration chain:
Step 4: Repeat until approved
Continue the loop — check the wait endpoint, and based on the response content, decide whether to send another iteration:Interpreting Responses (Agent Side)
Placet delivers the human’s response as-is. The agent (or workflow) decides what constitutes “approval” vs “rejection”:- Approval reviews — check
response.selectedOption(e.g."approve"vs"reject") - Form reviews — inspect submitted field values
- Text input — read the text response and optionally the
feedbackfield - Selection — check
response.selectedItems
feedback field on the review response contains optional human-provided text explaining their decision. Use it to guide the next iteration.
Retrieving Iteration Chains
Agent API
Response
Validation Rules
TheiterationOf parameter is validated by the backend:
Diff & Comparison Views
When iterations exist, the web app automatically shows what changed between versions:- Text diff — inline additions (green) and deletions (red) between iterations
- Image comparison — side-by-side view of previous and current image attachments
- Iteration breadcrumbs — clickable
① → ② → ③navigation with status indicators - Previous feedback — the feedback from the last iteration is displayed for context
Inbox Integration
The inbox is iteration-aware:- Re-Review badge — messages that are iteration #2+ show a “Re-Review” tag
- Iteration breadcrumbs — navigate between iterations directly from the inbox detail
- Diff toggle — compare the current iteration with the previous one
- Pending reviews bar — floating bar at the top of chat showing open reviews, with iteration chains grouped
Webhook Events
When a human responds to a review, a webhook is delivered with:response and feedback fields to decide whether to iterate.
MCP Server Tools
The MCP server exposes iteration support through enhanced tools:Agent Loop Pattern
A typical agent implementation handles iterations with a simple loop:Using Metadata for Agent Context
Themetadata field on messages is a free-form JSON object that the agent controls. Placet stores it unchanged and returns it in all API responses. Use it to track agent-specific context across iterations:
n8n / Automation Workflow Pattern
For workflow automation tools like n8n, implement the iteration loop using a Switch node after the wait step: The key is the loop back from the Switch node to the Send node, passing the previous message ID asiterationOf and incorporating the feedback from the response. The Switch node inspects the response content (e.g. selectedOption) to determine the next step.