Agents for Humans — Part 2: Building Citereel's Strands Agent
An implementation walkthrough of the tools, validation, and human-review boundaries behind Citereel's product-video planner.
This is Part 2 of my Citereel build series for the Agents for Humans Hackathon. Here, I focus on the agent itself: its tools, its constraints, and the creator decisions around its output. Part 3 covers the resumable AWS video-production workflow.
The agent's job starts before the recording
For the Agents for Humans Hackathon, I built Citereel to help founders and product marketers turn an authorized product website into a reviewable video. The creator supplies a brief, chooses an audience and format, reviews the proposed story, and receives a downloadable MP4.
The interesting agent problem is deciding what the video should say. A website can contain navigation text, marketing claims, technical details, and information that does not belong in the requested story. A useful planner must select relevant evidence, fit it into a short narrative, and leave the creator with something they can inspect and change.
I implemented that planner as a single Strands agent using an Amazon Bedrock model, hosted in Amazon Bedrock AgentCore. Browser recording, speech generation, and video composition run in a separate worker. This article focuses on the planning boundary: what the agent can do, what application code checks, and when a person takes over.
Four tools define the planning workflow
The agent works through a small tool interface. The tools connect its reasoning to the creator's request and the saved production state.
Tool | Responsibility |
|---|---|
get_production_brief | Return the requested audience, format, duration, and creative direction. |
inspect_authorized_site | Return inspected source evidence, inspecting the authorized site when evidence is not already saved. |
submit_storyboard | Validate a proposed storyboard and save it only when the checks pass. |
request_human_decision | Record that the available evidence cannot support the requested story without a human decision. |
The agent does not receive arbitrary shell access or a publishing tool. Its output is a structured storyboard: scene titles, on-screen copy, narration, source identifiers, and directions for which inspected page to show.
Here is the central construction, shortened from the planner implementation . The surrounding application supplies the referenced functions and production state.
agent = Agent(
name="launchpad_concierge",
model=model(),
system_prompt=prompt,
tools=[
get_production_brief,
inspect_authorized_site,
submit_storyboard,
request_human_decision,
],
hooks=[ProductionPolicy(store, job_id)],
)Strands provides the model-and-tool loop. Citereel defines the tools and the conditions under which their results become accepted application state.
A plausible script is not automatically an accepted plan
The most consequential tool is
submit_storyboard . It parses the proposal into a Pydantic model and applies checks before saving it.For example, every scene must reference known evidence and an inspected page. The recorded page must appear among that scene's cited sources. The plan must meet the expected scene count and narration budget. Numeric tokens that are unsupported by the retrieved evidence are rejected.
When validation fails, the tool returns a structured failure rather than pretending the plan was saved:
return {
"saved": False,
"validation_error": str(exc)[:1500],
}The agent can read that feedback and attempt a correction within its execution budget. The saved cloud verification report records one invalid storyboard submission being rejected before an accepted plan. That is a concrete example of the loop doing useful work beyond producing a first draft.
These checks have limits. A number appearing in a source does not prove that a generated sentence uses it correctly. A citation also does not establish that the source itself is true. Citereel's claim ledger supports review; it is not a general-purpose fact-checking guarantee.
Hooks enforce the workflow around the model
The policy layer observes model and tool events. It checks prerequisites before an action and records whether the action actually achieved its required result.
I used Strands' hook system through
BeforeModelCallEvent , BeforeToolCallEvent , and AfterToolCallEvent .In Citereel, those hooks check cancellation, enforce the tool-call budget, and require successful brief and source retrieval before storyboard submission. After submission, the policy checks whether a plan was actually saved. A successful tool transport response is not enough if validation rejected its contents.
The agent invocation is bounded to eight turns, ten tool calls, 45,000 total tokens, and 10,000 output tokens. These are limits, not a claim about typical consumption. The point is to give planning a finite execution boundary and expose a failure when it cannot finish within that boundary.
Website content is treated as untrusted evidence in the prompt. The narrow tools and application-side checks constrain what the planner can change, but I do not treat a prompt instruction as proof that prompt injection is solved.
Human review is saved application state
The workspace puts narration, scene copy, claims, and sources together so the creator can inspect the proposed message before production.
When storyboard review is enabled, or the claim ledger identifies wording that needs review, the worker saves the plan and pauses before capture. Editing the storyboard clears its approval. Approval is checked against the current job version so an older browser view cannot approve a newer plan accidentally.
This is an application-level pause, not a model conversation held open while someone decides. Once the required decision is saved, another production attempt resumes the work.
Hosting the planner without giving it the whole production job
The Fargate worker invokes AgentCore with the job ID, owner, attempt number, and session ID through the AgentCore invocation API .
Inside the runtime, an
AttemptStore checks that the invocation still belongs to the active planning attempt. If the creator cancels or a newer attempt supersedes it, a late response must not overwrite the current production. The worker also verifies that the runtime returned a saved plan for the expected attempt.AgentCore hosts the planner; it does not automatically provide all these application-specific guarantees. The attempt checks, approval rules, and output validation live in Citereel's code.
What I would improve next
The next evaluation work is to test more kinds of unsupported claims and adversarial source text, then measure how often creators must correct the proposed story. I also want more complete production tracing; the saved verification report documents correlated logs but incomplete span export.
The main lesson from this implementation is that a creator needs both a useful draft and a dependable way to challenge it. Strands handles the reasoning loop, while explicit tool contracts, validation, and saved human decisions make that loop usable inside the product.
Watch the 3:45 project demonstration or inspect the MIT-licensed source . The cloud verification report includes the recorded validation and execution evidence discussed here.
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article