Skip to main content
Questions or issues? Contact us at api-support@manus.ai. After creating a task with task.create, the agent runs asynchronously. Use task.listMessages to poll for events and track progress. Also read task.detail before treating a stopped Agent run as complete, because background work can continue independently. For push delivery, set up Webhooks.

Task status

Look for status_update events in the response. The agent_status field tells you what to do next: stopped is not always final. When task.detail reports has_running_background_jobs: true, a background process may wake the task again later, add messages, and change the results. Keep polling if you want them. A later message, schedule, or trigger can also start the same Task again.

Handling waiting status

Read status_detail.waiting_for_event_type. It falls into one of these cases: Sending any ordinary message while an action confirmation is pending skips that action; the agent continues from your message. No schema-specific input is needed.

Answer an agent question

A free-text question is answered with plain text. When the agent supplies choices, the corresponding assistant_message includes a question_expectation object:
To answer:
  1. Collect the user’s selection or free text.
  2. Send a non-empty answer as ordinary message.content through task.sendMessage. For multiple choices, combine the selected text into one readable message. There is no required delimiter, option-ID array, or structured submission format.
  3. Do not submit an empty answer when nothing is selected; ask the user for text instead.
Example answer:

Confirm an action

When an action needs confirmation, the waiting status_detail gives its target event ID and the expected input schema:
The waiting event tells you how to respond. The event identified by waiting_for_event_id tells you what the user is approving. If that event is not in the current response window, fetch it explicitly:
The referenced Gmail event contains the structured tool input:
Use R0ayNknItM38cc6a2DbB4W as task.confirmAction.event_id. X0SCXV59huUdjxubJrOYyx is the tool action ID, not the event ID. What the target event exposes depends on waiting_for_event_type. Most confirmations come from a tool call, so the target is a tool_used event with the original structured params; result-driven confirmations also expose a structured result. Some confirmations expose their text only in waiting_description, and a few expose only the event type and confirm_input_schema. Each entry in Confirmation Events gives the source for its type. When the target gives you nothing you can act on, use the fallback. For addonInteraction, the target is the addon_interaction message that carries the card; see Addon Interaction Cards. Fetching the target event:
  • tool_used events normally require verbose=true.
  • A waiting status does not force its target event into the current page. Use verbose=true with start_event_id=waiting_for_event_id when the target is outside the current response window.
  • When an entry’s Context is None, start_event_id returns no target event. Decide from waiting_for_event_type and confirm_input_schema.

Using task.confirmAction

The input format varies by waiting_for_event_type. Build it according to confirm_input_schema; fields outside the schema are ignored. Use the referenced tool params and result to explain the operation and populate schema fields when applicable. confirmed: false means the event did not consume the input and the task is still waiting.

Confirmation Events

Every event type that accepts task.confirmAction, with its input schema, accepted inputs, and target event. Use it to build your own confirmation UI.

Resume without a decision

This is the fallback when status_detail or waiting_for_event_id is missing, the event type is not one you handle, or the target event gives you nothing to act on. Either direct a person to open the task in Manus, or send this message so the agent picks sensible defaults for the pending step and keeps going:
Any wording that tells the agent to proceed works. For most action confirmations this skips the pending action; the agent decides how to proceed from your message.

Using My Browser

You can let the agent use your local browser. When the agent needs a browser during execution, it will trigger a needConnectMyBrowser waiting event. Use browser.onlineList to get available clients, then select one via task.confirmAction:
If browser.onlineList returns an empty list, no browser clients are online. Install and enable the Manus Browser Extension first.

Complete flow

Structured Output: If you need the result in a specific JSON format, pass structured_output_schema when creating the task. See the Structured Output guide.