You run the agent in a rootless container, all files are mounted via read-only filesystem mounts and you give the database user only select privileges.
You secure your LLM the same way you’d secure any other user on your system.