VeloxAI
Quay lại Blog
Agent Security· 11 phút đọc

Agent tools rất mạnh. Chính vì thế chúng cần sandbox.

Agent hữu ích có thể gọi tools. Agent an toàn validate tool schemas, cô lập execution, giới hạn runtime, chặn network egress và log mọi call.

VeloxAI Engineering
VeloxAI EngineeringDoi ky thuat VeloxAI
#agents#tools#sandbox
Agent tool sandbox
Agent tool sandbox

Một khách hàng hỏi tôi: 'Tụi em build agent viết code và execute. Demo làm investors rất ấn tượng. Đưa cho users được chưa?' Câu trả lời là chưa. Tools biến agent từ chat interface thành software đọc, ghi, search và kích hoạt workflows. Sức mạnh đó làm chúng nguy hiểm. Production agent tool system cần năm lớp phòng thủ.

5 lớp phòng thủ

  1. Schema validation: Validate tool inputs với typed schemas (Zod, JSON Schema). Từ chối invalid calls với error rõ ràng để model tự sửa.
  2. Secret isolation: Reference secrets bằng ID, inject lúc execution time. Model biết tool tồn tại, không bao giờ thấy credentials.
  3. Runtime limits: CPU cap (30s), memory cap (256MB), không network egress, read-only fs trừ /tmp, không process spawning, không host fs access.
  4. Audit logging: Log mọi tool call với agent ID, tool name, params đã redact, output summary, duration và status. Thiết yếu cho điều tra incident.
  5. Approval gates: Phân loại tools theo risk level. High-risk operations (gửi email, sửa data, thanh toán) cần human approval trước khi execute.

Cập nhật:

Sẵn sàng dựng sản phẩm AI của bạn?

Bắt đầu free, route nhiều provider, đo chi phí và readiness trung thực ngay từ ngày đầu.