Add Follow-up Instruction
Adds a follow-up instruction to an existing background agent. This allows you to provide additional context, corrections, or new requirements to an agent that is already working on a task.
Overview
- Purpose: Send additional instructions to a running or completed agent to refine its work or add new tasks.
- Use Cases: Requesting changes to agent’s work, providing clarifications, adding new requirements, or correcting misunderstandings.
- API Method: POST /v0/agents/{id}/followup
Required Input Fields
Agent ID: The unique identifier of the agent you want to send follow-up instructions to. This is returned when you launch an agent or can be retrieved from the ‘List Agents’ action.
Prompt Text: The follow-up instruction or request. Be clear about what you want changed, added, or clarified from the agent’s previous work.
Optional Input Fields
Prompt Images: Attach up to 5 images to provide additional visual context for the follow-up instruction. Each image requires base64-encoded data and optional dimensions (width/height in pixels).
Output
Follow-up ID: Unique identifier for the follow-up instruction that was added to the agent’s conversation.
Agent Status Considerations
- RUNNING: Agent will incorporate the follow-up into its current work.
- FINISHED: Agent may resume work based on the new instructions.
- ERROR: Follow-up may help the agent recover from the error state.
- CREATING: Wait until status changes to RUNNING before adding follow-ups.
- EXPIRED: Follow-ups cannot be added to expired agents.
Tips
[!TIP] Be specific about what needs to change - reference file names, line numbers, or specific code sections
[!TIP] Use follow-ups to iteratively refine the agent’s work rather than starting over
[!TIP] Check the agent’s current status before adding follow-ups to ensure it can process them
[!TIP] Attach images if the follow-up involves visual changes or UI updates
[!TIP] Keep follow-up instructions focused on one change at a time for better results