awesome-openclaw-agents-templates

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Awesome OpenClaw Agents Templates

精选OpenClaw Agent模板集

Skill by ara.so — Hermes Skills collection.
This skill provides access to 205+ production-ready AI agent templates from the awesome-openclaw-agents repository. Each template is a copy-paste ready
SOUL.md
configuration file that defines an AI agent's personality, skills, and behavior for the OpenClaw ecosystem.
ara.so提供的Skill——Hermes技能合集。
本Skill提供来自awesome-openclaw-agents仓库的205+个可直接用于生产环境的AI Agent模板。每个模板都是可直接复制粘贴的
SOUL.md
配置文件,用于定义OpenClaw生态中AI Agent的个性、技能与行为。

What This Collection Provides

本合集提供的内容

The awesome-openclaw-agents repository offers:
  • 205 agent templates across 24 categories (Productivity, Development, Marketing, Business, DevOps, Finance, etc.)
  • Copy-paste SOUL.md files that define agent behavior
  • Pre-configured integrations with popular tools (Slack, GitHub, Notion, etc.)
  • Quick deployment patterns using Node.js, Docker, or CrewClaw
  • Real-world use cases for each agent type
awesome-openclaw-agents仓库包含:
  • 24个分类下的205个Agent模板(涵盖生产力、开发、营销、商业、DevOps、金融等领域)
  • 可复制粘贴的SOUL.md文件,用于定义Agent行为
  • 预配置的主流工具集成(Slack、GitHub、Notion等)
  • 基于Node.js、Docker或CrewClaw的快速部署方案
  • 每种Agent类型的真实业务场景示例

Installation & Setup

安装与配置

Quick Start with Any Template

任意模板快速启动

bash
undefined
bash
undefined

Clone the repository

克隆仓库

git clone https://github.com/mergisi/awesome-openclaw-agents.git cd awesome-openclaw-agents/quickstart
git clone https://github.com/mergisi/awesome-openclaw-agents.git cd awesome-openclaw-agents/quickstart

Install dependencies

安装依赖

npm install
npm install

Copy a template (example: Orion project manager)

复制模板(示例:Orion项目管理Agent)

cp ../agents/productivity/orion/SOUL.md ./SOUL.md
cp ../agents/productivity/orion/SOUL.md ./SOUL.md

Run the agent

运行Agent

node bot.js
undefined
node bot.js
undefined

Using with OpenClaw CLI

结合OpenClaw CLI使用

bash
undefined
bash
undefined

Register an agent from a SOUL.md file

通过SOUL.md文件注册Agent

openclaw agents add --from ./agents/productivity/orion/SOUL.md
openclaw agents add --from ./agents/productivity/orion/SOUL.md

Start the OpenClaw gateway

启动OpenClaw网关

openclaw gateway start
openclaw gateway start

List registered agents

列出已注册的Agent

openclaw agents list
undefined
openclaw agents list
undefined

SOUL.md Configuration Format

SOUL.md配置格式

Every agent template is a
SOUL.md
file with this structure:
markdown
undefined
每个Agent模板都是一个
SOUL.md
文件,结构如下:
markdown
undefined

Agent Name

Agent名称

Core Identity

核心身份

  • Role: [Primary function]
  • Tone: [Communication style]
  • Goal: [Main objective]
  • 角色:[主要职能]
  • 语气:[沟通风格]
  • 目标:[核心任务]

Capabilities

能力

  • [Skill 1]
  • [Skill 2]
  • [Skill 3]
  • [技能1]
  • [技能2]
  • [技能3]

Integrations

集成工具

  • Tool: [Service name] Config: [Configuration details]
  • 工具:[服务名称] 配置:[配置详情]

Behavior Patterns

行为模式

  • When [condition]: [action]
  • Trigger: [event] → Response: [behavior]
  • 当[条件]时:[执行动作]
  • 触发事件:[事件] → 响应:[行为]

Memory

记忆管理

  • Track: [what to remember]
  • Forget: [what to discard]
undefined
  • 记录:[需要留存的信息]
  • 遗忘:[需要丢弃的信息]
undefined

Key Agent Categories

核心Agent分类

Productivity Agents

生产力Agent

javascript
// Example: Setting up the Orion project manager agent
const fs = require('fs');
const path = require('path');

// Copy Orion template
const orionSOUL = fs.readFileSync(
  path.join(__dirname, 'agents/productivity/orion/SOUL.md'),
  'utf8'
);

// Save to your project
fs.writeFileSync('./SOUL.md', orionSOUL);

// Use cases for Orion:
// - Daily task prioritization
// - Deadline tracking
// - Team alignment
// - Project status updates
javascript
// 示例:配置Orion项目管理Agent
const fs = require('fs');
const path = require('path');

// 复制Orion模板
const orionSOUL = fs.readFileSync(
  path.join(__dirname, 'agents/productivity/orion/SOUL.md'),
  'utf8'
);

// 保存到你的项目中
fs.writeFileSync('./SOUL.md', orionSOUL);

// Orion的适用场景:
// - 每日任务优先级排序
// - 截止日期追踪
// - 团队对齐
// - 项目状态更新

Development Agents

开发类Agent

javascript
// Example: Code reviewer (Lens) setup
const lensConfig = {
  agent: 'lens',
  role: 'PR review, security scanning, code quality',
  triggers: ['pr opened', 'pr updated'],
  integrations: {
    github: {
      token: process.env.GITHUB_TOKEN,
      webhooks: ['pull_request']
    }
  }
};

// Load template
const lensSOUL = fs.readFileSync(
  './agents/development/code-reviewer/SOUL.md',
  'utf8'
);

// Configure for your repo
const customSOUL = lensSOUL.replace(
  '{{REPO}}',
  process.env.GITHUB_REPO
);
javascript
// 示例:代码审核Agent(Lens)配置
const lensConfig = {
  agent: 'lens',
  role: 'PR审核、安全扫描、代码质量检查',
  triggers: ['pr opened', 'pr updated'],
  integrations: {
    github: {
      token: process.env.GITHUB_TOKEN,
      webhooks: ['pull_request']
    }
  }
};

// 加载模板
const lensSOUL = fs.readFileSync(
  './agents/development/code-reviewer/SOUL.md',
  'utf8'
);

// 为你的仓库自定义配置
const customSOUL = lensSOUL.replace(
  '{{REPO}}',
  process.env.GITHUB_REPO
);

Marketing Agents

营销类Agent

javascript
// Example: Content writer (Echo) agent
const echoTemplate = `
javascript
// 示例:内容创作Agent(Echo)
const echoTemplate = `

Echo - Content Writer Agent

Echo - 内容创作Agent

Core Identity

核心身份

  • Role: Blog post generation, SEO optimization
  • Tone: Professional, engaging, clear
  • Goal: Create high-quality content that ranks
  • 角色:博客生成、SEO优化
  • 语气:专业、有吸引力、清晰易懂
  • 目标:生成高排名的优质内容

Capabilities

能力

  • Generate blog posts from topics
  • Optimize for target keywords
  • Create meta descriptions
  • Suggest internal linking
  • 根据主题生成博客文章
  • 针对目标关键词优化内容
  • 生成元描述
  • 建议内部链接方案

Integrations

集成工具

  • Tool: OpenAI API Config: Model GPT-4, Temperature 0.7
  • Tool: Ahrefs Config: API Key from process.env.AHREFS_API_KEY `;
fs.writeFileSync('./SOUL.md', echoTemplate);
undefined
  • 工具:OpenAI API 配置:模型GPT-4,温度值0.7
  • 工具:Ahrefs 配置:API密钥来自process.env.AHREFS_API_KEY `;
fs.writeFileSync('./SOUL.md', echoTemplate);
undefined

Common Agent Patterns

常见Agent模式

1. Scheduled Task Agent

1. 定时任务Agent

javascript
// Daily standup collection agent
const standupAgent = {
  schedule: '0 9 * * *', // 9 AM daily
  action: 'collect standup responses',
  integrations: ['slack'],
  
  behavior: `
    Send message to #standup channel:
    "Good morning! Please share:
    - Yesterday's progress
    - Today's plans
    - Blockers"
    
    Collect responses for 30 minutes.
    Generate summary report.
    Post to #management channel.
  `
};
javascript
// 每日站会收集Agent
const standupAgent = {
  schedule: '0 9 * * *', // 每天上午9点
  action: '收集站会反馈',
  integrations: ['slack'],
  
  behavior: `
    向#standup频道发送消息:
    "早上好!请分享:
    - 昨日进展
    - 今日计划
    - 遇到的阻塞"
    
    收集30分钟内的反馈。
    生成汇总报告。
    发布到#management频道。
  `
};

2. Event-Driven Agent

2. 事件驱动Agent

javascript
// PR reviewer agent (webhooks)
const prReviewerAgent = {
  trigger: 'github.pull_request.opened',
  
  workflow: [
    'Fetch PR diff',
    'Analyze code changes',
    'Check for security issues',
    'Verify test coverage',
    'Post review comment'
  ],
  
  config: {
    github: {
      webhook_url: process.env.GITHUB_WEBHOOK_URL,
      secret: process.env.GITHUB_WEBHOOK_SECRET
    }
  }
};
javascript
// PR审核Agent(基于Webhook)
const prReviewerAgent = {
  trigger: 'github.pull_request.opened',
  
  workflow: [
    '获取PR差异内容',
    '分析代码变更',
    '检查安全问题',
    '验证测试覆盖率',
    '发布审核评论'
  ],
  
  config: {
    github: {
      webhook_url: process.env.GITHUB_WEBHOOK_URL,
      secret: process.env.GITHUB_WEBHOOK_SECRET
    }
  }
};

3. Interactive Chat Agent

3. 交互式对话Agent

javascript
// Customer support agent
const supportAgent = {
  interface: 'telegram',
  memory: 'redis',
  
  behavior: `
    Greet users warmly.
    Understand their issue through questions.
    Search knowledge base for solutions.
    If no solution found, escalate to human.
    Track conversation history.
  `,
  
  integrations: {
    telegram: {
      token: process.env.TELEGRAM_BOT_TOKEN
    },
    redis: {
      url: process.env.REDIS_URL
    },
    zendesk: {
      api_key: process.env.ZENDESK_API_KEY,
      subdomain: process.env.ZENDESK_SUBDOMAIN
    }
  }
};
javascript
// 客户支持Agent
const supportAgent = {
  interface: 'telegram',
  memory: 'redis',
  
  behavior: `
    热情问候用户。
    通过提问了解用户问题。
    在知识库中搜索解决方案。
    若未找到解决方案,升级至人工支持。
    追踪对话历史。
  `,
  
  integrations: {
    telegram: {
      token: process.env.TELEGRAM_BOT_TOKEN
    },
    redis: {
      url: process.env.REDIS_URL
    },
    zendesk: {
      api_key: process.env.ZENDESK_API_KEY,
      subdomain: process.env.ZENDESK_SUBDOMAIN
    }
  }
};

Running Agents

Agent运行方式

Node.js Quickstart Template

Node.js快速启动模板

javascript
// bot.js - Basic agent runner
const fs = require('fs');
const { OpenAI } = require('openai');

// Load SOUL.md configuration
const soulConfig = fs.readFileSync('./SOUL.md', 'utf8');

// Initialize OpenAI (or your LLM provider)
const openai = new OpenAI({
  apiKey: process.env.OPENAI_API_KEY
});

// Agent runtime
async function runAgent(userInput) {
  const completion = await openai.chat.completions.create({
    model: 'gpt-4',
    messages: [
      {
        role: 'system',
        content: soulConfig // SOUL.md defines behavior
      },
      {
        role: 'user',
        content: userInput
      }
    ]
  });
  
  return completion.choices[0].message.content;
}

// Example usage
runAgent('What tasks are due today?').then(console.log);
javascript
// bot.js - 基础Agent运行器
const fs = require('fs');
const { OpenAI } = require('openai');

// 加载SOUL.md配置
const soulConfig = fs.readFileSync('./SOUL.md', 'utf8');

// 初始化OpenAI(或你的大语言模型提供商)
const openai = new OpenAI({
  apiKey: process.env.OPENAI_API_KEY
});

// Agent运行逻辑
async function runAgent(userInput) {
  const completion = await openai.chat.completions.create({
    model: 'gpt-4',
    messages: [
      {
        role: 'system',
        content: soulConfig // SOUL.md定义Agent行为
      },
      {
        role: 'user',
        content: userInput
      }
    ]
  });
  
  return completion.choices[0].message.content;
}

// 示例用法
runAgent('今天有哪些任务到期?').then(console.log);

Docker Deployment

Docker部署

dockerfile
undefined
dockerfile
undefined

Dockerfile for any agent

通用Agent Dockerfile

FROM node:18-alpine
WORKDIR /app
COPY package*.json ./ RUN npm install
COPY SOUL.md ./ COPY bot.js ./
ENV OPENAI_API_KEY="" ENV AGENT_PORT=3000
EXPOSE 3000
CMD ["node", "bot.js"]

```yaml
FROM node:18-alpine
WORKDIR /app
COPY package*.json ./ RUN npm install
COPY SOUL.md ./ COPY bot.js ./
ENV OPENAI_API_KEY="" ENV AGENT_PORT=3000
EXPOSE 3000
CMD ["node", "bot.js"]

```yaml

docker-compose.yml

docker-compose.yml

version: '3.8'
services: openclaw-agent: build: . ports: - "3000:3000" environment: - OPENAI_API_KEY=${OPENAI_API_KEY} - REDIS_URL=redis://redis:6379 depends_on: - redis
redis: image: redis:alpine ports: - "6379:6379"
undefined
version: '3.8'
services: openclaw-agent: build: . ports: - "3000:3000" environment: - OPENAI_API_KEY=${OPENAI_API_KEY} - REDIS_URL=redis://redis:6379 depends_on: - redis
redis: image: redis:alpine ports: - "6379:6379"
undefined

Finding the Right Agent Template

如何找到合适的Agent模板

By Category

按分类查找

bash
undefined
bash
undefined

List all productivity agents

列出所有生产力类Agent

ls agents/productivity/
ls agents/productivity/

Output:

输出:

orion/ - Project manager

orion/ - 项目管理

metrics/ - Analytics dashboard

metrics/ - 分析仪表盘

daily-standup/ - Standup collection

daily-standup/ - 站会收集

inbox-zero/ - Email triage

inbox-zero/ - 邮件分类

meeting-notes/ - Meeting summaries

meeting-notes/ - 会议纪要

undefined
undefined

By Use Case

按业务场景查找

javascript
// Search agents.json programmatically
const agents = require('./agents.json');

function findAgent(useCase) {
  return agents.filter(agent => 
    agent.specialty.toLowerCase().includes(useCase.toLowerCase()) ||
    agent.whenToUse.toLowerCase().includes(useCase.toLowerCase())
  );
}

// Example: Find agents for "email"
const emailAgents = findAgent('email');
// Returns: [{ name: 'Inbox', specialty: 'Email triage...', ... }]
javascript
// 通过agents.json程序式搜索
const agents = require('./agents.json');

function findAgent(useCase) {
  return agents.filter(agent => 
    agent.specialty.toLowerCase().includes(useCase.toLowerCase()) ||
    agent.whenToUse.toLowerCase().includes(useCase.toLowerCase())
  );
}

// 示例:查找与"邮件"相关的Agent
const emailAgents = findAgent('email');
// 返回:[{ name: 'Inbox', specialty: 'Email triage...', ... }]

Customizing Templates

模板自定义

Basic Customization

基础自定义

markdown
<!-- Original SOUL.md -->
markdown
<!-- 原始SOUL.md -->

Orion - Project Manager

Orion - 项目管理Agent

Core Identity

核心身份

  • Role: Task coordination
  • Tone: Professional
<!-- Customized version -->
  • 角色:任务协调
  • 语气:专业
<!-- 自定义版本 -->

Orion - Engineering PM

Orion - 工程PM

Core Identity

核心身份

  • Role: Engineering task coordination for team X
  • Tone: Technical, direct, async-first
  • Context: Remote team across 3 timezones
  • 角色:X团队的工程任务协调
  • 语气:技术化、直接、优先异步沟通
  • 背景:跨3个时区的远程团队

Custom Rules

自定义规则

  • Tag urgent tasks with 🚨
  • Use engineering terminology
  • Link to Linear tickets
undefined
  • 紧急任务标记🚨
  • 使用工程术语
  • 关联Linear工单
undefined

Adding Integrations

添加集成工具

markdown
undefined
markdown
undefined

Integrations

集成工具

  • Tool: Slack Config: Webhook: process.env.SLACK_WEBHOOK_URL Channel: #engineering Mention: @channel for P0 items
  • Tool: Linear Config: API Key: process.env.LINEAR_API_KEY Team ID: process.env.LINEAR_TEAM_ID Auto-create tickets: true
  • Tool: GitHub Config: Token: process.env.GITHUB_TOKEN Repos: ['org/backend', 'org/frontend'] Track PRs: true
undefined
  • 工具:Slack 配置: Webhook: process.env.SLACK_WEBHOOK_URL 频道: #engineering 提及规则:P0事项@channel
  • 工具:Linear 配置: API密钥: process.env.LINEAR_API_KEY 团队ID: process.env.LINEAR_TEAM_ID 自动创建工单: true
  • 工具:GitHub 配置: Token: process.env.GITHUB_TOKEN 仓库: ['org/backend', 'org/frontend'] 追踪PR: true
undefined

Configuration Patterns

配置模式

Environment Variables Setup

环境变量设置

bash
undefined
bash
undefined

.env file for any agent

通用Agent的.env文件

OPENAI_API_KEY=sk-... ANTHROPIC_API_KEY=sk-ant-...
OPENAI_API_KEY=sk-... ANTHROPIC_API_KEY=sk-ant-...

Integration tokens

集成工具令牌

SLACK_TOKEN=xoxb-... GITHUB_TOKEN=ghp_... NOTION_TOKEN=secret_...
SLACK_TOKEN=xoxb-... GITHUB_TOKEN=ghp_... NOTION_TOKEN=secret_...

Database

数据库

REDIS_URL=redis://localhost:6379 POSTGRES_URL=postgresql://user:pass@localhost/db
REDIS_URL=redis://localhost:6379 POSTGRES_URL=postgresql://user:pass@localhost/db

Agent-specific

Agent专属配置

AGENT_NAME=orion AGENT_TIMEZONE=America/New_York AGENT_LANGUAGE=en
undefined
AGENT_NAME=orion AGENT_TIMEZONE=America/New_York AGENT_LANGUAGE=en
undefined

Multi-Agent Setup

多Agent配置

javascript
// multi-agent.js - Run multiple agents
const agents = [
  { name: 'orion', soul: './agents/productivity/orion/SOUL.md' },
  { name: 'lens', soul: './agents/development/code-reviewer/SOUL.md' },
  { name: 'echo', soul: './agents/marketing/echo/SOUL.md' }
];

agents.forEach(agent => {
  const config = fs.readFileSync(agent.soul, 'utf8');
  
  // Spawn agent process
  const child = spawn('node', ['bot.js'], {
    env: {
      ...process.env,
      AGENT_NAME: agent.name,
      SOUL_CONFIG: config
    }
  });
  
  console.log(`Started ${agent.name} agent`);
});
javascript
// multi-agent.js - 运行多个Agent
const agents = [
  { name: 'orion', soul: './agents/productivity/orion/SOUL.md' },
  { name: 'lens', soul: './agents/development/code-reviewer/SOUL.md' },
  { name: 'echo', soul: './agents/marketing/echo/SOUL.md' }
];

agents.forEach(agent => {
  const config = fs.readFileSync(agent.soul, 'utf8');
  
  // 启动Agent进程
  const child = spawn('node', ['bot.js'], {
    env: {
      ...process.env,
      AGENT_NAME: agent.name,
      SOUL_CONFIG: config
    }
  });
  
  console.log(`已启动${agent.name} Agent`);
});

Troubleshooting

故障排查

Agent Not Responding

Agent无响应

javascript
// Debug mode
const DEBUG = process.env.DEBUG === 'true';

async function runAgent(input) {
  if (DEBUG) {
    console.log('Input:', input);
    console.log('SOUL config length:', soulConfig.length);
  }
  
  try {
    const response = await openai.chat.completions.create({...});
    if (DEBUG) console.log('Response:', response);
    return response.choices[0].message.content;
  } catch (error) {
    console.error('Agent error:', error.message);
    return 'Error processing request';
  }
}
javascript
// 调试模式
const DEBUG = process.env.DEBUG === 'true';

async function runAgent(input) {
  if (DEBUG) {
    console.log('输入:', input);
    console.log('SOUL配置长度:', soulConfig.length);
  }
  
  try {
    const response = await openai.chat.completions.create({...});
    if (DEBUG) console.log('响应:', response);
    return response.choices[0].message.content;
  } catch (error) {
    console.error('Agent错误:', error.message);
    return '处理请求时出错';
  }
}

Common Issues

常见问题

  1. Missing environment variables
    bash
    # Check all required vars are set
    node -e "console.log(process.env.OPENAI_API_KEY ? 'OK' : 'MISSING')"
  2. SOUL.md parsing errors
    javascript
    // Validate SOUL.md format
    const soul = fs.readFileSync('./SOUL.md', 'utf8');
    if (!soul.includes('# ')) {
      throw new Error('Invalid SOUL.md: missing heading');
    }
  3. Integration failures
    javascript
    // Test integrations independently
    const testSlack = await fetch(process.env.SLACK_WEBHOOK_URL, {
      method: 'POST',
      body: JSON.stringify({ text: 'Test' })
    });
    console.log('Slack test:', testSlack.ok ? 'OK' : 'FAILED');
  1. 缺失环境变量
    bash
    # 检查所有必填变量是否已设置
    node -e "console.log(process.env.OPENAI_API_KEY ? '已配置' : '缺失')"
  2. SOUL.md解析错误
    javascript
    // 验证SOUL.md格式
    const soul = fs.readFileSync('./SOUL.md', 'utf8');
    if (!soul.includes('# ')) {
      throw new Error('无效SOUL.md:缺少标题');
    }
  3. 集成工具失败
    javascript
    // 独立测试集成工具
    const testSlack = await fetch(process.env.SLACK_WEBHOOK_URL, {
      method: 'POST',
      body: JSON.stringify({ text: '测试消息' })
    });
    console.log('Slack测试:', testSlack.ok ? '成功' : '失败');

Advanced Usage

进阶用法

Memory & State Management

记忆与状态管理

javascript
// redis-memory.js - Persistent agent memory
const Redis = require('ioredis');
const redis = new Redis(process.env.REDIS_URL);

async function rememberContext(agentName, userId, context) {
  const key = `agent:${agentName}:user:${userId}`;
  await redis.set(key, JSON.stringify(context), 'EX', 86400); // 24h
}

async function recallContext(agentName, userId) {
  const key = `agent:${agentName}:user:${userId}`;
  const data = await redis.get(key);
  return data ? JSON.parse(data) : null;
}

// Use in agent
const context = await recallContext('orion', userId);
const response = await runAgent(userInput, context);
await rememberContext('orion', userId, { ...context, lastInput: userInput });
javascript
// redis-memory.js - Agent持久化记忆
const Redis = require('ioredis');
const redis = new Redis(process.env.REDIS_URL);

async function rememberContext(agentName, userId, context) {
  const key = `agent:${agentName}:user:${userId}`;
  await redis.set(key, JSON.stringify(context), 'EX', 86400); // 24小时有效期
}

async function recallContext(agentName, userId) {
  const key = `agent:${agentName}:user:${userId}`;
  const data = await redis.get(key);
  return data ? JSON.parse(data) : null;
}

// 在Agent中使用
const context = await recallContext('orion', userId);
const response = await runAgent(userInput, context);
await rememberContext('orion', userId, { ...context, lastInput: userInput });

Agent Chaining

Agent链式调用

javascript
// Chain multiple agents for complex workflows
async function processCustomerRequest(request) {
  // Step 1: Categorize with support agent
  const category = await runAgent('support', 
    `Categorize this request: ${request}`
  );
  
  // Step 2: Route to specialist
  let specialist;
  if (category.includes('technical')) specialist = 'tech-support';
  else if (category.includes('billing')) specialist = 'billing';
  else specialist = 'general';
  
  // Step 3: Generate response
  const response = await runAgent(specialist, request);
  
  // Step 4: QA check
  const qaResult = await runAgent('qa-agent',
    `Review this response: ${response}`
  );
  
  return qaResult.includes('approved') ? response : 'Escalate to human';
}
javascript
// 链式调用多个Agent处理复杂工作流
async function processCustomerRequest(request) {
  // 步骤1:通过支持Agent分类请求
  const category = await runAgent('support', 
    `对以下请求进行分类:${request}`
  );
  
  // 步骤2:路由到对应专家Agent
  let specialist;
  if (category.includes('技术')) specialist = 'tech-support';
  else if (category.includes('账单')) specialist = 'billing';
  else specialist = 'general';
  
  // 步骤3:生成响应
  const response = await runAgent(specialist, request);
  
  // 步骤4:QA审核
  const qaResult = await runAgent('qa-agent',
    `审核以下响应:${response}`
  );
  
  return qaResult.includes('通过') ? response : '升级至人工处理';
}

Best Practices

最佳实践

  1. Start with a template, customize incrementally
  2. Use environment variables for all secrets
  3. Test integrations separately before combining
  4. Version control your SOUL.md files
  5. Monitor agent behavior in production
  6. Set rate limits for API calls
  7. Implement logging for debugging
  8. Use Redis/DB for persistent memory
  1. 从模板开始,逐步自定义
  2. 所有敏感信息使用环境变量
  3. 先独立测试集成工具,再组合使用
  4. 对SOUL.md文件进行版本控制
  5. 在生产环境中监控Agent行为
  6. 为API调用设置速率限制
  7. 实现日志功能用于调试
  8. 使用Redis/数据库实现持久化记忆

Resources

资源