AgentX: Command for Claude Code

.claude/commands/agent-container-integration-requirements.md

agent-container-integration-requirements is a command for Claude Code from lucky-aeon/AgentX. It costs 0 tokens per session (12,070 once invoked), scanned A, original, Apache-2.0.

A requirements document for connecting AgentX conversations with user containers, which are isolated environments that run tools for an agent.

In plain words
What is it for?
Use it to implement the conversation flow, container health and lifecycle checks, tool deployment, port and data-volume handling, and the per-user MCP gateway.
Why use it?
It defines how the system checks installed tools, creates or restores containers, registers them, and deploys missing tools before a conversation starts.

Command for Claude Code

Written for Claude Code: installed under .claude/.

This is lucky-aeon/AgentX's own configuration. It tells Claude Code how to work on AgentX itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything AgentX configures →

Reuse

Borrowing it

Nothing to install: this file belongs to lucky-aeon/AgentX. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/lucky-aeon/AgentX/master/.claude/commands/agent-container-integration-requirements.md
Clone the repo
git clone --depth 1 https://github.com/lucky-aeon/AgentX

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for agent-container-integration-requirements

README.md
[![agentmods](https://agentmods.dev/badge/commands/lucky-aeon/agentx/agent-container-integration-requirements.svg)](https://agentmods.dev/commands/lucky-aeon/agentx/agent-container-integration-requirements)
Your own site
<a href="https://agentmods.dev/commands/lucky-aeon/agentx/agent-container-integration-requirements"><img src="https://agentmods.dev/badge/commands/lucky-aeon/agentx/agent-container-integration-requirements.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 12,070 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.12070
Opus 5 $0.00000 $0.06035
Sonnet 5 $0.00000 $0.02414
Haiku 4.5 $0.00000 $0.01207

Measured 8d ago against content hash 09533219985e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

agent-container-integration-requirements scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

CMD curl -f http://localhost:8005/health || exit 1
.claude/commands/agent-container-integration-requirements.md · 1,521 lines

How it starts

The opening of the file, as written. The whole thing — 1,521 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Agent平台与容器管理业务集成需求文档

项目背景

AgentX平台已完成基础的容器管理功能,现需要将容器管理与Agent对话流程进行深度集成,实现用户工具的自动化部署和管理。

已完成功能

1. 容器管理基础设施

  • ✅ 容器模板管理:管理员可创建和管理容器模板
  • ✅ 用户容器CRUD:创建、删除、启动、停止用户容器
  • ✅ 容器自动清理:1天不使用暂停,5天不使用销毁
  • ✅ 容器状态管理:包括CREATING、RUNNING、STOPPED、ERROR、DELETING、DELETED、SUSPENDED
  • ✅ 端口管理:自动分配外部端口,避免冲突
  • ✅ 数据卷挂载:为每个用户容器创建独立数据目录

2. 工具管理基础

  • ✅ 工具全局状态管理:管理员可设置工具是否为全局状态
  • ✅ 工具审核流程:审核容器已在系统中默认配置,无需额外开发

核心业务集成需求

1. Agent对话流程集成

根据业务流程图,需要实现以下完整流程:

1.1 对话启动阶段
开始 → 对话 → Agent是否有工具?
  • 决策点:检查当前Agent是否配置了工具
  • :继续后续流程
  • :直接结束对话
1.2 用户工具查询阶段
查询用户已安装工具 → 查询工具集状态
  • 功能:获取当前用户已安装的工具列表
  • 功能:检查工具的全局/非全局状态
  • 说明:暂时不实现全局工具概念,所有工具都按非全局处理
1.3 容器管理阶段
是否注册容器? → 创建用户容器 / 查询健康状态 → 注册容器
  • 检查用户容器:判断当前用户是否已有容器
  • 容器创建:如果没有容器,则创建新的用户容器
  • 健康检查:如果有容器,检查容器健康状态
  • 容器恢复:如果容器被暂停,自动恢复运行状态
  • 重新注册:确保容器可用后注册到系统
1.4 工具部署阶段
是否部署到用户容器? → 部署到用户容器 → 发起对话
  • 部署检查:检查工具是否已部署到用户容器的MCP网关
  • 自动部署:将未部署的工具部署到用户容器
  • 对话启动:完成部署后启动Agent对话

2. MCP网关开发

2.1 网关架构
  • 部署方式:每个用户容器内运行独立的MCP网关
  • 端口配置:容器内固定8080端口,映射到宿主机随机端口
  • 镜像管理:使用统一的MCP网关Docker镜像
2.2 核心接口
用户已安装工具查询
GET /mcp/tools/installed?userId={userId}
Response: {
  "code": 200,
  "data": [
    {
      "toolId": "string",
      "toolName": "string", 
      "version": "string",
      "status": "deployed|pending|error"
    }
  ]
}
工具集状态查询
GET /mcp/tools/status?userId={userId}&toolIds={toolIds}
Response: {
  "code": 200,
  "data": {
    "global": false,  // 暂时固定为false
    "tools": [
      {
        "toolId": "string",
        "deployed": true|false,
        "status": "deployed|pending|error"
      }
    ]
  }
}
工具部署接口
POST /mcp/tools/deploy
Request: {
  "userId": "string",
  "tools": [
    {
      "toolId": "string",
      "toolName": "string",
      "version": "string",
      "config": {}  // 工具配置信息
    }
  ]
}
Response: {
  "code": 200,
  "message": "部署成功",
  "data": {
    "deployedTools": ["toolId1", "toolId2"],
    "failedTools": []
  }
}

Read the full file on GitHub · 1,521 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 1,521 lines · 0 tokens per session scan A 09533219985e

Subscribe to this mod's changes

agent-container-integration-requirements is a command published in the GitHub repository lucky-aeon/AgentX (836 stars, last pushed 2mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 12,070 tokens. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.