Hacker
Vikash Kumar Mallick
@vikash2007
Projects
Guarded Agents
Flagsmith Experimentation HackathonNov 2026
An AI agent whose permissions are controlled live by Flagsmith feature flags. Flip a flag in the dashboard and the agent's behavior changes on its very next action, with no redeploy. THE PROBLEM AI agents don't just chat anymore. They send emails, delete files and run commands. When one misbehaves, redeploying to stop it is too slow. Guarded Agent puts a guard in front of every action the agent takes. HOW IT WORKS Every tool call from the model (Gemma 4) goes through a guard that asks Flagsmith first. The guard can: - Allow the action - Block it and tell the agent why - Pause and ask a human to approve or deny If a flag is missing or unreachable, the answer is "no" (fail closed). WHAT YOU CAN CONTROL WITH FLAGS - agent_enabled: a kill switch that stops the agent immediately - tool_delete_file, tool_send_email and other per-tool flags: turn any tool on or off - risky_action_mode: block, ask_human or auto - max_actions_per_run: cap runaway loops - Segments (role = trial): different permissions for different user groups - model_name: swap Gemma models live IN THIS DEMO 1. A normal run where risky actions need my approval 2. Turning the delete tool off in Flagsmith, with no redeploy 3. A "trial" user getting fewer permissions through a segment 4. The kill switch stopping the agent The tools are sandboxed (fake files and a fake outbox), so nothing real is deleted or sent. TIMESTAMPS (adjust to match your final cut) 0:00 The problem and how it works 0:19 Normal run with human approval 0:50 Switching a tool off live in Flagsmith 1:10 Different permissions per user (segments) 1:25 The kill switch 1:45 Wrap-up BUILT WITH Flagsmith (feature flags, segments, remote config), Gemma 4 (via the Gemini API), Python, FastAPI, Vercel Built for the Flagsmith hackathon, track: AI Agents and Feature Flags.