AutoGPT Security: Permissions Your Autonomous Agent Needs
AutoGPT and similar autonomous agents can run for hours without human intervention. That's amazing for productivity — and terrifying for security. If you're new to agent security, start with our guide on why AI agents need permissions.
Why Autonomous Agents Are Different
Unlike framework-specific agents like LangChain or CrewAI, autonomous agents require extra precautions:
- No human in the loop: Decisions happen automatically
- Long-running: Errors compound over time
- Self-directed: Agent chooses its own actions
- Resource-hungry: Can burn through API credits fast
Minimum Viable Permissions
Start with the absolute minimum:
# For a research agent safe_permissions = [ "search.web", # Read-only web search "files.read", # Read local files "files.write", # Write to specific directory only ] # NOT these (until proven safe): dangerous_permissions = [ "email.send", # External communication "api.call", # Arbitrary API calls "code.execute", # Running arbitrary code "payments.send", # Financial actions ]
Mandatory Rate Limits
For autonomous agents, these are non-negotiable. See our complete guide to rate limiting for AI agents for implementation details:
shield.configure_limits({ "search.web": {"per_minute": 10, "per_hour": 100}, "files.write": {"per_minute": 5, "per_hour": 50}, "llm.completion": { "per_minute": 20, "cost_per_hour": 5.00 # $5/hour max } })
Containment Strategies
1. Sandboxed Environment
Run in a container with limited access:
- No network access except approved domains
- Read-only filesystem except work directory
- No access to credentials or secrets
2. Time Limits
@shield.protect( scope="autonomous.run", max_duration=3600 # 1 hour max ) def run_autogpt(task): # Automatically stops after 1 hour pass
3. Checkpoint Approvals
Implement human-in-the-loop workflows at critical checkpoints:
shield.configure_checkpoints({ "every_n_actions": 50, # Pause every 50 actions "every_n_minutes": 30, # Pause every 30 minutes "on_new_action_type": True # Pause on first new action })
Monitoring Dashboard
While your agent runs, monitor:
- Actions per minute (spike = potential loop)
- Cost accumulation
- Error rate
- New action types
Emergency Stop
# From your monitoring script if cost > 10 or actions_per_minute > 100: shield.emergency_stop(agent_id="autogpt_main") notify_admin("Agent stopped: anomaly detected")
Run autonomous agents safely
Start Free →