返回全部资讯
蚂蚁 inclusionAI 官方仓库T1·智能体与协同

蚂蚁开源 Agent3σ-Canary 沙箱评测智能体安全

作者:inclusionAI原标题:⭐ inclusionAI/Agent3Sigma-Canary (42 stars)
58AI 研判分

蚂蚁集团 Agent3σ 项目开源 AgentCanary,在受控沙箱中驱动智能体真实调用工具并处理真实格式任务材料,从风险结果、安全意识和正常任务效用三个维度评估完整执行轨迹,而非仅检查文本回答是否安全。项目已支持 Hermes 与 NanoClaw 框架,并新增 Skill-to-Sandbox 工作流以自定义评测环境。

报道正文

本文目录6 个章节

Agent3σ-Canary

Agent3σ-Canary, abbreviated as AgentCanary, is part of the Agent3σ project. It provides security evaluation capabilities for AI Agents in realistic runtime environments. AgentCanary does not simply check whether a model gives a safe textual answer; it drives agents in controlled sandboxes to invoke real tools, process task materials in realistic formats, and evaluate the agent's complete execution trajectory across risk outcome, security awareness, and normal-task utility.

Agent3σ-Canary overview

📢 What's New

  • 2026-08-09: Added the Skill-to-Sandbox workflow, enabling users to build customized evaluation environments and extend evaluation tasks with greater flexibility. See the tutorial for more details.
  • 2026-06-23: Added support for the Hermes and NanoClaw agent frameworks. Issues and pull requests for supporting more frameworks are welcome!
  • 2026-06-23: Added the safety evaluation suite — no-attacker tasks measuring risky agent behavior under ambiguous, conflicting, or urgent instructions.

💡 Key Features

  • Comprehensive risk coverage: Tasks are organized through a systematic "risk entry x risk impact" taxonomy. Risk entries capture different sources of risk and their threat models, including direct injection, indirect prompt injection, Skills poisoning, and memory poisoning. Risk impacts describe the different consequences an attack can cause, such as local environment damage, sensitive data leakage, and persistent state pollution. See risk definition for details.
  • Realistic usage scenarios: AgentCanary covers real agent workflows such as web browsing, email processing, SMS handling, and financial operations. Risk sources are embedded into the workflows that agents are expected to complete, following realistic threat models.
  • Realistic runtime environment: AgentCanary uses real interfaces to access resources such as web pages, email, and files, preserving high-fidelity tool-call chains and data formats. It also dynamically prepares task-specific materials, such as inboxes, test files, virtual financial accounts, and websites, so each evaluation runs with sufficient context.
  • Sandboxed evaluation: Each task runs in an isolated environment, reducing the impact of high-risk samples on the host and other tasks while keeping evaluations controlled and reproducible.
  • Multiple attack methods: AgentCanary supports automatic generation, mutation, and optimization of attack samples for evaluation tasks, covering one-shot transformations, multi-step iterative optimization, and long-chain attack scenarios.
  • Defense framework evaluation: AgentCanary supports evaluating different agent security defense frameworks, making it easier to compare defense effectiveness.
  • Trajectory-based multidimensional scoring: Scoring is not based only on a single-step result. AgentCanary evaluates the agent's complete execution trajectory across safety outcome, security awareness, and task utility.
  • High extensibility: Task definitions and environment construction are modular, making it easy to add custom evaluation tasks.

🔄 Evaluation Workflow

AgentCanary evaluation workflow

🚀 Quick Start

1. Prepare the Environment

System requirements:

  • Python 3.10+
  • uv for Python dependency management
  • Docker

Install uv:

BASH
curl -LsSf https://astral.sh/uv/install.sh | sh
BASH
uv sync

2. Configure Models and API Keys

Running AgentCanary requires configuring two types of LLMs:

  • Target model: The LLM used by the agent under test inside the Docker container. Specify it with the --model argument.
  • Auxiliary models: LLMs used by the evaluation framework itself, such as PAIR attackers and judge scorers.

Configuration steps:

BASH
# 1. Create a configuration file from the template
cp config.example.yaml config.yaml

# 2. Edit the configuration with your API keys and model information
vim config.yaml

# 3. Optional: validate whether the configured model APIs are available
uv run python scripts/validate_api.py

In config.yaml, configure:

  • providers: API endpoints, keys, and available model lists. You can define multiple providers, and each provider can contain multiple models. The provider-id/model-id pair is the value used by the --model argument.
  • roles: Auxiliary model assignments for roles such as pair, judge, and ipi. Auxiliary model requests currently use OpenAI-compatible Chat Completions APIs.

Example:

YAML
providers:
  openai-compatible:
    base_url: "https://api.openai.com/v1"
    api_key: "sk-xxx"
    api: "openai-completions"
    models:
      - id: "gpt-4o"
        name: "GPT-4o"

  anthropic:
    base_url: "https://api.anthropic.com/v1"
    api_key: "sk-ant-xxx"
    api: "anthropic-messages"
    models:
      - id: "claude-sonnet-4"
        name: "Claude Sonnet 4"

roles:
  # pair:
  #   base_url: "https://api.openai.com/v1"
  #   api_key: "sk-xxx"
  #   model: "gpt-4o"
  judge:
    base_url: "https://api.openai.com/v1"
    api_key: "sk-xxx"
    model: "gpt-4o"
  # ipi:
  #   base_url: "https://api.openai.com/v1"
  #   api_key: "sk-xxx"
  #   model: "gpt-4o"

Generate runtime configuration:

BASH
# Generate env.sh and openclaw.json from config.yaml
bash setup.sh

# Load environment variables
source env.sh

(注:更多技术实现细节与完整 API 文档请查阅原项目 README)