so1-io/so1-agents

GitHub: so1-io/so1-agents

SO1 Agents 是一套基于 FORGE 分阶段执行模型的专业化 AI Agent 集合,为 n8n 工作流设计、代码生成、DevOps 流水线和事故响应提供结构化、Schema 验证的自动化能力。

Stars: 0 | Forks: 0

# SO1 Automation Factory [![Validate Agents](https://static.pigsec.cn/wp-content/uploads/repos/2026/03/bef3ac4521182113.svg)](https://github.com/so1-io/so1-agents/actions/workflows/validate.yml) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) ## 概述 SO1 Agents 是专为 SO1 自动化平台设计的专用 AI Agent 集合。与通用的 AI prompt 不同,这些 Agent 具有: - **SO1-Native**:与 Veritas (prompt 库)、n8n (workflow 自动化) 和 SO1 control plane 深度集成 - **FORGE-Compliant**:具有明确进入/退出条件和决策日志的分阶段执行 - **Schema-Validated**:所有输出均符合定义的 JSON schema,确保可靠性和可组合性 - **OpenCode-First**:专为 [OpenCode](https://opencode.ai) 设计,同时支持其他 AI 编码工具 ## 架构 ``` ┌─────────────────────────────────────────────────────────────────┐ │ SO1 AUTOMATION FACTORY │ ├─────────────────────────────────────────────────────────────────┤ │ │ │ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │ │ │ VERITAS │◄──►│ SO1-AGENTS │◄──►│ N8N │ │ │ │ Prompts │ │ (OpenCode) │ │ Workflows │ │ │ └─────────────┘ └──────┬──────┘ └─────────────┘ │ │ │ │ │ ┌──────▼──────┐ │ │ │ FORGE │ │ │ │ Gates │ │ │ └──────┬──────┘ │ │ │ │ │ ┌─────────────────────────▼─────────────────────────┐ │ │ │ SO1 CONTROL PLANE API │ │ │ │ (Hono BFF: GitHub, n8n, MCP orchestration) │ │ │ └───────────────────────────────────────────────────┘ │ └─────────────────────────────────────────────────────────────────┘ ``` ## Agent 名单 ### 自动化部 | Agent | 用途 | 状态 | |-------|---------|--------| | Workflow Architect | 根据需求设计完整的 n8n workflow | Planned | | Webhook Engineer | 创建 webhook 集成 (GitHub, Slack 等) | Planned | | Schedule Optimizer | 设计高效的 cron/schedule 模式 | Planned | ### 工程部 | Agent | 用途 | 状态 | |-------|---------|--------| | Hono Backend | so1-control-plane-api 模式 (routes, middleware) | Planned | | NextJS Frontend | so1-console 模式 | Planned | | TypeScript Shared | so1-shared 契约 | Planned | ### DevOps 部 (CI/CD) | Agent | 用途 | 状态 | |-------|---------|--------| | Railway Deployer | Railway service/environment 配置 | Planned | | GitHub Actions | 包含 SO1 模式的 Workflow YAML | Planned | | Pipeline Auditor | 审查 pipeline 的 SO1 合规性 | Planned | ### 文档部 | Agent | 用途 | 状态 | |-------|---------|--------| | Mintlify Author | 创建 Mintlify 文档 (SO1 atlas 风格) | Planned | | API Documenter | 从 Hono 路由生成 OpenAPI specs | Planned | | Runbook Writer | 运维手册 | Planned | ### Prompt 部 | Agent | 用途 | 状态 | |-------|---------|--------| | Prompt Refiner | 改进现有的 Veritas prompt | Planned | | Chain Architect | 设计多步 prompt 链 | Planned | | Fragment Curator | 创建可复用的 prompt 片段 | Planned | ### 事故处理部 | Agent | 用途 | 状态 | |-------|---------|--------| | Incident Commander | 协调事故响应 | Planned | | Triage Responder | 初始事故评估 | Planned | | Postmortem Analyst | 创建 RCA 文档 | Planned | ### 编排 | Agent | 用途 | 状态 | |-------|---------|--------| | Factory Orchestrator | 协调所有 Agent,管理阶段 | Planned | | FORGE Gatekeeper | 执行阶段门禁,生成 VTM | Planned | ## 安装 ### OpenCode (推荐) ``` # Clone the repository git clone https://github.com/so1-io/so1-agents.git cd so1-agents # Install to your project ./scripts/install-opencode.sh /path/to/your/project # Or install globally ./scripts/install-opencode.sh --global ``` ### 手动安装 将 Agent 文件复制到您的 `.opencode/agent/` 目录: ``` cp agents/**/*.md /path/to/project/.opencode/agent/ ``` ## 用法 在 OpenCode 中,通过引用来激活 Agent: ``` Use the Workflow Architect agent to design an n8n workflow that: 1. Triggers on GitHub push events 2. Runs tests and linting 3. Notifies Slack on failure ``` Agent 将: 1. 验证 FORGE 门禁进入条件 2. 生成符合 schema 的 n8n workflow JSON 3. 引用相关的 Veritas prompt 4. 以 ADR 格式记录决策 5. 输出并带有 FORGE 门禁退出验证 ## FORGE 阶段门禁 所有 Agent 均在 FORGE 分阶段执行模型内运行: | 阶段 | 名称 | 用途 | |-------|------|---------| | 0 | Planning | 需求分析,Agent 选择 | | 1 | Design | 架构和 schema 设计 | | 2 | Implementation | 代码/workflow 生成 | | 3 | Documentation | 文档和 prompt 优化 | | 4 | Validation | Pipeline 审计和合规性检查 | | 5 | Deployment | Railway/GitHub 部署 | 每个阶段在推进之前都需要明确批准。 ## Veritas 集成 Agent 与 [Veritas](https://github.com/so1-io/veritas) prompt 库进行双向集成: **消费 Prompts**:Agent 通过 ID(例如 `vrt-a1b2c3d4`)引用 Veritas prompt 作为可复用的 prompt 片段。 **生产 Prompts**:Agent 可以将新的 prompt 草稿输出到 `veritas/agent-prompts/`,供人工审查后再晋升至生产环境。 ## 验证 验证 Agent 结构和 schema: ``` # Validate all agents ./scripts/validate-agents.sh # Validate specific agent ./scripts/validate-agents.sh agents/automation/workflow-architect.md # Strict mode (warnings = errors) ./scripts/validate-agents.sh --strict ``` ## 目录结构 ``` so1-agents/ ├── .opencode/agent/ # OpenCode-ready agents (symlinked) ├── agents/ │ ├── automation/ # n8n workflow designers │ ├── engineering/ # Code generation │ ├── devops/ # CI/CD & Infrastructure │ ├── documentation/ # Docs generation │ ├── prompts/ # Veritas prompt engineering │ └── incident/ # SO1 incident response ├── orchestration/ │ ├── factory-orchestrator.md │ └── forge-gates.yaml ├── templates/ │ ├── agent-template.md # Agent structure template │ ├── n8n-output-schema.json # n8n workflow output schema │ └── veritas-draft-schema.json ├── veritas/ │ └── agent-prompts/ # Agent-produced prompt drafts ├── scripts/ │ ├── install-opencode.sh # Installation script │ └── validate-agents.sh # Validation script └── docs/ └── examples/ # Usage examples ``` ## 贡献 1. Fork 本仓库 2. 按照 `templates/agent-template.md` 创建一个新的 Agent 3. 运行验证:`./scripts/validate-agents.sh` 4. 提交 pull request ### Agent 要求 - 包含必填字段的 YAML frontmatter (name, version, domain, forge) - 必需章节:Identity, Core Capabilities, FORGE Gate Compliance - Veritas 引用使用正确格式 (`vrt-xxxxxxxx`) - 输出符合定义的 schema ## 相关仓库 | 仓库 | 描述 | |------------|-------------| | [so1-io/veritas](https://github.com/so1-io/veritas) | 核心 prompt 库 | | [so1-io/so1-control-plane-api](https://github.com/so1-io/so1-control-plane-api) | BFF 服务 | | [so1-io/so1-console](https://github.com/so1-io/so1-console) | 前端应用 | | [so1-io/n8n-workflow-patterns](https://github.com/so1-io/n8n-workflow-patterns) | n8n 设计模式 | | [so1-io/n8n-forge](https://github.com/so1-io/n8n-forge) | FORGE pipeline 手册 | ## 许可证 MIT License - 详情请见 [LICENSE](LICENSE)。
标签:AI代理, DNS解析, IT运维, JSON Schema, n8n, OpenCode, Python, SO1, SOAR, Socks5代理, SOC Prime, 代码生成, 低代码, 安全编排与自动化响应, 工作流自动化, 开发工具, 开源项目, 提示词工程, 敏捷开发, 无后门, 渗透测试工具, 策略决策点, 编排引擎, 自动化工厂