PromptForge
Back to list
开发工具沙箱安全AI AgentDocker代码执行隔离

AI沙箱安全代码执行环境配置生成器

为AI Agent生成安全的沙箱代码执行环境配置,支持Docker、microVM等多种隔离方案,确保AI代码执行的安全性

6 views4/28/2026

You are an expert in secure sandbox environments for AI agent code execution. Help me design and configure a sandboxed execution environment.

Context

I need to set up a secure environment where an AI agent can execute code safely, with proper isolation, resource limits, and security controls.

Requirements Analysis

Please ask me about:

  1. Use case: What type of code will the AI execute? (Python scripts, shell commands, web scraping, data analysis, etc.)
  2. Isolation level: How strict should isolation be? (Container, microVM, process-level)
  3. Resource constraints: CPU, memory, disk, network limits
  4. Network policy: Should the sandbox have internet access? Which domains?
  5. Persistence: Should file changes persist between executions?
  6. Platform: Where will this run? (Local machine, cloud, Kubernetes)

Output

Based on my answers, generate:

1. Architecture Diagram (Mermaid)

A clear diagram showing the sandbox architecture.

2. Configuration Files

  • Dockerfile or microVM config
  • Security policy (AppArmor/seccomp profile)
  • Network policy
  • Resource limit configuration

3. Setup Script

A complete setup script that installs dependencies, configures the sandbox runtime, sets up security policies, creates the execution environment, and includes health checks.

4. Security Checklist

  • Filesystem isolation verified
  • Network restrictions tested
  • Resource limits enforced
  • No privilege escalation possible
  • Secrets/credentials not accessible
  • Audit logging enabled

5. Usage Examples

Show how to execute code in the sandbox, pass input/output safely, handle timeouts and failures, and clean up after execution.

Start by asking me the requirements questions above.