Skip to main content

xAgent Long-running Tasks: Continuous Execution and Staged Delivery

Status: Experimental. The page and its fields may change.

Who This Is For

This page is for users who need xAgent to handle multi-step, long-running, or staged deliverable work.

What It Is

A long-running task cannot be completed reliably in one short reply. It may require reading a large amount of material, working in stages, waiting for confirmation, calling external systems, generating multiple files, or following up over a longer period.

Ordinary users do not need to understand how the work is split internally. Clearly state the goal, materials, stages, and acceptance criteria.

xAgent runs tasks on the server and does not depend on a browser or personal computer remaining online. A submitted task can continue after the page closes, but completion still depends on the model, tools, external systems, available materials, and approval state.

When the estimated full model request exceeds 80% of the maximum context window, xAgent performs context compression. The result preserves the current goal, progress, constraints, decisions, working facts, and artifact references for continuation. It is not long-term memory and cannot guarantee preservation of every historical detail.

When to Use It

These tasks are suitable for a long-running workflow:

  • Researching multiple sources and producing a report.
  • Analyzing a large set of files or data.
  • Continuing to follow up with customers, email, or external events.
  • Generating recurring outputs every day or week.
  • Planning first, confirming, and then executing.
  • Producing multiple intermediate results and a final deliverable.

Simple questions, short text rewrites, and a summary of one file usually do not need a long-running workflow.

For a complex long-running task, the main Agent may delegate part of the work to sub-agents. Ordinary users do not need to manage sub-agents manually. Use the original session to review staged results, add materials, and confirm important actions.

How to Submit One

The first message of a long-running task should include:

ContentExample
Final goalCreate a customer feedback analysis report
Material scopeUse the five interview records I uploaded
StagesShow a plan first, then analyze after confirmation
Intermediate resultShow topic categories and evidence first
Final deliverableGenerate an HTML report
Confirmation pointRequire confirmation before external sending or deletion

Example:

Please analyze the five interview records I uploaded to identify user needs.
Show a processing plan first. After I confirm it, extract themes, evidence, and opportunities.
Finally, generate an HTML report and keep the original evidence in an appendix.

Ask xAgent for a Plan First

For complex work, start with:

Please list the processing plan first. Do not execute it yet.

Let xAgent continue after you confirm the plan.

Review Each Stage

Do not wait until the end to inspect a long-running task. At each stage, check:

  • Whether materials were read correctly.
  • Whether the categorization makes sense.
  • Whether the evidence is sufficient.
  • Whether the output format meets requirements.
  • Whether more materials are needed.

Correct a stage as soon as it goes off track to avoid rework later.

Save Important Outputs

Long-running tasks can produce several results. Explicitly ask xAgent to save:

  • The staged plan.
  • Data-cleaning results.
  • Intermediate analysis tables.
  • The final report.
  • An evidence list.

Example:

Please save the intermediate analysis table as CSV and the final report as HTML.

Handling Work While It Runs

StatusWhat to do
Waiting for more materialsUpload or describe them in the original session
Waiting for approvalCheck the action, then approve or reject it
External connection failedCheck the connection status or provide the material manually
Intermediate result is wrongCorrect the requirement immediately
Task is too largeReduce the scope or split it into stages

Do not create several identical long-running tasks. Continue in the original session whenever possible.

After a service restart, xAgent attempts to resume sessions with valid running snapshots. A session waiting for approval remains waiting and does not bypass confirmation. Recovery does not guarantee lossless continuation of every external action; idempotency and duplicate-execution protection remain the responsibility of the corresponding tool and external service.

Common Scenarios

Weekly Report

Please organize this week's project materials. List missing information first, then generate a weekly report draft and save it as Markdown.

Research Report

Please organize materials around this topic. Show a source list and analysis framework first, then create the full report after I confirm.

Customer Follow-up

Please summarize customer messages from the past week. List items needing replies, at-risk customers, and suggested actions. Do not send messages automatically.

Continue Reading

Next Steps