---
title: "Comment by yiming song on \"The Agent Is Just Another Client: Safe Database Writes with Strands Agents on AWS\" | Hashnode"
description: "Really clear walkthrough — the part that stuck with me was binding the garden with a ContextVar before the agent runs, so the model never gets to supply or chan"
url: "https://hashnode.com/posts/the-agent-is-just-another-client-safe-database-writes-with-strands-agents-on-aws/6b04145d84b089b902330346/comment/6b059e1300cc350851e35db7"
---

[Discussion](https://hashnode.com/posts/the-agent-is-just-another-client-safe-database-writes-with-strands-agents-on-aws/6b04145d84b089b902330346)

Comment [The Agent Is Just Another Client: Safe Database Writes with Strands Agents on AWS](https://hashnode.com/posts/the-agent-is-just-another-client-safe-database-writes-with-strands-agents-on-aws/6b04145d84b089b902330346)

[yiming song](https://hashnode.com/@yimingsong)

[1d ago](https://hashnode.com/posts/the-agent-is-just-another-client-safe-database-writes-with-strands-agents-on-aws/6b04145d84b089b902330346/comment/6b059e1300cc350851e35db7)

Really clear walkthrough — the part that stuck with me was binding the garden with a ContextVar before the agent runs, so the model never gets to supply or change the user or garden IDs itself. Sharing the same validation in garden\_service.py for both the REST routes and the agent tools makes that boundary feel much more trustworthy than prompt instructions alone. The pre-guardrail test showing the LLM trying to be helpful across gardens was a nice touch too.
