
Agents for Humans: Why I Did Not Let the AI Model Become BeforeBell’s Policy Engine
While building BeforeBell, I realized that giving an AI agent the ability to reason about school coverage did not mean it should also decide which state changes were allowed. This is how I separated model reasoning from deterministic policy using Strands Agents, Amazon Bedrock AgentCore, and application-owned safety rules.
The question I kept coming back to
While building BeforeBell, one question kept coming back to me:
If the AI model thinks something is a good idea, should that be enough for the application to actually do it?
For me, the answer eventually became no.
BeforeBell is a school operations agent I built for the Agents for Humans Hackathon. It coordinates teacher-absence coverage and is supposed to handle as much of the routine work as possible without constantly requiring an administrator to step in.
That means the agent needs to reason.
It needs to understand what has happened, work out what should happen next, use the available tools, react when circumstances change, and know when a workflow can no longer continue normally.
But I did not want reasoning and authority to become the same thing.
That became one of the most important decisions I made while building the project.
The model can reason about the workflow. It does not become the policy engine.
A reasonable answer is not necessarily an allowed action
Imagine that a teacher calls in absent before the school day starts.
BeforeBell needs to work out which periods are affected and who might be able to cover them.
An AI model can look at the information and produce something that sounds perfectly reasonable:
“Teacher A looks like the best person to cover P3.”
That might even be correct.
But there are other questions that still need answering.
Is Teacher A actually available during P3?
Are they eligible to cover that class?
Would the assignment create a timetable conflict?
Have they already reached a workload limit?
Would using them consume a protected planning period?
Has another part of the workflow already assigned them somewhere else?
Is this the kind of decision school policy allows the system to make automatically?
Those are not questions I wanted to answer based on whatever the model happened to generate at that moment.
So in BeforeBell, the model proposing or reasoning toward an action does not make that action authoritative.
The application still has to prove that the action is allowed.
Where I drew the boundary
The main BeforeBell agent is built with the Strands Agents SDK and runs through Amazon Bedrock AgentCore Runtime.
Strands owns the agent workflow.
The agent can use an Amazon Bedrock model for reasoning and natural-language understanding.
But policy-sensitive operations are exposed through deterministic BeforeBell tools.
Those tools handle things such as:
- finding eligible coverage candidates;
- checking availability and workload constraints;
- detecting timetable conflicts;
- ranking safe candidates;
- generating routine coverage plans;
- enforcing protected planning periods;
- validating assignment invariants; and
- identifying when a case has crossed a boundary that requires human judgment.
The distinction is important.
The agent can ask:
“Who looks like the best candidate?”
But the deterministic layer decides:
“Is this candidate actually permitted?”
The agent can coordinate:
“Create the routine assignment if this plan is valid.”
But application code still owns the rules that determine whether that assignment is allowed to become real state.
That separation means a model response cannot simply talk its way around school policy.
Why I did not put those rules in the prompt
I could have written a very detailed system prompt.
I could have told the model:
Do not use protected planning periods.
Do not double-book teachers.
Respect workload limits.
Only use eligible teachers.
Always ask an administrator before making an exception.
And prompts are still useful for telling the agent how it should behave.
But I did not want the application's most important operational invariants to exist only as instructions written in natural language.
A prompt expresses intent.
The deterministic layer enforces policy.
Those are different jobs.
If a particular rule must always remain true before authoritative state can change, I would rather make that rule executable and testable.
For example, if a teacher cannot legally or operationally be assigned to two places at the same time, I do not want that to be a suggestion to the model.
I want the state transition itself to reject the assignment.
That way the safety property still exists even if the model reasons incorrectly.
The routine path
This becomes easier to see in a normal BeforeBell coverage case.
A teacher is absent.
The agent coordinates the workflow.
BeforeBell determines which periods need coverage.
The deterministic tools evaluate the available candidates.
Eligibility, availability, workload, conflicts and policy constraints are checked.
If the resulting plan stays inside the routine policy boundary, BeforeBell can create the assignment automatically.
No administrator needs to approve something the system already knows is safe.
That is an important part of the project for me.
I did not want “human-in-the-loop” to mean putting a human confirmation dialog in front of every useful action.
If the policy is clear and the application can prove the operation is safe, routine work should remain routine.
Safe routine decisions happen automatically.
What happens when deterministic policy says no
The more interesting case is when the normal policy cannot finish the job.
In one of BeforeBell's synthetic scenarios, Daniel Reed is absent for periods P2, P3 and P5.
P2 and P3 can be covered safely.
P5 cannot.
The available internal option would require crossing a protected planning boundary.
At that point, I did not want the model to improvise.
It should not decide that breaking the rule is probably fine because covering the class seems more important.
It should not invent an exception.
And it should not silently turn the protected period into an assignment.
Instead, the deterministic policy layer identifies that routine authority has ended.
The Strands workflow then reaches its human-in-the-loop interruption.
The administrator gets a bounded set of permitted options and owns the judgment about which exception path the school should take.
That produces another principle behind BeforeBell:
Judgment stays human.
The model does not become more powerful simply because the problem became harder.
In this case, the exact opposite happens.
Once deterministic policy says the situation requires human judgment, the autonomous path becomes narrower.
Even human approval does not bypass the policy layer
There was another thing I wanted to avoid.
Suppose the administrator approves an exception.
That still should not mean arbitrary application state can suddenly be written.
In BeforeBell, human approval authorizes a particular path.
A later trusted fulfillment step still has to carry out the authorized action, and the application revalidates the operation before the final assignment becomes authoritative.
That is why another principle in the project is:
Approval is authorization, not execution.
The model does not own the final state change.
The administrator does not directly manufacture the final state change either.
Each part of the workflow has a specific responsibility.
The agent coordinates.
The model reasons.
Deterministic policy protects routine operations and invariants.
Humans own exceptional judgment.
Trusted fulfillment executes permitted actions.
Amazon DynamoDB stores the authoritative state and workflow evidence.
Once I separated those responsibilities, the architecture became much easier to reason about.
Why Amazon DynamoDB matters here too
This same thinking affected the way I designed the UI.
I did not want the interface to display something because the agent said it happened.
If BeforeBell says a teacher has been assigned, there should be authoritative application state proving that assignment exists.
Cases, assignments, policies, human decisions and workflow events are persisted in Amazon DynamoDB.
The UI reads that state.
That gave me another phrase I have used throughout the project:
Evidence, not inference.
The model can explain what it believes should happen.
The application state tells me what actually happened.
Those two things should never be confused.
The architecture also became easier to test
One benefit of moving important rules out of the model is that they become much easier to test directly.
BeforeBell currently has 27 test files and 186 automated tests.
A large part of that suite covers exactly these kinds of boundaries:
eligibility, conflicts, planning, assignment safety, workflow invariants, human decisions, trusted fulfillment, idempotency, persistence, reconciliation and complete synthetic workflow scenarios.
That testing would be much weaker if the rule was simply:
“Ask the model whether this looks safe.”
Instead, I can test deterministic statements such as:
This candidate is eligible.
This assignment is not allowed.
This state transition is valid.
This operation is idempotent.
This exception requires human judgment.
This authorized action still needs fulfillment.
For a state-changing agent, I think those guarantees matter just as much as the quality of the model's reasoning.
The model still matters
None of this means I think the AI model is unnecessary.
Without it, BeforeBell would be a much more rigid workflow system.
The model gives the agent flexibility.
It helps interpret requests.
It supports reasoning across the workflow.
It helps the Strands Agent decide which tools are relevant and what needs to happen next.
It allows the system to behave like an agent instead of a collection of hard-coded screens.
But I think the interesting part is choosing where that flexibility should end.
I do not need a deterministic rule for every sentence the agent generates.
And I do not need an AI model to decide whether an invariant that must always hold should be ignored today.
Different parts of the system need different kinds of intelligence.
What building BeforeBell changed for me
Before this project, it was easy to think about an agent mostly in terms of what the model could do.
Which model?
Which tools?
How much reasoning?
How autonomous?
While building BeforeBell, I started thinking much more about another question:
What should the model be allowed to make true?
That question is different.
A model can suggest that something should happen.
An agent can coordinate the process required to make it happen.
But once software can change real application state, I think authority needs to become much more explicit.
That is especially true in environments where policies, people and operational constraints matter.
Giving the model less authority did not make BeforeBell less agentic.
It made the boundaries of its autonomy clearer.
And because those boundaries are deterministic, persisted and testable, I can reason about them without needing to assume the model will behave perfectly every time.
Closing thought
The most difficult part of BeforeBell was never getting an AI model to produce a sensible coverage suggestion.
Models can already do that pretty well.
The harder problem was making sure that a sensible suggestion could not automatically become an authorized state change.
That is why BeforeBell separates reasoning from authority.
The model reasons.
The agent coordinates.
Deterministic policy decides what routine actions are permitted.
Humans own judgment.
Trusted fulfillment changes authoritative state.
For me, that separation is becoming one of the most important ideas behind building agents that are expected to do real work.
BeforeBell — School coverage, handled before the first bell.
BeforeBell was built for the Agents for Humans Hackathon 2026 using the Strands Agents SDK, Amazon Bedrock, Amazon Bedrock AgentCore Runtime, Amazon DynamoDB, Next.js, and TypeScript.
BeforeBell — Agents for Humans build series
- Article #2 — [Agents for Humans: Why I Did Not Let the AI Model Become BeforeBell’s Policy Engine]
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article