Agent For Humans
# Agents for Humans — Part 3: Making Citereel's Video Workflow Resumable on AWS
Agents for Humans — Part 3: Making Citereel's Video Workflow Resumable on AWS
How Citereel preserves human approvals, completed recordings, and previous exports when a long-running production is interrupted.
This is Part 3 of my Citereel build series for the Agents for Humans Hackathon. Part 2 explains the Strands planner and its review boundaries. Here, I follow the accepted storyboard into the AWS production workflow and explain how the application preserves work across interruptions.
A finished storyboard is only the beginning
Citereel's agent can prepare a source-linked story, but a creator still needs the finished video. That requires browser capture, optional narration, composition, media checks, storage, and a working download.
For the Agents for Humans Hackathon, I built Citereel for founders and product marketers who want to turn product websites into videos while staying in control of the message. The cloud implementation had to account for a practical problem: a video job can outlive a browser request, pause for human review, or lose its worker before the export is complete.
This post covers the production side of that problem. The goal was to preserve useful work and make recovery explicit, rather than leave the creator looking at an indefinite spinner.
Split the interactive app from the production worker
CloudFront and S3 serve the Next.js studio. API Gateway routes API requests to FastAPI on Lambda. DynamoDB stores production state, while SQS and a dispatcher hand queued work to ECS Fargate. The worker invokes the Strands planner hosted in Bedrock AgentCore and then performs browser capture and media production.
The responsibilities are deliberately separate:
- API: authenticate the user, validate requests and actions, and return job state.
- AgentCore-hosted planner: propose a storyboard using the creator's brief and inspected evidence.
- Fargate worker: capture footage with Playwright, generate optional speech with Amazon Polly, and compose the result with FFmpeg.
- DynamoDB and private S3 storage: retain production decisions, recording checkpoints, receipts, and exports beyond a worker's lifetime.
The studio polls saved state. It does not need one HTTP request to remain open throughout a render.
Treat approval as a durable pause
The approval boundary separates a proposed story from the work required to produce its video. When review is required, the worker saves an
awaiting_plan_approval state and exits. It releases its claim instead of continuing to wait inside the model call.When the creator approves, the API checks ownership, the expected job version, and the allowed state. It saves the decision, queues another attempt, and lets the worker resume from the existing plan.
Editing the plan clears approval. That matters because approving version A should not silently authorize recording version B.
This design also makes the pause easier to explain in the interface: production is waiting for a particular human decision, not simply taking a long time.
Give each production attempt an identity
The dispatcher uses a token derived from the job ID and attempt number when it launches a Fargate task. Conditional DynamoDB writes coordinate worker slots, and the worker claims durable job state before processing it.
These checks are intended to make repeated delivery safe. I would not describe them as an exactly-once guarantee for every external operation. Their purpose is narrower: repeated messages and old attempts should not freely start competing production work.
The same idea applies to the agent. Its runtime checks attempt and session identity before accepting mutations. If an old model response arrives after cancellation or a newer attempt, it must not overwrite the current job.
Save completed recordings before the final render
The Fargate filesystem is temporary. Keeping footage only there would make recovery depend on a worker that may no longer exist.
After each completed capture, Citereel uploads a recording checkpoint to S3 and records its object key, SHA-256 digest, and capture receipts. The digest lets a later worker check that the restored file matches the saved checkpoint.
On a retry, the worker looks for a compatible local recording, then attempts to restore an S3 checkpoint. The restore function checks that the checkpoint belongs under the current production's recordings path and rejects a file whose hash does not match.
Compatibility also matters. Citereel's recording key includes the source URL, normalized source-text hash, scroll instruction, capture-version marker, output geometry, content scale, and requested duration. A recording is not reused just because the scene has the same title.
Original capture receipts are retained alongside reused clips, so a reused recording does not lose its provenance. The relevant code is in recording checkpoints and recording-key construction .
What an interrupted-worker test showed
The saved cloud verification report records a production whose fourth attempt was stopped during rendering. EventBridge-driven recovery marked that attempt as blocked while retaining the saved script and the previous downloadable export.
The next attempt completed with these recorded results:
Recovery observation | Recorded result |
|---|---|
Completed clips restored from S3 checkpoints | 4 |
New clips recorded during the retry | 0 |
Checkpoint hashes | Verified before reuse |
Previous MP4 | Preserved through the interruption |
Retry outcome | Completed export |
This is evidence from a specific test, not a general performance or availability benchmark. The fixture product used in that recovery demonstration was Northstar. The report separately records a public AWS documentation production through AgentCore, browser capture, Polly, and S3 export.
Recovery does not resume FFmpeg at an arbitrary frame. It restores compatible completed recordings and reruns the necessary production stages. Narration and rendering may still need to run again. If capture was interrupted before a checkpoint was saved, that unfinished work may need to be repeated.
A usable export needs evidence of completion
After capture, the worker renders the video and performs media checks. The saved result includes duration, dimensions, stream information, and a file hash. The export record also retains the request, storyboard, evidence, attempt number, and recording-reuse counts.
Files remain in private S3 storage. The API checks job ownership before returning temporary download access. A completed MP4 can therefore be played and downloaded without turning the artifact bucket into a public collection of user productions.
The remaining boundaries
There are still limits to this implementation. Website-change checks compare inspected text, not every visual change on a site. A layout-only change can therefore escape that comparison. Blocked pages and unsupported interactions can still prevent a usable capture.
Observability is also incomplete: the saved report documents correlated service logs, but span export encountered an HTTP 400 response. I want to improve that trace coverage and run broader interruption tests across capture, narration, and artifact publication.
The lesson I took from this work is that human control includes recoverability. A creator should be able to pause, reject a draft, or retry an interrupted job without losing the last useful result. In Citereel, that behavior comes from explicit saved state and checkpoints around the agent, not from the model alone.
Watch the project demonstration or read the MIT-licensed repository . For the planner-hosting boundary, the AWS documentation describes the AgentCore runtime invocation API used by the worker.
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article