Orchestrator, or just a pipeline?
Decide whether an agent task fits your existing CI pipeline or needs saved workflow state for approvals, restarts and shared ownership.
Start with your existing pipeline when one job can run the agent and save a result for a person to read. Add workflow coordination when the task must wait, resume after a job ends or share ownership across workers. First check which of those features your current tools already provide.
A review agent that reads a branch and writes a report may fit in one CI job. A task that waits two days for an answer needs somewhere to save the question, progress and next step. Keeping the agent's files is useful, but does not by itself record that decision.
Suppose a repository event starts an agent that reads a proposed change and saves a review report. A build job may be enough. Now suppose the task asks a question, waits overnight and continues from the answer. Identify what must survive that wait before choosing more infrastructure.
Try one useful task with the tools you have#
A limited pilot can start a suitable isolated environment, check out the required revision and run one agent command. Save its report and logs for a person. It need not publish code or deploy anything to answer whether the output helps.
Use the CI system’s existing access controls and result storage where they meet the task’s needs. GitHub Actions artifacts, for example, can preserve and share workflow outputs. Check retention and access rules so the report remains available to the people who need it.
Measure the agent call, environment time and human review. The useful question is not how elaborate the workflow looks, but whether it produces an outcome worth the total cost.
Even a small pilot needs safe permissions and a way to stop. Conversely, it does not necessarily need a new queue and database. Record requirements that already exist—especially long waits or external writes—rather than postponing them merely to keep the pilot small.
Starting work is not choosing its next action#
Separate three questions: what starts the task, whether its caller waits, and who chooses its next action. A clock or repository event can start a fixed script. A person can start an agent that chooses further investigations while the person waits for its answer. Neither the trigger nor the waiting behaviour defines an agent’s decision-making role.
In an illustrative review workflow, a pull-request event starts a background worker. The worker reads one file, waits for that result and then chooses the next file. The caller did not wait for the whole review, but the agent’s own steps are sequential. Background execution does not require several simultaneous agents.
Conversely, a fixed pipeline can run independent checks concurrently without giving a model control over the sequence. Decide whether to add separate agent workers from the task’s dependencies, not from a desire to make the system “asynchronous”.
The early-release chapter’s move from synchronous software to asynchronous agents is a motivating scenario, not a defining property of agents. Starting work before a person reads the request is useful only under a suitable policy: reading an event is not permission to change its repository or publish a result.
When the task must survive an interruption, verify what is actually saved. LangGraph’s persistence documentation separates thread checkpoints from cross-thread stores and warns that in-memory checkpoints disappear on a process restart. A framework offering a memory feature does not establish that this deployment can recover an unfinished task.
Let dependencies shape the work#
Chapter 5 of Albada’s book describes single actions, parallel actions, chains, trees and graphs. These describe relationships between operations. A chain passes one result into the next step; branches explore separate work; a graph can also combine results. None requires a separate agent for every step.
Consider an illustrative task to revise a documentation draft. The system must identify the intended guide before reading its revision, and read that revision before proposing a conditional update. Independent source checks may run together. The final draft still depends on the relevant findings being available and reconciled.
Keep those dependencies explicit in the saved task. If another editor changes the guide, reconsider the proposed update that depended on the old revision. A still-current source finding need not be discarded merely because the destination changed. The tool contract must check the expected revision when applying the write, not rely on the plan’s earlier read.
A generated plan proposes what to do; actual tool results establish what happened. Discovering a missing source may require another investigation or a question. It does not expand a draft-only task into permission to publish. Preserve the task’s restrictions when revising the plan.
Set limits for repeated planning and investigation, and inspect whether new observations justify another attempt. When a required decision is missing, save the work and ask. A graph with more branches is not an improvement if those branches repeat the same blocked request. These are design recommendations for the example, not a measured comparison of planning methods.
Saving the workspace is not the same as saving the process#
The runtime supplies the agent’s execution environment: files, tools, network access and possibly a way to suspend it. Workflow coordination records which task owns that work, what it is waiting for and what may happen next.
In an illustrative task, the agent asks whether an API may change and stops. Saving its workspace preserves the files. The process also needs the question, who may answer it and which proposal the answer applies to. Restoring files alone does not establish that approval arrived.
The reverse is possible too. The workflow may record an approval while the worker’s unsaved edits have disappeared. Preserve both kinds of information when the task needs them. Neither automatically resolves an external request whose response was lost.
Product names do not draw a clean boundary. Google’s Agent Executor launch description, for example, combines runtime, event-log and snapshot features. Check exactly what state an implementation preserves and what your application must record around it.
One team may need stronger workspace isolation while CI still coordinates the steps. Another may need long-lived task records while ordinary containers remain suitable. Those are separate requirements, even when one product can address both.
Choose a tool for the missing capability#
Start with an observed problem or an explicit requirement. The table suggests what to investigate; it is not a product ranking or a fixed task-count threshold.
| Situation | Take | Because |
|---|---|---|
| One agent returns a report for a person to read | Try the pipeline | An isolated job and saved result may be sufficient. Evaluate whether the report is useful before adding coordination you do not yet need. |
| Several independent tasks finish inside their jobs | Check existing CI | Multiple workflows do not by themselves require a new engine. Check job limits, permissions and how results are retained. |
| A task waits days for an answer and must resume the correct step | Save the workflow | The question, decision and progress must outlive the worker. Use an existing approval feature or a workflow system that handles this safely. |
| A restart loses unfinished files | Save the workspace | A snapshot or saved patch may address the missing data. A record of the current workflow step does not recreate unsaved files. |
| Two workers try to claim the same task | Coordinate ownership | Use an atomic claim or a suitable concurrency control. Check its scope; a limit in one CI system does not govern an unrelated worker. |
| Retries treat missing answers and timeouts as identical failures | Define retry rules | Error classification can live in one job. Save its attempts across jobs when the overall task can restart. |
| One team uses every available worker | Share capacity fairly | Apply concurrency and spending limits at a point all relevant work must pass. That may already be a CI or platform feature. |
| Stopping CI leaves an external agent task running | Connect cancellation | Record the external task and stop its further actions too. Cancelling the caller is not necessarily cancelling the work it started. |
- Situation
- One agent returns a report for a person to read
- Take
- Try the pipeline
- Because
- An isolated job and saved result may be sufficient. Evaluate whether the report is useful before adding coordination you do not yet need.
- Situation
- Several independent tasks finish inside their jobs
- Take
- Check existing CI
- Because
- Multiple workflows do not by themselves require a new engine. Check job limits, permissions and how results are retained.
- Situation
- A task waits days for an answer and must resume the correct step
- Take
- Save the workflow
- Because
- The question, decision and progress must outlive the worker. Use an existing approval feature or a workflow system that handles this safely.
- Situation
- A restart loses unfinished files
- Take
- Save the workspace
- Because
- A snapshot or saved patch may address the missing data. A record of the current workflow step does not recreate unsaved files.
- Situation
- Two workers try to claim the same task
- Take
- Coordinate ownership
- Because
- Use an atomic claim or a suitable concurrency control. Check its scope; a limit in one CI system does not govern an unrelated worker.
- Situation
- Retries treat missing answers and timeouts as identical failures
- Take
- Define retry rules
- Because
- Error classification can live in one job. Save its attempts across jobs when the overall task can restart.
- Situation
- One team uses every available worker
- Take
- Share capacity fairly
- Because
- Apply concurrency and spending limits at a point all relevant work must pass. That may already be a CI or platform feature.
- Situation
- Stopping CI leaves an external agent task running
- Take
- Connect cancellation
- Because
- Record the external task and stop its further actions too. Cancelling the caller is not necessarily cancelling the work it started.
Many independent jobs may fit a pipeline, while a single task waiting for several decisions can need persistent coordination. GitHub’s concurrency controls can limit matching jobs, but their queue and cancellation behaviour must fit the task. They are not automatically a durable work queue shared with other systems.
When the process needs saved progress across failures, compare workflow tools. Temporal records workflow event history to support recovery. It still requires workers and deliberate handling of external activities, files and permissions.
Argo Workflows supports suspend steps and resumption within a Kubernetes workflow. Suspending prevents new steps from being scheduled; it should not be confused with undoing an active external action. Check the exact semantics in whichever tool you choose.
Compare the work of operating these tools with the work of maintaining your own task store, retry rules and cancellation. Existing CI approval features may already be enough. The choice is not simply “pipeline cannot wait” versus “new engine solves everything”.
Test and maintain the coordination you depend on#
A small task table can be appropriate. It becomes a problem when many workflows depend on it but nobody has tested a worker dying after a claim, a duplicated event or a provider outage. Name its maintainer and test the failure cases as its responsibilities grow.
A purchased engine needs the same clarity. Identify the requirement it satisfies, who operates it and how tasks are recovered after an outage. Being able to list its features does not establish that it solves your particular missing capability.
Decide whether unavailable dependencies cause tasks to wait, stop or fail. Preserve the decisions and external actions needed to investigate a restart. Test backup and restoration of important workflow records, and account for retention or export when changing providers.
A stop must reach active workers and their tools, not only the scheduler. Permission and stop controls belong in the first useful workflow. More elaborate coordination can follow demonstrated need.
After a task reaches release, the next question is whether the intended version works in its deployed environment. Continue with post-deploy verification rather than treating a successful orchestration run as the final result.
IF YOU REMEMBER ONE THING
Find what is missing: saved files, a pending decision, safe ownership or cancellation. Use the existing control when it fits, and add coordination for the work it cannot handle.
Questions people also ask
5 QUESTIONSDo I need a new workflow engine for the first agent task?
Not necessarily. A CI job can run an agent in a suitable environment and save its report. Start with a new engine when there is a concrete need your existing tools cannot meet, such as a process that waits for an answer and must resume reliably across worker failures.
Is an agent runtime the same as an orchestrator?
The runtime provides the worker's environment, tools and workspace. Coordination records the task's steps, decisions and ownership. Products can provide both, so inspect their actual features rather than deciding from the name. Check exactly what a resume operation restores.
Can CI store results and control concurrent work?
Many CI systems can retain artifacts, limit concurrent jobs and wait at approval steps. These features have platform-specific limits. Check whether they represent your complete task, including late answers, duplicate events and work performed outside the CI job.
Should I write a small coordinator myself?
A small helper can be appropriate when its responsibilities are limited. Count the work of testing claims, retries, cancellation and recovery as it grows. Compare that maintenance with an existing workflow service instead of assuming either custom code or a new platform is always cheaper.
What does a durable workflow engine preserve?
It records the progress needed to continue a process after a worker stops. For example, Temporal retains workflow event history. That does not automatically save arbitrary files in an agent's container or make external writes safe to repeat; those still need explicit handling.