mirror of
https://github.com/zhayujie/chatgpt-on-wechat.git
synced 2026-06-02 09:48:22 +08:00
Compare commits
6 Commits
feat-wecom
...
2.0.5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
830b8f2971 | ||
|
|
b058af122c | ||
|
|
174ee0cafc | ||
|
|
1c336380c0 | ||
|
|
3068880413 | ||
|
|
be596681e5 |
11
README.md
11
README.md
@@ -13,6 +13,7 @@
|
||||
<a href="https://cowagent.ai/">🌐 官网</a> ·
|
||||
<a href="https://docs.cowagent.ai/">📖 文档中心</a> ·
|
||||
<a href="https://docs.cowagent.ai/guide/quick-start">🚀 快速开始</a> ·
|
||||
<a href="https://skills.cowagent.ai/">🧩 技能广场</a> ·
|
||||
<a href="https://link-ai.tech/cowagent/create">☁️ 在线体验</a>
|
||||
</p>
|
||||
|
||||
@@ -23,7 +24,7 @@
|
||||
|
||||
- ✅ **自主任务规划**:能够理解复杂任务并自主规划执行,持续思考和调用工具直到完成目标
|
||||
- ✅ **长期记忆:** 自动将对话记忆持久化至本地文件和数据库中,包括核心记忆和日级记忆,支持关键词及向量检索
|
||||
- ✅ **技能系统:** Skills 安装和运行的引擎,支持从 Skill Hub、GitHub 等安装技能,或通过对话创造 Skills
|
||||
- ✅ **技能系统:** Skills 安装和运行的引擎,支持从 [Skill Hub](https://skills.cowagent.ai/)、GitHub 等一键安装技能,或通过对话创造 Skills
|
||||
- ✅ **工具系统:** 内置文件读写、终端执行、浏览器操作、定时任务等工具,Agent 自主调用以完成复杂任务
|
||||
- ✅ **CLI系统:** 提供终端命令和对话命令,支持进程管理、技能安装、配置修改等操作
|
||||
- ✅ **多模态消息:** 支持对文本、图片、语音、文件等多类型消息进行解析、处理、生成、发送等操作
|
||||
@@ -68,6 +69,8 @@
|
||||
|
||||
# 🏷 更新日志
|
||||
|
||||
>**2026.04.01:** [2.0.5版本](https://github.com/zhayujie/chatgpt-on-wechat/releases/tag/2.0.5),Cow CLI 命令系统、Skill Hub 开源、浏览器工具、企微扫码创建、多项优化和修复。
|
||||
|
||||
>**2026.03.22:** [2.0.4版本](https://github.com/zhayujie/chatgpt-on-wechat/releases/tag/2.0.4),新增个人微信通道(微信扫码即用)、新增 MiniMax-M2.7 和 GLM-5-Turbo 模型、run.sh 脚本重构、日文文档及多项修复。
|
||||
|
||||
>**2026.03.18:** [2.0.3版本](https://github.com/zhayujie/chatgpt-on-wechat/releases/tag/2.0.3),新增企微智能机器人和 QQ 通道、支持 Coding Plan、新增多个模型、Web 端文件处理、记忆系统升级。
|
||||
@@ -866,8 +869,10 @@ QQ 机器人使用 WebSocket 长连接模式,无需公网 IP 和域名,支
|
||||
|
||||
# 🔗 相关项目
|
||||
|
||||
- [Cow Skill Hub](https://github.com/zhayujie/cow-skill-hub):开源的 AI Agent 技能广场,浏览、搜索、安装和发布技能,支持 CowAgent、OpenClaw、Claude Code 等多种 Agent。
|
||||
- [bot-on-anything](https://github.com/zhayujie/bot-on-anything):轻量和高可扩展的大模型应用框架,支持接入 Slack, Telegram, Discord, Gmail 等海外平台,可作为本项目的补充使用。
|
||||
- [AgentMesh](https://github.com/MinimalFuture/AgentMesh):开源的多智能体( Multi-Agent )框架,可以通过多智能体团队的协同来解决复杂问题。本项目基于该框架实现了[Agent 插件](https://github.com/zhayujie/chatgpt-on-wechat/blob/master/plugins/agent/README.md),可访问终端、浏览器、文件系统、搜索引擎 等各类工具,并实现了多智能体协同。
|
||||
- [AgentMesh](https://github.com/MinimalFuture/AgentMesh):开源的多智能体( Multi-Agent )框架,可以通过多智能体团队的协同来解决复杂问题。
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -879,7 +884,7 @@ FAQs: <https://github.com/zhayujie/chatgpt-on-wechat/wiki/FAQs>
|
||||
|
||||
# 🛠️ 开发
|
||||
|
||||
欢迎接入更多应用通道,参考 [飞书通道](https://github.com/zhayujie/chatgpt-on-wechat/blob/master/channel/feishu/feishu_channel.py) 新增自定义通道,实现接收和发送消息逻辑即可完成接入。同时欢迎贡献新的 Skills,参考 [技能创建文档](https://docs.cowagent.ai/skills/create)。
|
||||
欢迎接入更多应用通道,参考 [飞书通道](https://github.com/zhayujie/chatgpt-on-wechat/blob/master/channel/feishu/feishu_channel.py) 新增自定义通道,实现接收和发送消息逻辑即可完成接入。同时欢迎贡献新的 Skills,向 [Skill Hub](https://skills.cowagent.ai/submit) 提交技能。
|
||||
|
||||
# ✉ 联系
|
||||
|
||||
|
||||
@@ -134,6 +134,8 @@ class MemoryService:
|
||||
else:
|
||||
return {"action": action, "code": 400, "message": f"unknown action: {action}", "payload": None}
|
||||
|
||||
except ValueError as e:
|
||||
return {"action": action, "code": 403, "message": "invalid filename", "payload": None}
|
||||
except FileNotFoundError as e:
|
||||
return {"action": action, "code": 404, "message": str(e), "payload": None}
|
||||
except Exception as e:
|
||||
@@ -145,14 +147,26 @@ class MemoryService:
|
||||
# ------------------------------------------------------------------
|
||||
def _resolve_path(self, filename: str) -> str:
|
||||
"""
|
||||
Resolve a filename to its absolute path.
|
||||
Safely resolve a filename to its absolute path within the allowed directory.
|
||||
|
||||
- ``MEMORY.md`` → ``{workspace_root}/MEMORY.md``
|
||||
- ``2026-02-20.md`` → ``{workspace_root}/memory/2026-02-20.md``
|
||||
|
||||
Raises ValueError if the resolved path escapes the allowed directory
|
||||
(path traversal protection).
|
||||
"""
|
||||
if filename == "MEMORY.md":
|
||||
return os.path.join(self.workspace_root, filename)
|
||||
return os.path.join(self.memory_dir, filename)
|
||||
base_dir = self.workspace_root
|
||||
else:
|
||||
base_dir = self.memory_dir
|
||||
|
||||
resolved = os.path.realpath(os.path.join(base_dir, filename))
|
||||
allowed = os.path.realpath(base_dir)
|
||||
|
||||
if resolved != allowed and not resolved.startswith(allowed + os.sep):
|
||||
raise ValueError(f"Invalid filename: path traversal detected")
|
||||
|
||||
return resolved
|
||||
|
||||
@staticmethod
|
||||
def _file_info(path: str, filename: str, file_type: str) -> dict:
|
||||
|
||||
@@ -16,16 +16,26 @@ from datetime import datetime
|
||||
from common.log import logger
|
||||
|
||||
|
||||
SUMMARIZE_SYSTEM_PROMPT = """你是一个记忆提取助手。你的任务是从对话记录中提取值得记住的信息,生成简洁的记忆摘要。
|
||||
SUMMARIZE_SYSTEM_PROMPT = """你是一个记忆提取助手。你的任务是从对话记录中提炼出值得长期记住的关键事件和核心信息。
|
||||
|
||||
核心原则:
|
||||
- 按「事件」维度归纳,而不是按对话轮次逐条记录
|
||||
- 多轮对话如果围绕同一件事,合并为一条摘要
|
||||
- 只记录有长期价值的信息,忽略闲聊、问候、无意义的短消息
|
||||
|
||||
输出要求:
|
||||
1. 以事件/关键信息为维度记录,每条一行,用 "- " 开头
|
||||
2. 记录有价值的关键信息,例如用户提出的要求及助手的解决方案,对话中涉及的事实信息,用户的偏好、决策或重要结论
|
||||
3. 每条摘要需要简明扼要,只保留关键信息
|
||||
4. 直接输出摘要内容,不要加任何前缀说明
|
||||
5. 当对话没有任何记录价值例如只是简单问候,可回复"无\""""
|
||||
1. 每条一行,用 "- " 开头,格式为:事件/主题 + 关键结论或结果
|
||||
2. 值得记录的信息类型:用户提出的需求及最终解决方案、重要的事实信息、用户的偏好或决策、关键技术方案或配置变更
|
||||
3. 不值得记录的信息:简单问候、闲聊、无实质内容的短消息、重复的中间过程
|
||||
4. 每条摘要应当简明扼要,一句话概括事件的核心内容和结果
|
||||
5. 直接输出摘要内容,不要加任何前缀说明
|
||||
6. 当对话没有任何记录价值(仅含问候或无意义内容),回复"无"
|
||||
|
||||
SUMMARIZE_USER_PROMPT = """请从以下对话记录中提取关键信息,生成记忆摘要:
|
||||
示例(仅供参考格式):
|
||||
- 用户配置了 XX 功能,设置参数为 YY,已生效
|
||||
- 用户反馈了 XX 问题,原因是 YY,通过 ZZ 方式解决"""
|
||||
|
||||
SUMMARIZE_USER_PROMPT = """请从以下对话记录中,按关键事件维度提炼记忆摘要(合并同一事件的多轮对话,不要逐条列出):
|
||||
|
||||
{conversation}"""
|
||||
|
||||
@@ -220,14 +230,16 @@ class MemoryFlushManager:
|
||||
if not conversation_text.strip():
|
||||
return ""
|
||||
|
||||
# Try LLM summarization first
|
||||
if self.llm_model:
|
||||
try:
|
||||
summary = self._call_llm_for_summary(conversation_text)
|
||||
if summary and summary.strip() and summary.strip() != "无":
|
||||
return summary.strip()
|
||||
logger.info(f"[MemoryFlush] LLM returned empty or '无', using fallback")
|
||||
except Exception as e:
|
||||
logger.warning(f"[MemoryFlush] LLM summarization failed, using fallback: {e}")
|
||||
else:
|
||||
logger.info("[MemoryFlush] No LLM model available, using rule-based fallback")
|
||||
|
||||
return self._extract_summary_fallback(messages, max_messages)
|
||||
|
||||
@@ -277,27 +289,38 @@ class MemoryFlushManager:
|
||||
|
||||
@staticmethod
|
||||
def _extract_summary_fallback(messages: List[Dict], max_messages: int = 0) -> str:
|
||||
"""Rule-based fallback when LLM is unavailable."""
|
||||
"""
|
||||
Rule-based fallback when LLM is unavailable.
|
||||
Groups consecutive user+assistant messages into events instead of
|
||||
listing each message individually.
|
||||
"""
|
||||
msgs = messages if max_messages == 0 else messages[-max_messages * 2:]
|
||||
|
||||
items = []
|
||||
|
||||
events: List[str] = []
|
||||
current_user_text = ""
|
||||
for msg in msgs:
|
||||
role = msg.get("role", "")
|
||||
text = MemoryFlushManager._extract_text_from_content(msg.get("content", ""))
|
||||
if not text or not text.strip():
|
||||
continue
|
||||
text = text.strip()
|
||||
|
||||
|
||||
if role == "user":
|
||||
if len(text) <= 5:
|
||||
continue
|
||||
items.append(f"- 用户请求: {text[:200]}")
|
||||
elif role == "assistant":
|
||||
current_user_text = text[:150]
|
||||
elif role == "assistant" and current_user_text:
|
||||
first_line = text.split("\n")[0].strip()
|
||||
if len(first_line) > 10:
|
||||
items.append(f"- 处理结果: {first_line[:200]}")
|
||||
|
||||
return "\n".join(items[:15])
|
||||
events.append(f"- {current_user_text} → {first_line[:150]}")
|
||||
else:
|
||||
events.append(f"- {current_user_text}")
|
||||
current_user_text = ""
|
||||
|
||||
if current_user_text:
|
||||
events.append(f"- {current_user_text}")
|
||||
|
||||
return "\n".join(events[:10])
|
||||
|
||||
@staticmethod
|
||||
def _extract_text_from_content(content) -> str:
|
||||
|
||||
@@ -455,6 +455,11 @@
|
||||
<h2 class="text-xl font-bold text-slate-800 dark:text-slate-100" data-i18n="skills_title">Skills</h2>
|
||||
<p class="text-sm text-slate-500 dark:text-slate-400 mt-1" data-i18n="skills_desc">View, enable, or disable agent skills</p>
|
||||
</div>
|
||||
<a href="https://skills.cowagent.ai/" target="_blank"
|
||||
class="inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium text-primary-500 bg-primary-50 dark:bg-primary-900/20 hover:bg-primary-100 dark:hover:bg-primary-900/30 transition-colors">
|
||||
<i class="fas fa-puzzle-piece text-[10px]"></i>
|
||||
<span data-i18n="skills_hub_btn">Skill Hub</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<!-- Built-in Tools Section -->
|
||||
|
||||
@@ -33,7 +33,7 @@ const I18N = {
|
||||
config_save: '保存', config_saved: '已保存',
|
||||
config_save_error: '保存失败',
|
||||
config_custom_option: '自定义...',
|
||||
skills_title: '技能管理', skills_desc: '查看、启用或禁用 Agent 技能',
|
||||
skills_title: '技能管理', skills_desc: '查看、启用或禁用 Agent 技能', skills_hub_btn: '探索技能广场',
|
||||
skills_loading: '加载技能中...', skills_loading_desc: '技能加载后将显示在此处',
|
||||
tools_section_title: '内置工具', tools_loading: '加载工具中...',
|
||||
skills_section_title: '技能', skill_enable: '启用', skill_disable: '禁用',
|
||||
@@ -88,7 +88,7 @@ const I18N = {
|
||||
config_save: 'Save', config_saved: 'Saved',
|
||||
config_save_error: 'Save failed',
|
||||
config_custom_option: 'Custom...',
|
||||
skills_title: 'Skills', skills_desc: 'View, enable, or disable agent skills',
|
||||
skills_title: 'Skills', skills_desc: 'View, enable, or disable agent skills', skills_hub_btn: 'Skill Hub',
|
||||
skills_loading: 'Loading skills...', skills_loading_desc: 'Skills will be displayed here after loading',
|
||||
tools_section_title: 'Built-in Tools', tools_loading: 'Loading tools...',
|
||||
skills_section_title: 'Skills', skill_enable: 'Enable', skill_disable: 'Disable',
|
||||
@@ -881,7 +881,7 @@ function startSSE(requestId, loadingEl, timestamp) {
|
||||
const imgEl = document.createElement('img');
|
||||
imgEl.src = item.content;
|
||||
imgEl.alt = 'screenshot';
|
||||
imgEl.style.cssText = 'max-width:360px;border-radius:8px;margin:8px 0;cursor:pointer;box-shadow:0 1px 4px rgba(0,0,0,0.1);';
|
||||
imgEl.style.cssText = 'max-width:600px;border-radius:8px;margin:8px 0;cursor:pointer;box-shadow:0 1px 4px rgba(0,0,0,0.1);';
|
||||
imgEl.onclick = () => window.open(item.content, '_blank');
|
||||
mediaEl.appendChild(imgEl);
|
||||
scrollChatToBottom();
|
||||
|
||||
@@ -1365,6 +1365,8 @@ class MemoryContentHandler:
|
||||
service = MemoryService(workspace_root)
|
||||
result = service.get_content(params.filename)
|
||||
return json.dumps({"status": "success", **result}, ensure_ascii=False)
|
||||
except ValueError:
|
||||
return json.dumps({"status": "error", "message": "invalid filename"})
|
||||
except FileNotFoundError:
|
||||
return json.dumps({"status": "error", "message": "file not found"})
|
||||
except Exception as e:
|
||||
|
||||
@@ -1 +1 @@
|
||||
2.0.4
|
||||
2.0.5
|
||||
|
||||
@@ -263,8 +263,9 @@ def _scan_skills_in_dir(directory: str) -> list:
|
||||
return found
|
||||
|
||||
|
||||
def _batch_install_skills(discovered, spec, skills_dir, source, result: InstallResult):
|
||||
def _batch_install_skills(discovered, spec, skills_dir, source, result: InstallResult, display_name: str = ""):
|
||||
"""Install a list of discovered skills into skills_dir."""
|
||||
single = len(discovered) == 1
|
||||
result.messages.append(f"Found {len(discovered)} skill(s) in {spec}:")
|
||||
for sname, sdir in discovered:
|
||||
safe_name = re.sub(r'[^a-zA-Z0-9_\-]', '-', sname)[:64]
|
||||
@@ -275,7 +276,7 @@ def _batch_install_skills(discovered, spec, skills_dir, source, result: InstallR
|
||||
if os.path.exists(target_dir):
|
||||
shutil.rmtree(target_dir)
|
||||
shutil.copytree(sdir, target_dir)
|
||||
_register_installed_skill(safe_name, source=source)
|
||||
_register_installed_skill(safe_name, source=source, display_name=display_name if single else "")
|
||||
result.installed.append(safe_name)
|
||||
result.messages.append(f" + {safe_name}")
|
||||
|
||||
@@ -517,12 +518,16 @@ def _install_targz_bytes(content: bytes, name: str, skills_dir: str, result: Ins
|
||||
def _print_install_success(name: str, source: str):
|
||||
"""Print a unified install success message with description and source."""
|
||||
skills_dir = get_skills_dir()
|
||||
config = load_skills_config()
|
||||
display = config.get(name, {}).get("display_name", "")
|
||||
desc = _read_skill_description(os.path.join(skills_dir, name))
|
||||
click.echo(click.style(f"✓ {name}", fg="green"))
|
||||
if display and display != name:
|
||||
click.echo(f" 名称: {display}")
|
||||
if desc:
|
||||
if len(desc) > 60:
|
||||
desc = desc[:57] + "…"
|
||||
click.echo(f" {desc}")
|
||||
click.echo(f" 描述: {desc}")
|
||||
click.echo(f" 来源: {source}")
|
||||
|
||||
|
||||
@@ -748,7 +753,8 @@ def _list_remote(page: int = 1):
|
||||
nav_parts.append(f"cow skill list --remote --page {page + 1}")
|
||||
if nav_parts:
|
||||
click.echo(f" Navigate: {' | '.join(nav_parts)}")
|
||||
click.echo(f" Install: cow skill install <name>\n")
|
||||
click.echo(f" Install: cow skill install <name>")
|
||||
click.echo(f" Browse: https://skills.cowagent.ai\n")
|
||||
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
@@ -875,6 +881,15 @@ def _route_install(name: str, result: InstallResult):
|
||||
_install_hub(skill_name, result, provider="clawhub")
|
||||
return
|
||||
|
||||
# --- linkai: prefix ---
|
||||
if name.startswith("linkai:"):
|
||||
skill_code = name[7:]
|
||||
# LinkAI codes can be mixed-case alphanumeric; validate loosely
|
||||
if not re.match(r"^[a-zA-Z0-9_\-]{1,128}$", skill_code):
|
||||
raise SkillInstallError(f"Invalid LinkAI skill code '{skill_code}'.")
|
||||
_install_hub(skill_code, result, provider="linkai")
|
||||
return
|
||||
|
||||
# --- owner/repo or owner/repo#subpath shorthand ---
|
||||
if re.match(r"^[a-zA-Z0-9_\-]+/[a-zA-Z0-9_.\-]+(?:#.+)?$", name):
|
||||
subpath = None
|
||||
@@ -1006,13 +1021,11 @@ def _install_hub(name, result: InstallResult, provider=None):
|
||||
expected_checksum = mirror_resp.headers.get("X-Checksum-Sha256")
|
||||
_check_checksum(mirror_resp.content, expected_checksum)
|
||||
installed_before = len(result.installed)
|
||||
_install_zip_bytes(mirror_resp.content, name, skills_dir, result=result, source_label="cowhub")
|
||||
_install_zip_bytes(mirror_resp.content, name, skills_dir, result=result, source_label="cowhub", display_name=hub_display_name)
|
||||
if len(result.installed) == installed_before:
|
||||
_register_installed_skill(name, source="cowhub", display_name=hub_display_name)
|
||||
result.installed.append(name)
|
||||
result.messages.append(f"Installed '{name}' from mirror.")
|
||||
elif hub_display_name:
|
||||
_register_installed_skill(name, display_name=hub_display_name)
|
||||
return
|
||||
|
||||
if source_type == "registry":
|
||||
@@ -1043,13 +1056,11 @@ def _install_hub(name, result: InstallResult, provider=None):
|
||||
if dl_err is None:
|
||||
_check_checksum(dl_resp.content, expected_checksum)
|
||||
installed_before = len(result.installed)
|
||||
_install_zip_bytes(dl_resp.content, name, skills_dir, result=result, source_label=src_provider)
|
||||
_install_zip_bytes(dl_resp.content, name, skills_dir, result=result, source_label=src_provider, display_name=hub_display_name)
|
||||
if len(result.installed) == installed_before:
|
||||
_register_installed_skill(name, source=src_provider, display_name=hub_display_name)
|
||||
result.installed.append(name)
|
||||
result.messages.append(f"Installed '{name}' from {src_provider}.")
|
||||
elif hub_display_name:
|
||||
_register_installed_skill(name, display_name=hub_display_name)
|
||||
return
|
||||
|
||||
# Fallback: download mirror from Skill Hub
|
||||
@@ -1073,13 +1084,11 @@ def _install_hub(name, result: InstallResult, provider=None):
|
||||
expected_checksum = mirror_resp.headers.get("X-Checksum-Sha256")
|
||||
_check_checksum(mirror_resp.content, expected_checksum)
|
||||
installed_before = len(result.installed)
|
||||
_install_zip_bytes(mirror_resp.content, name, skills_dir, result=result, source_label="cowhub")
|
||||
_install_zip_bytes(mirror_resp.content, name, skills_dir, result=result, source_label="cowhub", display_name=hub_display_name)
|
||||
if len(result.installed) == installed_before:
|
||||
_register_installed_skill(name, source="cowhub", display_name=hub_display_name)
|
||||
result.installed.append(name)
|
||||
result.messages.append(f"Installed '{name}' from mirror.")
|
||||
elif hub_display_name:
|
||||
_register_installed_skill(name, display_name=hub_display_name)
|
||||
else:
|
||||
raise SkillInstallError("Unsupported registry provider.")
|
||||
return
|
||||
@@ -1264,7 +1273,7 @@ def _install_git_clone(git_url: str, result: InstallResult, display_name: str =
|
||||
shutil.rmtree(tmp_dir, ignore_errors=True)
|
||||
|
||||
|
||||
def _install_zip_bytes(content, name, skills_dir, result: InstallResult = None, source_label: str = "zip"):
|
||||
def _install_zip_bytes(content, name, skills_dir, result: InstallResult = None, source_label: str = "zip", display_name: str = ""):
|
||||
"""Extract a zip archive and install skill(s).
|
||||
|
||||
Supports three scenarios:
|
||||
@@ -1289,7 +1298,7 @@ def _install_zip_bytes(content, name, skills_dir, result: InstallResult = None,
|
||||
discovered = _scan_skills_in_repo(pkg_root) or _scan_skills_in_dir(pkg_root)
|
||||
|
||||
if discovered and len(discovered) > 1 and result is not None:
|
||||
_batch_install_skills(discovered, name, skills_dir, source_label, result)
|
||||
_batch_install_skills(discovered, name, skills_dir, source_label, result, display_name=display_name)
|
||||
return
|
||||
|
||||
if discovered and len(discovered) == 1:
|
||||
@@ -1301,7 +1310,7 @@ def _install_zip_bytes(content, name, skills_dir, result: InstallResult = None,
|
||||
if os.path.exists(target):
|
||||
shutil.rmtree(target)
|
||||
shutil.copytree(sdir, target)
|
||||
_register_installed_skill(safe_name, source=source_label)
|
||||
_register_installed_skill(safe_name, source=source_label, display_name=display_name)
|
||||
if result is not None:
|
||||
result.installed.append(safe_name)
|
||||
result.messages.append(f"Installed '{safe_name}' from {source_label}.")
|
||||
|
||||
185
docs/agent.md
185
docs/agent.md
@@ -1,185 +0,0 @@
|
||||
# CowAgent介绍
|
||||
|
||||
## 概述
|
||||
|
||||
Cow项目从简单的聊天机器人全面升级为超级智能助理 **CowAgent**,能够主动规思考和规划任务、拥有长期记忆、操作计算机和外部资源、创造和执行Skill,真正理解你并和你一起成长。CowAgent能够长期运行在个人电脑或服务器中,通过飞书、钉钉、企业微信、网页等多种方式进行交互。核心能力如下:
|
||||
|
||||
- **复杂任务规划**:能够理解复杂任务并自主规划执行,持续思考和调用工具直到完成目标,支持多轮推理和上下文理解
|
||||
- **工具系统**:内置实现10+种工具,包括文件读写、bash终端、浏览器、定时任务、记忆管理等,通过Agent管理你的计算机或服务器
|
||||
- **长期记忆**:自动将对话记忆持久化至本地文件和数据库中,包括全局记忆和天级记忆,支持关键词及向量检索
|
||||
- **Skills系统**:新增Skill运行引擎,内置多种技能,并支持通过自然语言对话完成自定义Skills开发
|
||||
- **多渠道和多模型支持**:支持在Web、飞书、钉钉、企微等多渠道与Agent交互,支持Claude、Gemini、OpenAI、GLM、MiniMax、Qwen、Kimi、Doubao 等多种国内外主流模型
|
||||
- **安全和成本**:通过秘钥管理工具、提示词控制、系统权限等手段控制Agent的访问安全;通过最大记忆轮次、最大上下文token、工具执行步数对token成本进行限制
|
||||
|
||||
|
||||
## 核心功能
|
||||
|
||||
### 1. 长期记忆
|
||||
|
||||
> 记忆系统让 Agent 能够长期记住重要信息。Agent 会在用户分享偏好、决策、事实等重要信息时主动存储,也会在对话达到一定长度时自动提取摘要。记忆分为核心记忆、天级记忆,支持语义搜索和向量检索的混合检索模式。
|
||||
|
||||
|
||||
第一次启动Agent会主动向用户获取询问关键信息,并记录至工作空间 (默认为 ~/cow) 中的智能体设定、用户身份、记忆文件中。
|
||||
|
||||
在后续的长期对话中,Agent会在需要的时候智能记录或检索记忆,并对自身设定、用户偏好、记忆文件等进行不断更新,总结和记录经验和教训,真正实现自主思考和不断成长。
|
||||
|
||||
<img width="800" src="https://cdn.link-ai.tech/doc/20260203000455.png" />
|
||||
|
||||
|
||||
|
||||
### 2. 任务规划和工具调用
|
||||
|
||||
工具是Agent访问操作系统资源的核心,Agent会根据任务需求智能选择和调用工具,完成文件读写、命令执行、定时任务等各类操作。内置工具的视线在项目的 `tools` 目录下。
|
||||
|
||||
**主要工具:** 文件读写编辑、Bash终端、浏览器、文件发送、定时调度、记忆搜索、环境配置等。
|
||||
|
||||
#### 1.1 终端和文件访问能力
|
||||
|
||||
针对操作系统的终端和文件的访问能力,是最基础和核心的工具,其他很多工具或技能都是基于基础工具进行扩展。用户可通过手机端与Agent交互,操作个人电脑或服务器上的资源:
|
||||
|
||||
<img width="800" src="https://cdn.link-ai.tech/doc/20260202181130.png" />
|
||||
|
||||
#### 1.2 编程能力
|
||||
|
||||
基于编程能力和系统访问能力,Agent可以实现从信息搜索、图片等素材生成、编码、测试、部署、Nginx配置修改、发布的 Vibecoding 全流程,通过手机端简单的一句命令完成应用的快速demo:
|
||||
|
||||
|
||||
<img width="800" src="https://cdn.link-ai.tech/doc/20260203121008.png" />
|
||||
|
||||
|
||||
|
||||
#### 1.3 定时任务
|
||||
|
||||
基于 scheduler 工具实现动态定时任务,支持 **一次性任务、固定时间间隔、Cron表达式** 三种形式,任务触发可选择**固定消息发送** 或 **Agent动态任务** 执行两种模式,有很高灵活性:
|
||||
|
||||
|
||||
<img width="800" src="https://cdn.link-ai.tech/doc/20260202195402.png" />
|
||||
|
||||
同时你也可以通过自然语言快速查看和管理已有的定时任务。
|
||||
|
||||
|
||||
#### 1.4 环境变量管理
|
||||
|
||||
技能所需要的秘钥存储在环境变量文件中,由 `env_config` 工具进行管理,你可以通过对话的方式更新秘钥,工具内置了安全保护和脱敏策略,会严格保护秘钥安全:
|
||||
|
||||
<img width="800" src="https://cdn.link-ai.tech/doc/20260202234939.png" />
|
||||
|
||||
### 3. 技能系统
|
||||
|
||||
> 技能系统为Agent提供无限的扩展性,每个Skill由说明文件、运行脚本 (可选)、资源 (可选) 组成,描述如何完成特定类型的任务。通过Skill可以让Agent遵循说明完成复杂流程,调用各类工具或对接第三方系统等。
|
||||
|
||||
- **内置技能:** 在项目的`skills`目录下,包含技能创造器、网络搜索、图像识别(openai-image-vision)、LinkAI智能体、网页抓取等。内置Skill根据依赖条件 (API Key、系统命令等) 自动判断是否启用。通过技能创造器可以快速创建自定义技能。
|
||||
|
||||
- **自定义技能:** 由用户通过对话创建,存放在工作空间中 (`~/cow/skills/`),基于自定义技能可以实现任何复杂的业务流程和第三方系统对接。
|
||||
|
||||
|
||||
#### 3.1 创建技能
|
||||
|
||||
通过 `skill-creator` 技能可以通过对话的方式快速创建技能。你可以在与Agent的写作中让他对将某个工作流程固化为技能,或者把任意接口文档和示例发送给Agent,让他直接完成对接:
|
||||
|
||||
<img width="800" src="https://cdn.link-ai.tech/doc/20260202202247.png" />
|
||||
|
||||
|
||||
#### 3.2 搜索和图像识别
|
||||
|
||||
- **搜索技能:** 系统内置实现了 `bocha-search`(博查搜索)的Skill,依赖环境变量 `BOCHA_SEARCH_API_KEY`,可在[控制台](https://open.bochaai.com/)进行创建,并发送给Agent完成配置
|
||||
- **图像识别技能:** 实现了 `openai-image-vision` 插件,可使用 gpt-4.1-mini、gpt-4.1 等图像识别模型。依赖秘钥 `OPENAI_API_KEY`,可通过config.json或env_config工具进行维护。
|
||||
|
||||
<img width="800" src="https://cdn.link-ai.tech/doc/20260202213219.png" />
|
||||
|
||||
|
||||
#### 3.3 三方知识库和插件
|
||||
|
||||
`linkai-agent` 技能可以将 [LinkAI](https://link-ai.tech/) 上的所有智能体作为skill交给Agent使用,并实现多智能体决策的效果。
|
||||
|
||||
使用方式:需通过对话的方式配置 `LINKAI_API_KEY`,或在config.json中添加 `linkai_api_key`。 并在 `skills/linkai-agent/config.json`中添加智能体说明,示例如下:
|
||||
|
||||
```json
|
||||
{
|
||||
"apps": [
|
||||
{
|
||||
"app_code": "G7z6vKwp",
|
||||
"app_name": "LinkAI客服助手",
|
||||
"app_description": "当用户需要了解LinkAI平台相关问题时才选择该助手,基于LinkAI知识库进行回答"
|
||||
},
|
||||
{
|
||||
"app_code": "SFY5x7JR",
|
||||
"app_name": "内容创作助手",
|
||||
"app_description": "当用户需要创作图片或视频时才使用该助手,支持Nano Banana、Seedream、即梦、Veo、可灵等多种模型"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
Agent可根据智能体的名称和描述进行决策,并通过 app_code 调用接口访问对应的应用/工作流,通过该技能,可以灵活访问LinkAI平台上的智能体、知识库、插件等能力,实现效果如下:
|
||||
|
||||
<img width="750" src="https://cdn.link-ai.tech/doc/20260202234350.png" />
|
||||
|
||||
注:需通过 `env_config` 配置 `LINKAI_API_KEY`,或在config.json中添加 `linkai_api_key` 配置。
|
||||
|
||||
|
||||
## 使用方式
|
||||
|
||||
> 详细使用方式参考项目README.md文档进行
|
||||
|
||||
### 1.项目运行
|
||||
|
||||
在命令行中执行:
|
||||
|
||||
```bash
|
||||
bash <(curl -fsSL https://cdn.link-ai.tech/code/cow/run.sh)
|
||||
```
|
||||
|
||||
详细说明及后续程序管理参考:[项目启动脚本](https://github.com/zhayujie/chatgpt-on-wechat/wiki/CowAgentQuickStart)
|
||||
|
||||
|
||||
### 2.模型选择
|
||||
|
||||
Agent模式推荐使用以下模型,可根据效果及成本综合选择:
|
||||
|
||||
- **MiniMax**: `MiniMax-M2.7`
|
||||
- **GLM**: `glm-5-turbo`
|
||||
- **Kimi**: `kimi-k2.5`
|
||||
- **Doubao**: `doubao-seed-2-0-code-preview-260215`
|
||||
- **Qwen**: `qwen3.5-plus`
|
||||
- **Claude**: `claude-sonnet-4-6`
|
||||
- **Gemini**: `gemini-3.1-flash-lite-preview`
|
||||
- **OpenAI**: `gpt-5.4`
|
||||
|
||||
详细模型配置方式参考 [README.md 模型说明](../README.md#模型说明)
|
||||
|
||||
### 3.Agent核心配置
|
||||
|
||||
Agent模式的核心配置项如下,在 `config.json` 中配置:
|
||||
|
||||
```bash
|
||||
{
|
||||
"agent": true, # 是否启用Agent模式
|
||||
"agent_workspace": "~/cow", # Agent工作空间路径
|
||||
"agent_max_context_tokens": 40000, # 最大上下文tokens
|
||||
"agent_max_context_turns": 30, # 最大上下文记忆轮次
|
||||
"agent_max_steps": 15 # 单次任务最大决策步数
|
||||
}
|
||||
```
|
||||
|
||||
**配置说明:**
|
||||
|
||||
- `agent`: 设为 `true` 启用Agent模式,获得多轮工具决策、长期记忆、Skills等能力
|
||||
- `agent_workspace`: 工作空间路径,用于存储 memory、skills、其他系统设定提示词
|
||||
- `agent_max_context_tokens`: 上下文token上限,超出将自动丢弃最早的对话
|
||||
- `agent_max_context_turns`: 上下文记忆轮次,每轮包括一次提问和回复
|
||||
- `agent_max_steps`: 单次任务最大工具调用步数,防止无限循环
|
||||
|
||||
|
||||
### 4.渠道接入
|
||||
|
||||
Agent支持在多种渠道中使用,只需修改 `config.json` 中的 `channel_type` 配置即可切换。
|
||||
|
||||
- **Web网页**:默认使用该渠道,运行后监听本地端口,通过浏览器访问
|
||||
- **飞书接入**:[飞书接入文档](https://docs.link-ai.tech/cow/multi-platform/feishu)
|
||||
- **钉钉接入**:[钉钉接入文档](https://docs.link-ai.tech/cow/multi-platform/dingtalk)
|
||||
- **企业微信应用接入**:[企微应用文档](https://docs.link-ai.tech/cow/multi-platform/wechat-com)
|
||||
- **企微智能机器人**:[企微智能机器人文档](https://docs.link-ai.tech/cow/multi-platform/wecom-bot)
|
||||
- **QQ机器人**:[QQ机器人文档](https://docs.link-ai.tech/cow/multi-platform/qq)
|
||||
|
||||
更多渠道配置参考:[通道说明](../README.md#通道说明)
|
||||
@@ -9,7 +9,23 @@ description: 将 CowAgent 接入企业微信智能机器人(长连接模式)
|
||||
智能机器人与企业微信自建应用是两种不同的接入方式。智能机器人使用 WebSocket 长连接,无需服务器公网 IP 和域名,配置更简单。
|
||||
</Note>
|
||||
|
||||
## 一、创建智能机器人
|
||||
## 一、接入方式
|
||||
|
||||
### 方式一:扫码一键接入(推荐)
|
||||
|
||||
无需提前创建机器人,启动 Cow 项目后打开 Web 控制台(本地链接:http://127.0.0.1:9899/),选择 **通道** 菜单,点击**接入通道**,选择**企微智能机器人**,切换到「扫码接入」模式,使用**企业微信**扫码即可自动完成机器人创建和接入。
|
||||
|
||||
<img src="https://cdn.link-ai.tech/doc/20260401121213.png" width="800"/>
|
||||
|
||||
<Note>
|
||||
扫码成功后,可在企业微信工作台 - **智能机器人**页面对机器人进行进一步配置,包括修改名称、头像、可见范围等。
|
||||
</Note>
|
||||
|
||||
### 方式二:手动创建接入
|
||||
|
||||
需要先在企业微信中创建智能机器人并获取 Bot ID 和 Secret,再通过 Web 控制台或配置文件接入。
|
||||
|
||||
**步骤一:创建智能机器人**
|
||||
|
||||
1. 打开企业微信客户端,进入工作台,点击**智能机器人**:
|
||||
|
||||
@@ -25,34 +41,35 @@ description: 将 CowAgent 接入企业微信智能机器人(长连接模式)
|
||||
|
||||
4. 设置机器人名称、头像、可见范围,并选择**长连接模式**,记录下 **Bot ID** 和 **Secret** 信息后点击保存。
|
||||
|
||||
## 二、配置和运行
|
||||
**步骤二:接入 CowAgent**
|
||||
|
||||
### 方式一:Web 控制台接入
|
||||
<Tabs>
|
||||
<Tab title="Web 控制台">
|
||||
打开 Web 控制台,选择**通道**菜单,点击**接入通道**,选择**企微智能机器人**,切换到「手动填写」模式,输入 Bot ID 和 Secret,点击接入即可。
|
||||
|
||||
启动Cow项目后打开 Web 控制台 (本地链接为: http://127.0.0.1:9899/ ),选择 **通道** 菜单,点击 **接入通道**,选择 **企微智能机器人**,填写上一步保存的 Bot ID 和 Secret,点击接入即可。
|
||||
<img src="https://cdn.link-ai.tech/doc/20260316181711.png" width="800"/>
|
||||
</Tab>
|
||||
<Tab title="配置文件">
|
||||
在 `config.json` 中添加以下配置后启动程序:
|
||||
|
||||
<img src="https://cdn.link-ai.tech/doc/20260316181711.png" width="800"/>
|
||||
```json
|
||||
{
|
||||
"channel_type": "wecom_bot",
|
||||
"wecom_bot_id": "YOUR_BOT_ID",
|
||||
"wecom_bot_secret": "YOUR_SECRET"
|
||||
}
|
||||
```
|
||||
|
||||
### 方式二:配置文件接入
|
||||
| 参数 | 说明 |
|
||||
| --- | --- |
|
||||
| `wecom_bot_id` | 智能机器人的 BotID |
|
||||
| `wecom_bot_secret` | 智能机器人的 Secret |
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
在 `config.json` 中添加以下配置:
|
||||
日志显示 `[WecomBot] Subscribe success` 即表示连接成功。
|
||||
|
||||
```json
|
||||
{
|
||||
"channel_type": "wecom_bot",
|
||||
"wecom_bot_id": "YOUR_BOT_ID",
|
||||
"wecom_bot_secret": "YOUR_SECRET"
|
||||
}
|
||||
```
|
||||
|
||||
| 参数 | 说明 |
|
||||
| --- | --- |
|
||||
| `wecom_bot_id` | 智能机器人的 BotID |
|
||||
| `wecom_bot_secret` | 智能机器人的 Secret |
|
||||
|
||||
配置完成后启动程序,日志显示 `[WecomBot] Subscribe success` 即表示连接成功。
|
||||
|
||||
## 三、功能说明
|
||||
## 二、功能说明
|
||||
|
||||
| 功能 | 支持情况 |
|
||||
| --- | --- |
|
||||
@@ -64,7 +81,7 @@ description: 将 CowAgent 接入企业微信智能机器人(长连接模式)
|
||||
| 流式回复 | ✅ |
|
||||
| 定时任务主动推送 | ✅ |
|
||||
|
||||
## 四、使用
|
||||
## 三、使用
|
||||
|
||||
在企业微信中搜索创建的机器人名称,即可开始单聊对话。
|
||||
|
||||
|
||||
@@ -129,7 +129,8 @@
|
||||
"pages": [
|
||||
"skills/index",
|
||||
"skills/install",
|
||||
"skills/create"
|
||||
"skills/create",
|
||||
"skills/hub"
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -185,6 +186,7 @@
|
||||
"group": "发布记录",
|
||||
"pages": [
|
||||
"releases/overview",
|
||||
"releases/v2.0.5",
|
||||
"releases/v2.0.4",
|
||||
"releases/v2.0.3",
|
||||
"releases/v2.0.2",
|
||||
@@ -288,7 +290,8 @@
|
||||
"pages": [
|
||||
"en/skills/index",
|
||||
"en/skills/install",
|
||||
"en/skills/skill-creator"
|
||||
"en/skills/skill-creator",
|
||||
"en/skills/hub"
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -344,6 +347,7 @@
|
||||
"group": "Release Notes",
|
||||
"pages": [
|
||||
"en/releases/overview",
|
||||
"en/releases/v2.0.5",
|
||||
"en/releases/v2.0.4",
|
||||
"en/releases/v2.0.2",
|
||||
"en/releases/v2.0.1",
|
||||
@@ -447,7 +451,8 @@
|
||||
"pages": [
|
||||
"ja/skills/index",
|
||||
"ja/skills/install",
|
||||
"ja/skills/create"
|
||||
"ja/skills/create",
|
||||
"ja/skills/hub"
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -503,6 +508,7 @@
|
||||
"group": "リリースノート",
|
||||
"pages": [
|
||||
"ja/releases/overview",
|
||||
"ja/releases/v2.0.5",
|
||||
"ja/releases/v2.0.4",
|
||||
"ja/releases/v2.0.3",
|
||||
"ja/releases/v2.0.2",
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
<a href="https://cowagent.ai/">🌐 Website</a> ·
|
||||
<a href="https://docs.cowagent.ai/en/intro/index">📖 Docs</a> ·
|
||||
<a href="https://docs.cowagent.ai/en/guide/quick-start">🚀 Quick Start</a> ·
|
||||
<a href="https://skills.cowagent.ai/">🧩 Skill Hub</a> ·
|
||||
<a href="https://link-ai.tech/cowagent/create">☁️ Try Online</a>
|
||||
</p>
|
||||
|
||||
@@ -41,6 +42,8 @@ Try online (no deployment needed): [CowAgent](https://link-ai.tech/cowagent/crea
|
||||
|
||||
## Changelog
|
||||
|
||||
> **2026.04.01:** [v2.0.5](https://github.com/zhayujie/chatgpt-on-wechat/releases/tag/2.0.5) — Cow CLI, Skill Hub open source, Browser tool, WeCom Bot QR scan, and more.
|
||||
|
||||
> **2026.02.27:** [v2.0.2](https://github.com/zhayujie/chatgpt-on-wechat/releases/tag/2.0.2) — Web console overhaul (streaming chat, model/skill/memory/channel/scheduler/log management), multi-channel concurrent running, session persistence, new models including Gemini 3.1 Pro / Claude 4.6 Sonnet / Qwen3.5 Plus.
|
||||
|
||||
> **2026.02.13:** [v2.0.1](https://github.com/zhayujie/chatgpt-on-wechat/releases/tag/2.0.1) — Built-in Web Search tool, smart context trimming, runtime info dynamic update, Windows compatibility, fixes for scheduler memory loss, Feishu connection issues, and more.
|
||||
@@ -223,6 +226,7 @@ Multiple channels can be enabled simultaneously, separated by commas: `"channel_
|
||||
|
||||
## 🔗 Related Projects
|
||||
|
||||
- [Cow Skill Hub](https://github.com/zhayujie/cow-skill-hub): Open skill marketplace for AI Agents — browse, search, install, and publish skills for CowAgent, OpenClaw, Claude Code, and more.
|
||||
- [bot-on-anything](https://github.com/zhayujie/bot-on-anything): Lightweight and highly extensible LLM application framework supporting Slack, Telegram, Discord, Gmail, and more.
|
||||
- [AgentMesh](https://github.com/MinimalFuture/AgentMesh): Open-source Multi-Agent framework for complex problem solving through agent team collaboration.
|
||||
|
||||
@@ -232,7 +236,7 @@ FAQs: <https://github.com/zhayujie/chatgpt-on-wechat/wiki/FAQs>
|
||||
|
||||
## 🛠️ Contributing
|
||||
|
||||
Welcome to add new channels, referring to the [Feishu channel](https://github.com/zhayujie/chatgpt-on-wechat/blob/master/channel/feishu/feishu_channel.py) as an example. Also welcome to contribute new Skills, see the [Skill Creation docs](https://docs.cowagent.ai/en/skills/create).
|
||||
Welcome to add new channels, referring to the [Feishu channel](https://github.com/zhayujie/chatgpt-on-wechat/blob/master/channel/feishu/feishu_channel.py) as an example. Also welcome to contribute new Skills, see the [Skill Creation docs](https://docs.cowagent.ai/en/skills/create), or submit to [Skill Hub](https://skills.cowagent.ai/submit).
|
||||
|
||||
## ✉ Contact
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Features
|
||||
description: CowAgent long-term memory, task planning, and skills system in detail
|
||||
description: CowAgent long-term memory, task planning, skills system, CLI commands, and browser tool in detail
|
||||
---
|
||||
|
||||
## 1. Long-term Memory
|
||||
@@ -19,7 +19,7 @@ In subsequent long-term conversations, the Agent intelligently stores or retriev
|
||||
|
||||
Tools are the core of how the Agent accesses operating system resources. The Agent intelligently selects and invokes tools based on task requirements, performing file read/write, command execution, scheduled tasks, and more. Built-in tools are implemented in the project's `agent/tools/` directory.
|
||||
|
||||
**Key tools:** file read/write/edit, Bash terminal, file send, scheduler, memory search, web search, environment config, and more.
|
||||
**Key tools:** file read/write/edit, Bash terminal, browser, file send, scheduler, memory search, web search, environment config, and more.
|
||||
|
||||
### 2.1 Terminal and File Access
|
||||
|
||||
@@ -45,7 +45,15 @@ The `scheduler` tool enables dynamic scheduled tasks, supporting **one-time task
|
||||
<img src="https://cdn.link-ai.tech/doc/20260202195402.png" width="800" />
|
||||
</Frame>
|
||||
|
||||
### 2.4 Environment Variable Management
|
||||
### 2.4 Browser
|
||||
|
||||
The built-in `browser` tool allows the Agent to control a Chromium browser to visit web pages, fill forms, click elements, and take screenshots, with support for dynamic JS-rendered pages. Run `cow install-browser` to install with one command, automatically adapting to server (headless) and desktop environments:
|
||||
|
||||
<Frame>
|
||||
<img src="https://cdn.link-ai.tech/doc/20260401110103.png" width="800" />
|
||||
</Frame>
|
||||
|
||||
### 2.5 Environment Variable Management
|
||||
|
||||
Secrets required by skills are stored in an environment variable file, managed by the `env_config` tool. You can update secrets through conversation, with built-in security protection and desensitization:
|
||||
|
||||
@@ -57,9 +65,12 @@ Secrets required by skills are stored in an environment variable file, managed b
|
||||
|
||||
The Skills system provides infinite extensibility for the Agent. Each Skill consists of a description file, execution scripts (optional), and resources (optional), describing how to complete specific types of tasks. Skills allow the Agent to follow instructions for complex workflows, invoke tools, or integrate third-party systems.
|
||||
|
||||
- **[Skill Hub](https://skills.cowagent.ai/):** An open skill marketplace featuring official, community, and third-party skills. Install with one command.
|
||||
- **Built-in skills:** Located in the project's `skills/` directory, including skill creator, image recognition, LinkAI agent, web fetch, and more. Built-in skills are automatically enabled based on dependency conditions (API keys, system commands, etc.).
|
||||
- **Custom skills:** Created by users through conversation, stored in the workspace (`~/cow/skills/`), capable of implementing any complex business process or third-party integration.
|
||||
|
||||
Install skills: `/skill install <name>` or `cow skill install <name>`, supporting Skill Hub, GitHub, ClawHub, URL, and more.
|
||||
|
||||
### 3.1 Creating Skills
|
||||
|
||||
The `skill-creator` skill enables rapid skill creation through conversation. You can ask the Agent to codify a workflow as a skill, or send any API documentation and examples for the Agent to complete the integration directly:
|
||||
@@ -77,29 +88,33 @@ The `skill-creator` skill enables rapid skill creation through conversation. You
|
||||
<img src="https://cdn.link-ai.tech/doc/20260202213219.png" width="800" />
|
||||
</Frame>
|
||||
|
||||
### 3.3 Third-party Knowledge Bases and Plugins
|
||||
### 3.3 Skill Hub
|
||||
|
||||
The `linkai-agent` skill makes all agents on [LinkAI](https://link-ai.tech/) available as Skills for the Agent, enabling multi-agent decision making.
|
||||
Visit [skills.cowagent.ai](https://skills.cowagent.ai/) to browse all available skills, or use commands in conversation:
|
||||
|
||||
Configuration: set `LINKAI_API_KEY` via `env_config`, then add agent descriptions in `skills/linkai-agent/config.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"apps": [
|
||||
{
|
||||
"app_code": "G7z6vKwp",
|
||||
"app_name": "LinkAI Customer Support",
|
||||
"app_description": "Select only when the user needs help with LinkAI platform questions"
|
||||
},
|
||||
{
|
||||
"app_code": "SFY5x7JR",
|
||||
"app_name": "Content Creator",
|
||||
"app_description": "Use only when the user needs to create images or videos"
|
||||
}
|
||||
]
|
||||
}
|
||||
```text
|
||||
/skill list --remote # Browse Skill Hub
|
||||
/skill search <keyword> # Search skills
|
||||
/skill install <name> # Install with one command
|
||||
```
|
||||
|
||||
<Frame>
|
||||
<img src="https://cdn.link-ai.tech/doc/20260202234350.png" width="750" />
|
||||
</Frame>
|
||||
Also supports installing skills from GitHub, ClawHub, LinkAI, and other third-party platforms. See [Install Skills](/en/skills/install) for details.
|
||||
|
||||
<img src="https://cdn.link-ai.tech/doc/20260401110103.png" width="750" />
|
||||
|
||||
## 4. CLI Command System
|
||||
|
||||
CowAgent provides two command interaction methods, covering service management, skill installation, configuration, and more:
|
||||
|
||||
- **Terminal CLI:** Run `cow <command>` in the system terminal, supporting `start`, `stop`, `restart`, `update`, `status`, `logs`, `skill`, etc.
|
||||
- **Chat commands:** Type `/<command>` in conversation. The Web console shows a command menu when you type `/`.
|
||||
|
||||
```bash
|
||||
cow start # Start service
|
||||
cow stop # Stop service
|
||||
cow update # Update and restart
|
||||
cow skill install pptx # Install a skill
|
||||
cow install-browser # Install browser tool
|
||||
```
|
||||
|
||||
See [Command Overview](https://docs.cowagent.ai/en/commands) for details.
|
||||
|
||||
@@ -5,6 +5,7 @@ description: CowAgent version history
|
||||
|
||||
| Version | Date | Description |
|
||||
| --- | --- | --- |
|
||||
| [2.0.5](/en/releases/v2.0.5) | 2026.04.01 | Cow CLI, Skill Hub open source, Browser tool, WeCom Bot QR scan, and more |
|
||||
| [2.0.4](/en/releases/v2.0.4) | 2026.03.22 | Personal WeChat channel, new model support, Japanese docs, script refactoring and bug fixes |
|
||||
| [2.0.2](/en/releases/v2.0.2) | 2026.02.27 | Web Console upgrade, multi-channel concurrency, session persistence |
|
||||
| [2.0.1](/en/releases/v2.0.1) | 2026.02.27 | Built-in Web Search tool, smart context management, multiple fixes |
|
||||
|
||||
77
docs/en/releases/v2.0.5.mdx
Normal file
77
docs/en/releases/v2.0.5.mdx
Normal file
@@ -0,0 +1,77 @@
|
||||
---
|
||||
title: v2.0.5
|
||||
description: CowAgent 2.0.5 - Cow CLI, Skill Hub open source, Browser tool, WeCom Bot QR scan, and more
|
||||
---
|
||||
|
||||
## 🖥️ Cow CLI
|
||||
|
||||
New CLI command system for managing CowAgent from terminal and chat:
|
||||
|
||||
- **Terminal commands**: Run `cow <command>` for `start`, `stop`, `restart`, `update`, `status`, `logs`, etc.
|
||||
- **Chat commands**: Type `/<command>` in conversation for `/help`, `/status`, `/config`, `/skill`, `/context`, `/logs`, `/version`, etc.
|
||||
- **Web console**: Type `/` in the input box to open a slash command menu, with arrow-key input history
|
||||
- **Windows support**: New PowerShell script `scripts/run.ps1` with `cow` command support
|
||||
|
||||
Docs: [Command Overview](https://docs.cowagent.ai/en/commands)
|
||||
|
||||
<img src="https://cdn.link-ai.tech/doc/20260401114549.png" width="750" />
|
||||
|
||||
## 🧩 Cow Skill Hub Open Source
|
||||
|
||||
[Cow Skill Hub](https://skills.cowagent.ai) is now open source and live — browse, search, install, and publish AI Agent skills:
|
||||
|
||||
- **One-command install**: `/skill install <name>` in chat or `cow skill install <name>` in terminal
|
||||
- **Multi-source**: Install from Skill Hub, GitHub, ClawHub, LinkAI, and more
|
||||
- **Search**: `/skill search` and `/skill list --remote` to browse the hub
|
||||
- **Publish**: Submit your own skills at [skills.cowagent.ai/submit](https://skills.cowagent.ai/submit)
|
||||
- **Mirror**: Mirror acceleration for faster downloads in China
|
||||
|
||||
Open source repo: [cow-skill-hub](https://github.com/zhayujie/cow-skill-hub)
|
||||
|
||||
Docs: [Skill Hub](https://docs.cowagent.ai/en/skills/hub), [Install Skills](https://docs.cowagent.ai/en/skills/install)
|
||||
|
||||
<img src="https://cdn.link-ai.tech/doc/20260401110103.png" width="750" />
|
||||
|
||||
## 🌐 Browser Tool
|
||||
|
||||
New Browser tool — Agent can control a Chromium browser to visit and interact with web pages:
|
||||
|
||||
- **Navigation & interaction**: `navigate`, `click`, `fill`, `select`, `scroll`, `press`, etc.
|
||||
- **Page snapshot**: Compact DOM snapshot for efficient page understanding, auto-snapshot after navigation
|
||||
- **Screenshot**: Save page screenshots to workspace
|
||||
- **JavaScript execution**: Run custom scripts on pages
|
||||
- **CLI install**: `cow install-browser` for one-command setup
|
||||
- **Docker support**: Browser install built into Docker image
|
||||
|
||||
Docs: [Browser Tool](https://docs.cowagent.ai/en/tools/browser)
|
||||
|
||||
<img src="https://cdn.link-ai.tech/doc/20260401115728.png" width="750" />
|
||||
|
||||
## 🤖 WeCom Bot QR Code Setup
|
||||
|
||||
WeCom Bot channel now supports QR code scan for one-click bot creation:
|
||||
|
||||
- **QR scan in Web console**: Select "Scan QR" mode, scan with WeCom to auto-create and connect a bot — no manual configuration needed
|
||||
- **Manual mode**: Still supports manual Bot ID and Secret input
|
||||
- **Stream push optimization**: Throttled push to avoid WebSocket congestion
|
||||
|
||||
Docs: [WeCom Bot](https://docs.cowagent.ai/en/channels/wecom-bot)
|
||||
|
||||
PR: [#2735](https://github.com/zhayujie/chatgpt-on-wechat/pull/2735). Thanks [@WecomTeam](https://github.com/WecomTeam)
|
||||
|
||||
## 🐛 Other Improvements & Fixes
|
||||
|
||||
- **DeepSeek module**: Independent DeepSeek Bot with dedicated `deepseek_api_key` config ([#2719](https://github.com/zhayujie/chatgpt-on-wechat/pull/2719)). Thanks [@6vision](https://github.com/6vision)
|
||||
- **Web console**: Slash command menu, input history, new model options, mobile optimization ([#2731](https://github.com/zhayujie/chatgpt-on-wechat/pull/2731)). Thanks [@zkjqd](https://github.com/zkjqd)
|
||||
- **Context loss**: Fix context loss after trimming ([393f0c0](https://github.com/zhayujie/chatgpt-on-wechat/commit/393f0c0))
|
||||
- **System prompt**: Fix system prompt not rebuilding on every turn ([13f5fde](https://github.com/zhayujie/chatgpt-on-wechat/commit/13f5fde))
|
||||
- **Gemini**: Fix missing model attribute in GoogleGeminiBot ([#2716](https://github.com/zhayujie/chatgpt-on-wechat/pull/2716)). Thanks [@cowagent](https://github.com/cowagent)
|
||||
- **WeChat channel**: Fix file send failures and filename loss ([6d9b7ba](https://github.com/zhayujie/chatgpt-on-wechat/commit/6d9b7ba), [45faa9c](https://github.com/zhayujie/chatgpt-on-wechat/commit/45faa9c))
|
||||
- **Docker**: Fix volume permissions, reduce image size ([3eb8348](https://github.com/zhayujie/chatgpt-on-wechat/commit/3eb8348), [4470d4c](https://github.com/zhayujie/chatgpt-on-wechat/commit/4470d4c))
|
||||
- **Security**: Fix Memory Content path traversal risk. Thanks [@August829](https://github.com/August829)
|
||||
|
||||
## 📦 Upgrade
|
||||
|
||||
Run `cow update` or `./run.sh update` to upgrade, or pull the latest code and restart. See [Upgrade Guide](https://docs.cowagent.ai/en/guide/upgrade).
|
||||
|
||||
**Release Date**: 2026.04.01 | [Full Changelog](https://github.com/zhayujie/chatgpt-on-wechat/compare/2.0.4...master)
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: 功能介绍
|
||||
description: CowAgent 长期记忆、任务规划、技能系统详细说明
|
||||
description: CowAgent 长期记忆、任务规划、技能系统、CLI 命令、浏览器工具详细说明
|
||||
---
|
||||
|
||||
## 1. 长期记忆
|
||||
@@ -19,7 +19,7 @@ description: CowAgent 长期记忆、任务规划、技能系统详细说明
|
||||
|
||||
工具是 Agent 访问操作系统资源的核心,Agent 会根据任务需求智能选择和调用工具,完成文件读写、命令执行、定时任务等各类操作。内置工具的实现在项目的 `agent/tools/` 目录下。
|
||||
|
||||
**主要工具:** 文件读写编辑、Bash 终端、文件发送、定时调度、记忆搜索、联网搜索、环境配置等。
|
||||
**主要工具:** 文件读写编辑、Bash 终端、浏览器操作、文件发送、定时调度、记忆搜索、联网搜索、环境配置等。
|
||||
|
||||
### 2.1 终端和文件访问
|
||||
|
||||
@@ -45,7 +45,15 @@ description: CowAgent 长期记忆、任务规划、技能系统详细说明
|
||||
<img src="https://cdn.link-ai.tech/doc/20260202195402.png" width="800" />
|
||||
</Frame>
|
||||
|
||||
### 2.4 环境变量管理
|
||||
### 2.4 浏览器操作
|
||||
|
||||
内置 `browser` 工具,Agent 可控制浏览器访问网页、填写表单、点击元素、截图,支持动态 JS 渲染页面。运行 `cow install-browser` 一键安装,自动适配服务器(无头模式)和桌面环境:
|
||||
|
||||
<Frame>
|
||||
<img src="https://cdn.link-ai.tech/doc/20260401115728.png" width="750" />
|
||||
</Frame>
|
||||
|
||||
### 2.5 环境变量管理
|
||||
|
||||
技能所需的秘钥存储在环境变量文件中,由 `env_config` 工具进行管理,你可以通过对话的方式更新秘钥,工具内置安全保护和脱敏策略:
|
||||
|
||||
@@ -57,9 +65,12 @@ description: CowAgent 长期记忆、任务规划、技能系统详细说明
|
||||
|
||||
技能系统为 Agent 提供无限的扩展性,每个 Skill 由说明文件、运行脚本(可选)、资源(可选)组成,描述如何完成特定类型的任务。通过 Skill 可以让 Agent 遵循说明完成复杂流程、调用各类工具或对接第三方系统。
|
||||
|
||||
- **[Skill Hub](https://skills.cowagent.ai/):** 开放的技能广场,汇集官方推荐、社区贡献和第三方技能,支持一键安装。
|
||||
- **内置技能:** 在项目的 `skills/` 目录下,包含技能创造器、图像识别、LinkAI 智能体、网页抓取等。内置 Skill 根据依赖条件(API Key、系统命令等)自动判断是否启用。
|
||||
- **自定义技能:** 由用户通过对话创建,存放在工作空间中(`~/cow/skills/`),可实现任何复杂的业务流程和第三方系统对接。
|
||||
|
||||
安装技能:`/skill install <名称>` 或 `cow skill install <名称>`,支持从 Skill Hub、GitHub、ClawHub、URL 等来源安装。
|
||||
|
||||
### 3.1 创建技能
|
||||
|
||||
通过 `skill-creator` 技能可以通过对话的方式快速创建技能。你可以让 Agent 将某个工作流程固化为技能,或者把任意接口文档和示例发送给 Agent,让他直接完成对接:
|
||||
@@ -77,29 +88,36 @@ description: CowAgent 长期记忆、任务规划、技能系统详细说明
|
||||
<img src="https://cdn.link-ai.tech/doc/20260202213219.png" width="800" />
|
||||
</Frame>
|
||||
|
||||
### 3.3 三方知识库和插件
|
||||
### 3.3 技能广场
|
||||
|
||||
`linkai-agent` 技能可以将 [LinkAI](https://link-ai.tech/) 上的所有智能体作为 Skill 交给 Agent 使用,实现多智能体决策效果。
|
||||
访问 [skills.cowagent.ai](https://skills.cowagent.ai/) 浏览所有可用技能,或在对话中执行:
|
||||
|
||||
配置方式:通过 `env_config` 配置 `LINKAI_API_KEY`,并在 `skills/linkai-agent/config.json` 中添加智能体说明:
|
||||
|
||||
```json
|
||||
{
|
||||
"apps": [
|
||||
{
|
||||
"app_code": "G7z6vKwp",
|
||||
"app_name": "LinkAI客服助手",
|
||||
"app_description": "当用户需要了解LinkAI平台相关问题时才选择该助手"
|
||||
},
|
||||
{
|
||||
"app_code": "SFY5x7JR",
|
||||
"app_name": "内容创作助手",
|
||||
"app_description": "当用户需要创作图片或视频时才使用该助手"
|
||||
}
|
||||
]
|
||||
}
|
||||
```text
|
||||
/skill list --remote # 浏览技能广场
|
||||
/skill search <关键词> # 搜索技能
|
||||
/skill install <名称> # 一键安装
|
||||
```
|
||||
|
||||
<Frame>
|
||||
<img src="https://cdn.link-ai.tech/doc/20260202234350.png" width="750" />
|
||||
</Frame>
|
||||
同时还支持安装Github、ClawHub、LinkAI等第三方平台上的所有技能,详情查看 [技能安装](/skills/install)
|
||||
|
||||
<img src="https://cdn.link-ai.tech/doc/20260401110103.png" width="750" />
|
||||
|
||||
|
||||
## 4. CLI 命令系统
|
||||
|
||||
CowAgent 提供两种命令交互方式,覆盖服务管理、技能安装、配置调整等日常运维操作:
|
||||
|
||||
- **终端 CLI:** 在系统终端执行 `cow <命令>`,支持 `start`、`stop`、`restart`、`update`、`status`、`logs`、`skill` 等
|
||||
- **对话命令:** 在对话中输入 `/<命令>`,Web 控制台输入 `/` 可弹出指令菜单快速选择
|
||||
|
||||
```bash
|
||||
cow start # 启动服务
|
||||
cow stop # 停止服务
|
||||
cow update # 更新并重启
|
||||
cow skill install pptx # 安装技能
|
||||
cow install-browser # 安装浏览器工具
|
||||
```
|
||||
|
||||
详细命令参考 [命令总览](https://docs.cowagent.ai/commands)。
|
||||
|
||||
<img src="https://cdn.link-ai.tech/doc/20260401114549.png" width="750" />
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
<a href="https://cowagent.ai/">🌐 ウェブサイト</a> ·
|
||||
<a href="https://docs.cowagent.ai/en/intro/index">📖 ドキュメント</a> ·
|
||||
<a href="https://docs.cowagent.ai/en/guide/quick-start">🚀 クイックスタート</a> ·
|
||||
<a href="https://skills.cowagent.ai/">🧩 Skill Hub</a> ·
|
||||
<a href="https://link-ai.tech/cowagent/create">☁️ オンラインで試す</a>
|
||||
</p>
|
||||
|
||||
@@ -41,6 +42,8 @@
|
||||
|
||||
## 更新履歴
|
||||
|
||||
> **2026.04.01:** [v2.0.5](https://github.com/zhayujie/chatgpt-on-wechat/releases/tag/2.0.5) — Cow CLI、Skill Hubオープンソース化、ブラウザツール、WeCom Botスキャン作成など。
|
||||
|
||||
> **2026.02.27:** [v2.0.2](https://github.com/zhayujie/chatgpt-on-wechat/releases/tag/2.0.2) — Webコンソールの全面刷新(ストリーミングチャット、モデル/Skill/メモリ/チャネル/スケジューラ/ログ管理)、マルチチャネル同時実行、セッション永続化、Gemini 3.1 Pro / Claude 4.6 Sonnet / Qwen3.5 Plusなど新モデル追加。
|
||||
|
||||
> **2026.02.13:** [v2.0.1](https://github.com/zhayujie/chatgpt-on-wechat/releases/tag/2.0.1) — 組み込みWeb検索ツール、スマートコンテキストトリミング、ランタイム情報の動的更新、Windows互換性、スケジューラのメモリ喪失やFeishu接続問題などの修正。
|
||||
@@ -223,6 +226,7 @@ Coding Planは各プロバイダーが提供する月額サブスクリプショ
|
||||
|
||||
## 🔗 関連プロジェクト
|
||||
|
||||
- [Cow Skill Hub](https://github.com/zhayujie/cow-skill-hub): AIエージェント向けのオープンSkillマーケットプレイス。CowAgent、OpenClaw、Claude Codeなどで利用可能なSkillの閲覧・検索・インストール・公開が可能。
|
||||
- [bot-on-anything](https://github.com/zhayujie/bot-on-anything): 軽量で高い拡張性を持つLLMアプリケーションフレームワーク。Slack、Telegram、Discord、Gmailなどに対応。
|
||||
- [AgentMesh](https://github.com/MinimalFuture/AgentMesh): エージェントチームの協調による複雑な問題解決のためのオープンソースのマルチエージェントフレームワーク。
|
||||
|
||||
@@ -232,7 +236,7 @@ FAQ: <https://github.com/zhayujie/chatgpt-on-wechat/wiki/FAQs>
|
||||
|
||||
## 🛠️ コントリビューション
|
||||
|
||||
新しいチャネルの追加を歓迎します。[Feishuチャネル](https://github.com/zhayujie/chatgpt-on-wechat/blob/master/channel/feishu/feishu_channel.py)を参考にしてください。また、新しいSkillのコントリビューションも歓迎します。[Skill作成ドキュメント](https://docs.cowagent.ai/ja/skills/create)を参照してください。
|
||||
新しいチャネルの追加を歓迎します。[Feishuチャネル](https://github.com/zhayujie/chatgpt-on-wechat/blob/master/channel/feishu/feishu_channel.py)を参考にしてください。また、新しいSkillのコントリビューションも歓迎します。[Skill作成ドキュメント](https://docs.cowagent.ai/ja/skills/create)を参照するか、[Skill Hub](https://skills.cowagent.ai/submit)に提出してください。
|
||||
|
||||
## ✉ お問い合わせ
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: 機能詳細
|
||||
description: CowAgent の長期記憶、タスク計画、Skill システムの詳細
|
||||
description: CowAgent の長期記憶、タスク計画、Skill システム、CLI コマンド、ブラウザツールの詳細
|
||||
---
|
||||
|
||||
## 1. 長期記憶
|
||||
@@ -19,7 +19,7 @@ description: CowAgent の長期記憶、タスク計画、Skill システムの
|
||||
|
||||
ツールは Agent がオペレーティングシステムのリソースにアクセスするための中核です。Agent はタスク要件に基づいてインテリジェントにツールを選択・呼び出し、ファイルの読み書き、コマンド実行、スケジュールタスクなどを実行します。組み込みツールはプロジェクトの `agent/tools/` ディレクトリに実装されています。
|
||||
|
||||
**主なツール:** ファイルの読み書き・編集、Bash ターミナル、ファイル送信、スケジューラ、記憶検索、Web 検索、環境設定など。
|
||||
**主なツール:** ファイルの読み書き・編集、Bash ターミナル、ブラウザ操作、ファイル送信、スケジューラ、記憶検索、Web 検索、環境設定など。
|
||||
|
||||
### 2.1 ターミナルとファイルアクセス
|
||||
|
||||
@@ -45,7 +45,15 @@ OS のターミナルとファイルシステムへのアクセスは、最も
|
||||
<img src="https://cdn.link-ai.tech/doc/20260202195402.png" width="800" />
|
||||
</Frame>
|
||||
|
||||
### 2.4 環境変数管理
|
||||
### 2.4 ブラウザ操作
|
||||
|
||||
組み込みの `browser` ツールにより、Agent は Chromium ブラウザを制御して Web ページへのアクセス、フォームの入力、要素のクリック、スクリーンショットの撮影が可能です。動的 JS レンダリングページにも対応しています。`cow install-browser` でワンコマンドインストール、サーバー(ヘッドレス)とデスクトップ環境に自動対応します:
|
||||
|
||||
<Frame>
|
||||
<img src="https://cdn.link-ai.tech/doc/20260401110103.png" width="800" />
|
||||
</Frame>
|
||||
|
||||
### 2.5 環境変数管理
|
||||
|
||||
Skill が必要とするシークレットキーは環境変数ファイルに保存され、`env_config` ツールによって管理されます。会話を通じてシークレットを更新でき、セキュリティ保護とマスキング機能が組み込まれています:
|
||||
|
||||
@@ -57,9 +65,12 @@ Skill が必要とするシークレットキーは環境変数ファイルに
|
||||
|
||||
Skill システムは Agent に無限の拡張性を提供します。各 Skill は説明ファイル、実行スクリプト(任意)、リソース(任意)で構成され、特定のタイプのタスクを完了する方法を記述します。Skill により Agent は複雑なワークフローの指示に従い、ツールを呼び出し、サードパーティシステムと連携できます。
|
||||
|
||||
- **[Skill Hub](https://skills.cowagent.ai/):** オープンな Skill マーケットプレイス。公式推奨、コミュニティ、サードパーティの Skill を収録。ワンコマンドでインストール可能。
|
||||
- **組み込み Skill:** プロジェクトの `skills/` ディレクトリにあり、Skill クリエイター、画像認識、LinkAI Agent、Web フェッチなどが含まれます。組み込み Skill は依存条件(API キー、システムコマンドなど)に基づいて自動的に有効化されます。
|
||||
- **カスタム Skill:** ユーザーが会話を通じて作成し、ワークスペース(`~/cow/skills/`)に保存されます。あらゆる複雑なビジネスプロセスやサードパーティ連携を実装できます。
|
||||
|
||||
Skill のインストール:`/skill install <名前>` または `cow skill install <名前>`。Skill Hub、GitHub、ClawHub、URL などからインストール可能。
|
||||
|
||||
### 3.1 Skill の作成
|
||||
|
||||
`skill-creator` Skill により、会話を通じて Skill を素早く作成できます。ワークフローを Skill としてコード化するよう Agent に依頼したり、API ドキュメントやサンプルを送信して Agent に直接連携を完成させることができます:
|
||||
@@ -77,29 +88,33 @@ Skill システムは Agent に無限の拡張性を提供します。各 Skill
|
||||
<img src="https://cdn.link-ai.tech/doc/20260202213219.png" width="800" />
|
||||
</Frame>
|
||||
|
||||
### 3.3 サードパーティナレッジベースとプラグイン
|
||||
### 3.3 Skill Hub
|
||||
|
||||
`linkai-agent` Skill により、[LinkAI](https://link-ai.tech/) 上のすべての Agent を Skill として利用でき、マルチ Agent による意思決定が可能になります。
|
||||
[skills.cowagent.ai](https://skills.cowagent.ai/) で利用可能なすべての Skill を閲覧するか、会話内でコマンドを実行できます:
|
||||
|
||||
設定方法:`env_config` で `LINKAI_API_KEY` を設定し、`skills/linkai-agent/config.json` に Agent の説明を追加します:
|
||||
|
||||
```json
|
||||
{
|
||||
"apps": [
|
||||
{
|
||||
"app_code": "G7z6vKwp",
|
||||
"app_name": "LinkAI Customer Support",
|
||||
"app_description": "Select only when the user needs help with LinkAI platform questions"
|
||||
},
|
||||
{
|
||||
"app_code": "SFY5x7JR",
|
||||
"app_name": "Content Creator",
|
||||
"app_description": "Use only when the user needs to create images or videos"
|
||||
}
|
||||
]
|
||||
}
|
||||
```text
|
||||
/skill list --remote # Skill Hub を閲覧
|
||||
/skill search <キーワード> # Skill を検索
|
||||
/skill install <名前> # ワンコマンドでインストール
|
||||
```
|
||||
|
||||
<Frame>
|
||||
<img src="https://cdn.link-ai.tech/doc/20260202234350.png" width="750" />
|
||||
</Frame>
|
||||
GitHub、ClawHub、LinkAI などサードパーティプラットフォームの Skill もインストール可能です。詳細は [Skill のインストール](/ja/skills/install) を参照してください。
|
||||
|
||||
<img src="https://cdn.link-ai.tech/doc/20260401110103.png" width="750" />
|
||||
|
||||
## 4. CLI コマンドシステム
|
||||
|
||||
CowAgent はサービス管理、Skill インストール、設定変更などをカバーする2つのコマンドインターフェースを提供します:
|
||||
|
||||
- **ターミナル CLI:** システムターミナルで `cow <コマンド>` を実行。`start`、`stop`、`restart`、`update`、`status`、`logs`、`skill` などをサポート。
|
||||
- **チャットコマンド:** 会話内で `/<コマンド>` を入力。Web コンソールでは `/` を入力するとコマンドメニューが表示されます。
|
||||
|
||||
```bash
|
||||
cow start # サービスを開始
|
||||
cow stop # サービスを停止
|
||||
cow update # 更新して再起動
|
||||
cow skill install pptx # Skill をインストール
|
||||
cow install-browser # ブラウザツールをインストール
|
||||
```
|
||||
|
||||
詳細は [コマンド一覧](https://docs.cowagent.ai/ja/commands) を参照してください。
|
||||
|
||||
@@ -5,6 +5,7 @@ description: CowAgent バージョン履歴
|
||||
|
||||
| バージョン | 日付 | 説明 |
|
||||
| --- | --- | --- |
|
||||
| [2.0.5](/ja/releases/v2.0.5) | 2026.04.01 | Cow CLI、Skill Hub オープンソース、ブラウザツール、企業微信スキャン作成、その他改善 |
|
||||
| [2.0.4](/ja/releases/v2.0.4) | 2026.03.22 | 個人WeChatチャネル追加、新モデルサポート、日本語ドキュメント、スクリプトリファクタリングおよび複数修正 |
|
||||
| [2.0.2](/ja/releases/v2.0.2) | 2026.02.27 | Web Console アップグレード、マルチチャネル同時実行、セッション永続化 |
|
||||
| [2.0.1](/en/releases/v2.0.1) | 2026.02.27 | 組み込み Web Search ツール、スマートコンテキスト管理、複数の修正 |
|
||||
|
||||
77
docs/ja/releases/v2.0.5.mdx
Normal file
77
docs/ja/releases/v2.0.5.mdx
Normal file
@@ -0,0 +1,77 @@
|
||||
---
|
||||
title: v2.0.5
|
||||
description: CowAgent 2.0.5 - Cow CLI、Skill Hub オープンソース、ブラウザツール、企業微信スキャン作成、その他改善
|
||||
---
|
||||
|
||||
## 🖥️ Cow CLI コマンドシステム
|
||||
|
||||
ターミナルと会話の両方で CowAgent を管理する新しい CLI コマンドシステム:
|
||||
|
||||
- **ターミナルコマンド**:`cow <コマンド>` で `start`、`stop`、`restart`、`update`、`status`、`logs` などを実行
|
||||
- **チャットコマンド**:会話で `/<コマンド>` を入力して `/help`、`/status`、`/config`、`/skill`、`/context`、`/logs`、`/version` など
|
||||
- **Web コンソール**:入力欄で `/` を入力するとスラッシュコマンドメニューが表示、矢印キーで入力履歴を辿れる
|
||||
- **Windows サポート**:PowerShell スクリプト `scripts/run.ps1` を追加、`cow` コマンドに対応
|
||||
|
||||
ドキュメント:[コマンド一覧](https://docs.cowagent.ai/ja/commands)
|
||||
|
||||
<img src="https://cdn.link-ai.tech/doc/20260401114549.png" width="750" />
|
||||
|
||||
## 🧩 Cow Skill Hub オープンソース
|
||||
|
||||
[Cow Skill Hub](https://skills.cowagent.ai)(スキル広場)がオープンソースとして公開。AI Agent スキルの閲覧、検索、インストール、公開が可能:
|
||||
|
||||
- **ワンコマンドインストール**:会話で `/skill install <名前>` またはターミナルで `cow skill install <名前>`
|
||||
- **マルチソース**:Skill Hub、GitHub、ClawHub、LinkAI などからインストール可能
|
||||
- **検索**:`/skill search` と `/skill list --remote` でスキル広場を閲覧・検索
|
||||
- **スキル公開**:[skills.cowagent.ai/submit](https://skills.cowagent.ai/submit) で自作スキルを提出
|
||||
- **ミラー加速**:中国国内向けミラーダウンロード対応
|
||||
|
||||
オープンソースリポジトリ:[cow-skill-hub](https://github.com/zhayujie/cow-skill-hub)
|
||||
|
||||
ドキュメント:[スキル広場](https://docs.cowagent.ai/ja/skills/hub)、[スキルのインストール](https://docs.cowagent.ai/ja/skills/install)
|
||||
|
||||
<img src="https://cdn.link-ai.tech/doc/20260401110103.png" width="750" />
|
||||
|
||||
## 🌐 ブラウザツール
|
||||
|
||||
新しい Browser ツール — Agent が Chromium ブラウザを制御して Web ページにアクセス・操作:
|
||||
|
||||
- **ナビゲーションと操作**:`navigate`、`click`、`fill`、`select`、`scroll`、`press` など
|
||||
- **ページスナップショット**:精簡 DOM スナップショットで Agent がページ構造を効率的に理解、ナビゲーション後に自動スナップショット
|
||||
- **スクリーンショット**:ワークスペースにページのスクリーンショットを保存
|
||||
- **JavaScript 実行**:ページでカスタムスクリプトを実行
|
||||
- **CLI インストール**:`cow install-browser` でワンコマンドセットアップ
|
||||
- **Docker サポート**:Docker イメージにブラウザインストール組み込み
|
||||
|
||||
ドキュメント:[ブラウザツール](https://docs.cowagent.ai/ja/tools/browser)
|
||||
|
||||
<img src="https://cdn.link-ai.tech/doc/20260401115728.png" width="750" />
|
||||
|
||||
## 🤖 企業微信 Bot スキャン作成
|
||||
|
||||
企業微信 Bot チャネルで QR コードスキャンによるワンクリック作成をサポート:
|
||||
|
||||
- **Web コンソールでスキャン**:「スキャン接入」モードを選択し、企業微信でスキャンするとボットが自動作成・接続
|
||||
- **手動モード**:既存の Bot ID と Secret を手動入力する方式も引き続きサポート
|
||||
- **ストリーム配信最適化**:WebSocket 混雑を避けるためのスロットリング
|
||||
|
||||
ドキュメント:[企業微信 Bot](https://docs.cowagent.ai/ja/channels/wecom-bot)
|
||||
|
||||
PR:[#2735](https://github.com/zhayujie/chatgpt-on-wechat/pull/2735)。Thanks [@WecomTeam](https://github.com/WecomTeam)
|
||||
|
||||
## 🐛 その他の改善と修正
|
||||
|
||||
- **DeepSeek モジュール**:独立 DeepSeek Bot、`deepseek_api_key` 専用設定対応([#2719](https://github.com/zhayujie/chatgpt-on-wechat/pull/2719))。Thanks [@6vision](https://github.com/6vision)
|
||||
- **Web コンソール**:スラッシュコマンドメニュー、入力履歴、新モデル選択肢、モバイル最適化([#2731](https://github.com/zhayujie/chatgpt-on-wechat/pull/2731))。Thanks [@zkjqd](https://github.com/zkjqd)
|
||||
- **コンテキスト**:トリミング後のコンテキスト喪失を修正([393f0c0](https://github.com/zhayujie/chatgpt-on-wechat/commit/393f0c0))
|
||||
- **システムプロンプト**:毎ターン再構築されない問題を修正([13f5fde](https://github.com/zhayujie/chatgpt-on-wechat/commit/13f5fde))
|
||||
- **Gemini**:GoogleGeminiBot の model 属性欠落を修正([#2716](https://github.com/zhayujie/chatgpt-on-wechat/pull/2716))。Thanks [@cowagent](https://github.com/cowagent)
|
||||
- **WeChat チャネル**:ファイル送信失敗・ファイル名消失の修正([6d9b7ba](https://github.com/zhayujie/chatgpt-on-wechat/commit/6d9b7ba)、[45faa9c](https://github.com/zhayujie/chatgpt-on-wechat/commit/45faa9c))
|
||||
- **Docker**:ボリューム権限修正、イメージサイズ削減([3eb8348](https://github.com/zhayujie/chatgpt-on-wechat/commit/3eb8348)、[4470d4c](https://github.com/zhayujie/chatgpt-on-wechat/commit/4470d4c))
|
||||
- **セキュリティ**:Memory Content パストラバーサルリスクを修正。Thanks [@August829](https://github.com/August829)
|
||||
|
||||
## 📦 アップグレード
|
||||
|
||||
`cow update` または `./run.sh update` でアップグレード、またはコードを手動で pull して再起動。詳細は[アップグレードガイド](https://docs.cowagent.ai/ja/guide/upgrade)を参照。
|
||||
|
||||
**リリース日**:2026.04.01 | [Full Changelog](https://github.com/zhayujie/chatgpt-on-wechat/compare/2.0.4...master)
|
||||
@@ -5,6 +5,7 @@ description: CowAgent 版本更新历史
|
||||
|
||||
| 版本 | 日期 | 说明 |
|
||||
| --- | --- | --- |
|
||||
| [2.0.5](/releases/v2.0.5) | 2026.04.01 | Cow CLI、Skill Hub 开源、浏览器工具、企微扫码创建、多项优化和修复 |
|
||||
| [2.0.4](/releases/v2.0.4) | 2026.03.22 | 新增个人微信通道、新模型支持、日文文档、脚本重构及多项修复 |
|
||||
| [2.0.3](/releases/v2.0.3) | 2026.03.18 | 新增企微智能机器人和 QQ 通道、支持Coding Plan、新增多个模型、Web端文件处理、记忆系统升级 |
|
||||
| [2.0.2](/releases/v2.0.2) | 2026.02.27 | Web 控制台升级、多通道同时运行、会话持久化 |
|
||||
|
||||
84
docs/releases/v2.0.5.mdx
Normal file
84
docs/releases/v2.0.5.mdx
Normal file
@@ -0,0 +1,84 @@
|
||||
---
|
||||
title: v2.0.5
|
||||
description: CowAgent 2.0.5 - Cow CLI、Skill Hub 开源、浏览器工具、企微扫码创建、DeepSeek 独立模块及多项优化
|
||||
---
|
||||
|
||||
## 🖥️ Cow CLI 命令系统
|
||||
|
||||
新增 Cow CLI 命令系统,支持在终端和对话中执行命令,实现对 CowAgent 的全方位管理:
|
||||
|
||||
- **终端命令**:在系统终端中执行 `cow <命令>`,支持 `start`、`stop`、`restart`、`update`、`status`、`logs` 等服务管理操作
|
||||
- **对话命令**:在对话中输入 `/<命令>` 或 `cow <命令>`,支持 `/help`、`/status`、`/config`、`/skill`、`/context`、`/logs`、`/version` 等
|
||||
- **web控制台**:Web 控制台输入框输入 `/` 即可弹出指令菜单,支持方向键回溯历史输入
|
||||
- **Windows 支持**:新增 PowerShell 一键安装脚本 `scripts/run.ps1`,同时支持 `cow` 命令
|
||||
|
||||
相关文档:[命令总览](https://docs.cowagent.ai/commands)
|
||||
|
||||
<img src="https://cdn.link-ai.tech/doc/20260401114549.png" width="750" />
|
||||
|
||||
## 🧩 Cow Skill Hub 开源
|
||||
|
||||
[Cow Skill Hub](https://skills.cowagent.ai)(技能广场)正式开源并上线,提供 AI Agent 技能的浏览、搜索、安装和发布,汇集精选技能、社区贡献技能、三方技能:
|
||||
|
||||
- **一键安装**:在对话中 `/skill install <名称>` 或终端 `cow skill install <名称>` 一键安装
|
||||
- **多来源支持**:支持安装 Skill Hub、GitHub、ClawHub、LinkAI 上的全部技能,支持 GitHub 批量安装和子目录指定
|
||||
- **技能搜索**:`/skill search` 和 `/skill list --remote` 浏览和搜索技能广场
|
||||
- **技能发布**:通过 [skills.cowagent.ai/submit](https://skills.cowagent.ai/submit) 提交自己的技能
|
||||
- **镜像加速**:支持 Skill Hub 镜像加速,国内环境下载更流畅
|
||||
|
||||
Skill Hub 开源仓库:[cow-skill-hub](https://github.com/zhayujie/cow-skill-hub)。
|
||||
|
||||
相关文档:[技能广场](https://docs.cowagent.ai/skills/hub)、[安装技能](https://docs.cowagent.ai/skills/install)
|
||||
|
||||
<img src="https://cdn.link-ai.tech/doc/20260401110103.png" width="750" />
|
||||
|
||||
|
||||
## 🌐 新增浏览器工具
|
||||
|
||||
新增 Browser 工具,Agent 可控制浏览器访问和操作网页:
|
||||
|
||||
- **网页导航与交互**:支持 `navigate`、`click`、`fill`、`select`、`scroll`、`press` 等操作
|
||||
- **页面快照**:使用精简 DOM 快照技术,让 Agent 高效理解页面结构,导航后自动快照
|
||||
- **截图能力**:支持页面截图保存到工作区
|
||||
- **JavaScript 执行**:支持在页面中执行自定义脚本
|
||||
- **CLI 安装**:通过 `cow install-browser` 一键安装浏览器及依赖,自动适配系统环境
|
||||
- **Docker 支持**:Docker 镜像已内置浏览器安装支持
|
||||
|
||||
相关文档:[浏览器工具](https://docs.cowagent.ai/tools/browser)。
|
||||
|
||||
<img src="https://cdn.link-ai.tech/doc/20260401115728.png" width="750" />
|
||||
|
||||
|
||||
## 🤖 企微智能机器人扫码创建
|
||||
|
||||
企业微信智能机器人通道新增扫码一键创建功能:
|
||||
|
||||
- **Web 控制台扫码**:在 Web 控制台通道页面,选择「扫码接入」模式,使用企业微信扫码即可自动创建并接入智能机器人,无需手动到企业微信后台配置
|
||||
- **手动模式保留**:同时保留「手动填写」模式,可输入已有的 Bot ID 和 Secret 接入
|
||||
- **流式推送优化**:增加推送节流,避免 WebSocket 拥塞
|
||||
|
||||
相关文档:[企微智能机器人接入](https://docs.cowagent.ai/channels/wecom-bot)。
|
||||
|
||||
相关提交:[#2735](https://github.com/zhayujie/chatgpt-on-wechat/pull/2735)
|
||||
|
||||
Thanks [@WecomTeam](https://github.com/WecomTeam)
|
||||
|
||||
## 🐛 其他优化与修复
|
||||
|
||||
- **DeepSeek 独立模块**:新增独立的 DeepSeek Bot 模块,支持 `deepseek_api_key` 专属配置,无需再通过 OpenAI 兼容方式接入([#2719](https://github.com/zhayujie/chatgpt-on-wechat/pull/2719))。Thanks [@6vision](https://github.com/6vision)
|
||||
- **Web 控制台优化**:新增斜杠指令菜单和输入历史回溯,新增模型选项,优化移动端适配([#2731](https://github.com/zhayujie/chatgpt-on-wechat/pull/2731))。Thanks [@zkjqd](https://github.com/zkjqd)
|
||||
- **上下文丢失**:修复上下文裁剪后丢失的问题 ([393f0c0](https://github.com/zhayujie/chatgpt-on-wechat/commit/393f0c0))
|
||||
- **系统提示词**:修复系统提示词未在每轮重建的问题 ([13f5fde](https://github.com/zhayujie/chatgpt-on-wechat/commit/13f5fde))
|
||||
- **Agent 响应**:去除 Agent 响应首尾空白字符 ([f890318](https://github.com/zhayujie/chatgpt-on-wechat/commit/f890318))
|
||||
- **视觉压缩**:优化视觉图片压缩策略 ([22b8ca0](https://github.com/zhayujie/chatgpt-on-wechat/commit/22b8ca0))
|
||||
- **Gemini 模型**:修复 GoogleGeminiBot 缺少 model 属性的问题([#2716](https://github.com/zhayujie/chatgpt-on-wechat/pull/2716))。Thanks [@cowagent](https://github.com/cowagent)
|
||||
- **微信通道**:修复文件发送失败、文件名丢失等问题 ([6d9b7ba](https://github.com/zhayujie/chatgpt-on-wechat/commit/6d9b7ba)、[baf66a1](https://github.com/zhayujie/chatgpt-on-wechat/commit/baf66a1)、[45faa9c](https://github.com/zhayujie/chatgpt-on-wechat/commit/45faa9c))
|
||||
- **Docker 优化**:修复卷权限问题,精简镜像体积 ([3eb8348](https://github.com/zhayujie/chatgpt-on-wechat/commit/3eb8348)、[4470d4c](https://github.com/zhayujie/chatgpt-on-wechat/commit/4470d4c))
|
||||
- **README 排版**:优化中英文排版空格([#2723](https://github.com/zhayujie/chatgpt-on-wechat/pull/2723))。Thanks [@Xiaozhou345](https://github.com/Xiaozhou345)
|
||||
- **安全修复**:修复 Memory Content路径遍历风险,Thanks [@August829](https://github.com/August829)
|
||||
|
||||
## 📦 升级方式
|
||||
|
||||
源码部署可执行 `cow update` 或 `./run.sh update` 一键升级,或手动拉取代码后重启。详见 [更新升级文档](https://docs.cowagent.ai/guide/upgrade)。
|
||||
|
||||
**发布日期**:2026.04.01 | [Full Changelog](https://github.com/zhayujie/chatgpt-on-wechat/compare/2.0.4...master)
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
title: 创建技能
|
||||
title: 创造技能
|
||||
description: 通过对话创建自定义技能
|
||||
---
|
||||
|
||||
|
||||
65
docs/skills/hub.mdx
Normal file
65
docs/skills/hub.mdx
Normal file
@@ -0,0 +1,65 @@
|
||||
---
|
||||
title: 技能广场
|
||||
description: 浏览、搜索和安装 AI Agent 技能
|
||||
---
|
||||
|
||||
[Cow Skill Hub](https://skills.cowagent.ai/) 是开源的 AI Agent 技能广场,汇集了官方推荐、社区贡献和第三方平台(GitHub、ClawHub 等)的技能。
|
||||
|
||||
开源仓库:[github.com/zhayujie/cow-skill-hub](https://github.com/zhayujie/cow-skill-hub)
|
||||
|
||||
<img src="https://cdn.link-ai.tech/doc/20260401110103.png" width="800" />
|
||||
|
||||
## 功能
|
||||
|
||||
- **浏览技能**:按类别(推荐 / 社区 / 第三方)和标签筛选
|
||||
- **搜索技能**:按名称或描述搜索
|
||||
- **查看详情**:查看技能文档、文件内容、安装命令和依赖的环境变量
|
||||
- **一键安装**:复制安装命令即可在 CowAgent 中使用
|
||||
|
||||
## 安装技能
|
||||
|
||||
在对话中或终端中执行安装命令:
|
||||
|
||||
<CodeGroup>
|
||||
```text 对话
|
||||
/skill install <name>
|
||||
```
|
||||
|
||||
```bash 终端
|
||||
cow skill install <name>
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
也可以在对话中浏览技能广场:
|
||||
|
||||
```text
|
||||
/skill list --remote
|
||||
/skill search <关键词>
|
||||
```
|
||||
|
||||
除了在列表中展示的精选技能,还可以通过 **CLI命令 + Skill Hub** 安装各种第三方技能(**GitHub、ClawHub、LinkAI、URL** 等)参考 [安装技能](/skills/install)。
|
||||
|
||||
## 贡献技能
|
||||
|
||||
欢迎向技能广场提交你的技能:
|
||||
|
||||
1. 访问 [skills.cowagent.ai/submit](https://skills.cowagent.ai/submit)
|
||||
2. 使用 GitHub 或 Google 账号登录
|
||||
3. 上传包含 `SKILL.md` 的文件夹或 zip 包
|
||||
4. 自动解析技能名称、显示名称和描述,可按需修改
|
||||
5. 提交后将经过安全检查和审核后发布
|
||||
|
||||
<img src="https://cdn.link-ai.tech/doc/20260401111904.png" width="800" />
|
||||
|
||||
技能文件结构:
|
||||
|
||||
```
|
||||
your-skill/
|
||||
├── SKILL.md # 必须,放在根目录
|
||||
├── scripts/ # 可选,运行脚本
|
||||
└── resources/ # 可选,其他资源
|
||||
```
|
||||
|
||||
<Tip>
|
||||
技能基于 `SKILL.md` 文件构建,你也可以在技能详情页下载 SKILL.md,用于任何支持自定义指令的 Agent(如 OpenClaw、Cursor、Claude Code 等)。
|
||||
</Tip>
|
||||
@@ -11,13 +11,14 @@ Skill 与 Tool 的区别:Tool 是由代码实现的原子操作(如读写文
|
||||
|
||||
CowAgent 提供多种方式获取技能:
|
||||
|
||||
- **Cow 技能广场** — 通过 `/skill list --remote` 浏览和安装社区技能
|
||||
- **[Cow 技能广场](https://skills.cowagent.ai/)** — 在线浏览所有可用技能,或通过 `/skill list --remote` 在对话中浏览和安装
|
||||
- **GitHub** — 直接从 GitHub 仓库安装,支持批量安装
|
||||
- **ClawHub** — 通过 `/skill install clawhub:名称` 安装 ClawHub 上的技能
|
||||
- **ClawHub** — 通过 `/skill install clawhub:名称` 安装 ClawHub 上的技能 (4w+个)
|
||||
- **LinkA** — 通过 `/skill install linkai:编码` 安装 LinkAI 上的公开资源和创建的知识库/数据库/工作流/插件等资源
|
||||
- **URL** — 从 zip 压缩包或 SKILL.md 链接安装
|
||||
- **对话创建** — 通过自然语言对话让 Agent 自动创建技能
|
||||
|
||||
详细安装方式参考 [安装技能](/skills/install) 和 [技能管理命令](/commands/skill)。也可以通过对话 [创建技能](/skills/create)。
|
||||
详细安装方式参考 [安装技能](/skills/install) 和 [技能管理命令](/commands/skill)。也可以通过对话 [创建技能](/skills/create),或向 [Skill Hub](https://skills.cowagent.ai/submit) 贡献你的技能。
|
||||
|
||||
## 技能加载优先级
|
||||
|
||||
|
||||
@@ -3,11 +3,11 @@ title: 安装技能
|
||||
description: 通过命令一键安装来自多种来源的技能
|
||||
---
|
||||
|
||||
CowAgent 支持通过统一的 `install` 命令安装来自 **Cow 技能广场、GitHub、ClawHub** 以及任意 URL 上的技能。在对话中使用 `/skill install`,在终端中使用 `cow skill install`。
|
||||
CowAgent 支持通过统一的 `install` 命令安装来自 **[Cow 技能广场](https://skills.cowagent.ai/)、GitHub、ClawHub、LinkAI** 以及任意 URL 上的技能。在对话中使用 `/skill install`,在终端中使用 `cow skill install`。
|
||||
|
||||
## 从Cow技能广场安装
|
||||
|
||||
浏览技能广场,找到想要的技能后直接安装:
|
||||
访问 [skills.cowagent.ai](https://skills.cowagent.ai/) 浏览所有可用技能,找到想要的技能后直接安装,例如:
|
||||
|
||||
```text
|
||||
/skill list --remote
|
||||
@@ -16,7 +16,7 @@ CowAgent 支持通过统一的 `install` 命令安装来自 **Cow 技能广场
|
||||
|
||||
## 从 GitHub 安装
|
||||
|
||||
支持仓库级批量安装和指定子目录安装:
|
||||
> Github上的所有技能都可以直接安装,支持仓库级批量安装和指定子目录安装,例如:
|
||||
|
||||
```text
|
||||
/skill install larksuite/cli
|
||||
@@ -25,10 +25,23 @@ CowAgent 支持通过统一的 `install` 命令安装来自 **Cow 技能广场
|
||||
|
||||
## 从 ClawHub 安装
|
||||
|
||||
[ClawHub](https://clawhub.ai/) 上的所有技能 (4w+个) 都可以一键安装,例如:
|
||||
|
||||
|
||||
```text
|
||||
/skill install clawhub:baidu-search
|
||||
/skill install clawhub:<name>
|
||||
```
|
||||
|
||||
## 从 LinkAI 安装
|
||||
|
||||
[LinkAI](https://link-ai.tech/console) 上的所有公开资源 (1w+个插件/应用/工作流) ,以及自己创建的资源 (应用/工作流/知识库/数据库/插件) 都可以通过命令一键安装:
|
||||
|
||||
```text
|
||||
/skill install linkai:<code>
|
||||
```
|
||||
|
||||
> LinkAI平台上创建的所有应用、工作流、知识库、数据库、插件都有唯一的code,可在[控制台](https://link-ai.tech/console)各资源页面中进行获取并填写到命令中
|
||||
|
||||
## 从 URL 安装
|
||||
|
||||
支持 zip 压缩包和 SKILL.md 文件链接:
|
||||
|
||||
@@ -599,7 +599,7 @@ class CowCliPlugin(Plugin):
|
||||
page = min(page, total_pages)
|
||||
installed = set(load_skills_config().keys())
|
||||
|
||||
lines = [f"🌐 技能广场 (共 {total} 个技能)", ""]
|
||||
lines = ["🌐 技能广场", ""]
|
||||
for s in skills:
|
||||
name = s.get("name", "")
|
||||
display = s.get("display_name", "") or name
|
||||
@@ -621,6 +621,7 @@ class CowCliPlugin(Plugin):
|
||||
lines.append(f"💡 /skill list --remote --page {page - 1} 上一页")
|
||||
lines.append("💡 /skill install <名称> 安装技能")
|
||||
lines.append("💡 /skill search <关键词> 搜索技能")
|
||||
lines.append("🌐 https://skills.cowagent.ai 在线浏览全部技能")
|
||||
return "\n".join(lines)
|
||||
|
||||
def _skill_search(self, query: str) -> str:
|
||||
@@ -695,11 +696,12 @@ class CowCliPlugin(Plugin):
|
||||
lines = []
|
||||
for skill_name in result.installed:
|
||||
desc = _read_skill_description(os.path.join(skills_dir, skill_name))
|
||||
display = config.get(skill_name, {}).get("display_name", "") or skill_name
|
||||
label = f"{display} ({skill_name})" if display != skill_name else skill_name
|
||||
lines.append(f"✅ 技能安装成功:{label}")
|
||||
display = config.get(skill_name, {}).get("display_name", "")
|
||||
lines.append(f"✅ 技能安装成功:{skill_name}")
|
||||
if display and display != skill_name:
|
||||
lines.append(f" 名称:{display}")
|
||||
if desc:
|
||||
lines.append(f" {desc}")
|
||||
lines.append(f" 描述:{desc}")
|
||||
|
||||
if len(result.installed) > 1:
|
||||
lines.append(f"\n共安装 {len(result.installed)} 个技能")
|
||||
|
||||
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "cowagent"
|
||||
version = "0.0.1"
|
||||
version = "1.0.0"
|
||||
description = "CowAgent - AI Agent on WeChat and more"
|
||||
requires-python = ">=3.9"
|
||||
dependencies = [
|
||||
|
||||
165
skills/README.md
165
skills/README.md
@@ -1,124 +1,89 @@
|
||||
# Skills Directory
|
||||
# Skills
|
||||
|
||||
This directory contains skills for the COW agent system. Skills are markdown files that provide specialized instructions for specific tasks.
|
||||
Skills are reusable instruction sets that extend the agent's capabilities. Each skill is a `SKILL.md` file in its own directory, providing specialized knowledge, workflows, and tool integrations for specific tasks.
|
||||
|
||||
## What are Skills?
|
||||
## Skill Hub
|
||||
|
||||
Skills are reusable instruction sets that help the agent perform specific tasks more effectively. Each skill:
|
||||
Browse, search, and install skills from [Cow Skill Hub](https://skills.cowagent.ai/).
|
||||
|
||||
- Provides context-specific guidance
|
||||
- Documents best practices
|
||||
- Includes examples and usage patterns
|
||||
- Can have requirements (binaries, environment variables, etc.)
|
||||
Open source: [github.com/zhayujie/cow-skill-hub](https://github.com/zhayujie/cow-skill-hub)
|
||||
|
||||
## Install Skills
|
||||
|
||||
Install skills from multiple sources via chat (`/skill`) or terminal (`cow skill`):
|
||||
|
||||
```bash
|
||||
/skill install <name> # From Skill Hub
|
||||
/skill install <owner>/<repo> # From GitHub
|
||||
/skill install clawhub:<name> # From ClawHub
|
||||
/skill install linkai:<code> # From LinkAI
|
||||
/skill install <url> # From URL (zip or SKILL.md)
|
||||
```
|
||||
|
||||
List all available remote skills:
|
||||
|
||||
```bash
|
||||
/skill list --remote
|
||||
```
|
||||
|
||||
## Manage Skills
|
||||
|
||||
```bash
|
||||
/skill list # List installed skills
|
||||
/skill info <name> # View skill details
|
||||
/skill enable <name> # Enable a skill
|
||||
/skill disable <name> # Disable a skill
|
||||
/skill uninstall <name> # Uninstall a skill
|
||||
```
|
||||
|
||||
> In terminal, replace `/skill` with `cow skill`.
|
||||
|
||||
## Skill Structure
|
||||
|
||||
Each skill is a markdown file (`SKILL.md`) in its own directory with frontmatter:
|
||||
```
|
||||
skills/
|
||||
my-skill/
|
||||
SKILL.md # Required: skill definition
|
||||
scripts/ # Optional: bundled scripts
|
||||
resources/ # Optional: reference files
|
||||
```
|
||||
|
||||
`SKILL.md` uses YAML frontmatter:
|
||||
|
||||
```markdown
|
||||
---
|
||||
name: skill-name
|
||||
name: my-skill
|
||||
description: Brief description of what the skill does
|
||||
metadata: {"cow":{"emoji":"🎯","requires":{"bins":["tool"]}}}
|
||||
metadata: {"cow":{"emoji":"🔧","requires":{"bins":["tool"],"env":["API_KEY"]}}}
|
||||
---
|
||||
|
||||
# Skill Name
|
||||
# My Skill
|
||||
|
||||
Detailed instructions and examples...
|
||||
Instructions, examples, and usage patterns...
|
||||
```
|
||||
|
||||
## Available Skills
|
||||
|
||||
- **calculator**: Mathematical calculations and expressions
|
||||
- **web-search**: Search the web for current information
|
||||
- **file-operations**: Read, write, and manage files
|
||||
|
||||
## Creating Custom Skills
|
||||
|
||||
To create a new skill:
|
||||
|
||||
1. Create a directory: `skills/my-skill/`
|
||||
2. Create `SKILL.md` with frontmatter and content
|
||||
3. Restart the agent to load the new skill
|
||||
|
||||
### Frontmatter Fields
|
||||
|
||||
- `name`: Skill name (must match directory name)
|
||||
- `description`: Brief description (required)
|
||||
- `metadata`: JSON object with additional configuration
|
||||
- `emoji`: Display emoji
|
||||
- `always`: Always include this skill (default: false)
|
||||
- `primaryEnv`: Primary environment variable needed
|
||||
- `os`: Supported operating systems (e.g., ["darwin", "linux"])
|
||||
- `requires`: Requirements object
|
||||
- `bins`: Required binaries
|
||||
- `env`: Required environment variables
|
||||
- `config`: Required config paths
|
||||
- `disable-model-invocation`: If true, skill won't be shown to model (default: false)
|
||||
- `user-invocable`: If false, users can't invoke directly (default: true)
|
||||
| Field | Description |
|
||||
|---|---|
|
||||
| `name` | Skill name (must match directory name) |
|
||||
| `description` | Brief description (required) |
|
||||
| `metadata.cow.emoji` | Display emoji |
|
||||
| `metadata.cow.always` | Always include this skill (default: false) |
|
||||
| `metadata.cow.requires.bins` | Required binaries |
|
||||
| `metadata.cow.requires.env` | Required environment variables |
|
||||
| `metadata.cow.requires.config` | Required config paths |
|
||||
| `metadata.cow.os` | Supported OS (e.g., `["darwin", "linux"]`) |
|
||||
|
||||
### Example Skill
|
||||
## Skill Loading Order
|
||||
|
||||
```markdown
|
||||
---
|
||||
name: my-tool
|
||||
description: Use my-tool to process data
|
||||
metadata: {"cow":{"emoji":"🔧","requires":{"bins":["my-tool"],"env":["MY_TOOL_API_KEY"]}}}
|
||||
---
|
||||
Skills are loaded from two locations (higher precedence overrides lower):
|
||||
|
||||
# My Tool Skill
|
||||
1. **Builtin skills** (lower): `<project_root>/skills/` — shipped with the codebase
|
||||
2. **Custom skills** (higher): `~/cow/skills/` — installed via `cow skill install` or skill creator
|
||||
|
||||
Use this skill when you need to process data with my-tool.
|
||||
Skills with the same name in the custom directory override builtin ones.
|
||||
|
||||
## Prerequisites
|
||||
## Create & Contribute
|
||||
|
||||
- Install my-tool: `pip install my-tool`
|
||||
- Set `MY_TOOL_API_KEY` environment variable
|
||||
|
||||
## Usage
|
||||
|
||||
\`\`\`python
|
||||
# Example usage
|
||||
my_tool_command("input data")
|
||||
\`\`\`
|
||||
```
|
||||
|
||||
## Skill Loading
|
||||
|
||||
Skills are loaded from multiple locations with precedence:
|
||||
|
||||
1. **Workspace skills** (highest): `workspace/skills/` - Project-specific skills
|
||||
2. **Managed skills**: `~/.cow/skills/` - User-installed skills
|
||||
3. **Bundled skills** (lowest): Built-in skills
|
||||
|
||||
Skills with the same name in higher-precedence locations override lower ones.
|
||||
|
||||
## Skill Requirements
|
||||
|
||||
Skills can specify requirements that determine when they're available:
|
||||
|
||||
- **OS requirements**: Only load on specific operating systems
|
||||
- **Binary requirements**: Only load if required binaries are installed
|
||||
- **Environment variables**: Only load if required env vars are set
|
||||
- **Config requirements**: Only load if config values are set
|
||||
|
||||
## Best Practices
|
||||
|
||||
1. **Clear descriptions**: Write clear, concise skill descriptions
|
||||
2. **Include examples**: Provide practical usage examples
|
||||
3. **Document prerequisites**: List all requirements clearly
|
||||
4. **Use appropriate metadata**: Set correct requirements and flags
|
||||
5. **Keep skills focused**: Each skill should have a single, clear purpose
|
||||
|
||||
## Workspace Skills
|
||||
|
||||
You can create workspace-specific skills in your agent's workspace:
|
||||
|
||||
```
|
||||
workspace/
|
||||
skills/
|
||||
custom-skill/
|
||||
SKILL.md
|
||||
```
|
||||
|
||||
These skills are only available when working in that specific workspace.
|
||||
See the [Skill Creation docs](https://docs.cowagent.ai/skills/create) for details, or submit your skill to [Skill Hub](https://skills.cowagent.ai/submit).
|
||||
|
||||
@@ -1,258 +0,0 @@
|
||||
# LinkAI Agent Skill
|
||||
|
||||
这个 skill 允许你调用 LinkAI 平台上的多个应用(App)和工作流(Workflow),通过简单的配置即可集成多个智能体能力。
|
||||
|
||||
## 特性
|
||||
|
||||
- ✅ **多应用支持** - 在一个配置文件中管理多个 LinkAI 应用/工作流
|
||||
- ✅ **动态加载** - skill 系统加载时自动从 `config.json` 读取应用列表
|
||||
- ✅ **自动技能描述** - 所有配置的应用会自动添加到技能描述中
|
||||
- ✅ **模型切换** - 可以为每个请求指定不同的模型
|
||||
- ✅ **知识库集成** - 支持应用绑定的知识库
|
||||
- ✅ **插件能力** - 支持应用启用的各类插件
|
||||
- ✅ **工作流执行** - 支持执行复杂的多步骤工作流
|
||||
|
||||
## 快速开始
|
||||
|
||||
### 1. 配置 API Key
|
||||
|
||||
```bash
|
||||
env_config(action="set", key="LINKAI_API_KEY", value="your-linkai-api-key")
|
||||
```
|
||||
|
||||
获取 API Key: https://link-ai.tech/console/interface
|
||||
|
||||
### 2. 配置应用列表
|
||||
|
||||
将 `config.json.template` 复制为 `config.json`:
|
||||
|
||||
```bash
|
||||
cp config.json.template config.json
|
||||
```
|
||||
|
||||
编辑 `config.json`,添加你的应用/工作流:
|
||||
|
||||
```json
|
||||
{
|
||||
"apps": [
|
||||
{
|
||||
"app_code": "G7z6vKwp",
|
||||
"app_name": "通用助手",
|
||||
"app_description": "通用AI助手,可以回答各类问题"
|
||||
},
|
||||
{
|
||||
"app_code": "your_kb_app",
|
||||
"app_name": "产品文档助手",
|
||||
"app_description": "基于产品文档知识库的问答助手"
|
||||
},
|
||||
{
|
||||
"app_code": "your_workflow",
|
||||
"app_name": "数据分析工作流",
|
||||
"app_description": "执行数据清洗、分析和可视化的完整工作流"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
**注意:** 修改 `config.json` 后,Agent 在下次加载技能时会自动读取新配置。
|
||||
|
||||
### 3. 调用应用
|
||||
|
||||
```bash
|
||||
bash(command='curl -sS --max-time 120 -X POST "https://api.link-ai.tech/v1/chat/completions" -H "Content-Type: application/json" -H "Authorization: Bearer $LINKAI_API_KEY" -d "{\"app_code\":\"G7z6vKwp\",\"messages\":[{\"role\":\"user\",\"content\":\"What is artificial intelligence?\"}],\"stream\":false}"', timeout=130)
|
||||
```
|
||||
|
||||
## 使用示例
|
||||
|
||||
### 基础调用
|
||||
|
||||
```bash
|
||||
# 调用默认模型 (通过 bash + curl)
|
||||
bash(command='curl -sS --max-time 120 -X POST "https://api.link-ai.tech/v1/chat/completions" -H "Content-Type: application/json" -H "Authorization: Bearer $LINKAI_API_KEY" -d "{\"app_code\":\"G7z6vKwp\",\"messages\":[{\"role\":\"user\",\"content\":\"解释一下量子计算\"}],\"stream\":false}"', timeout=130)
|
||||
```
|
||||
|
||||
### 指定模型
|
||||
|
||||
在 JSON body 中添加 `model` 字段:
|
||||
|
||||
```json
|
||||
{
|
||||
"app_code": "G7z6vKwp",
|
||||
"model": "LinkAI-4.1",
|
||||
"messages": [{"role": "user", "content": "写一篇关于AI的文章"}],
|
||||
"stream": false
|
||||
}
|
||||
```
|
||||
|
||||
### 调用工作流
|
||||
|
||||
工作流的 app_code 从 LinkAI 控制台获取,调用方式与普通应用相同。
|
||||
|
||||
## ⚠️ 重要提示
|
||||
|
||||
### 超时配置
|
||||
|
||||
LinkAI 应用(特别是视频/图片生成、复杂工作流)可能需要较长时间处理。在 curl 命令中加入 `--max-time 180`,并相应增加 bash 工具的 `timeout` 参数。
|
||||
|
||||
## 配置说明
|
||||
|
||||
### config.json 字段
|
||||
|
||||
| 字段 | 类型 | 说明 |
|
||||
|------|------|------|
|
||||
| `app_code` | string | 应用或工作流的唯一标识码,从 LinkAI 控制台获取 |
|
||||
| `app_name` | string | 应用名称,会显示在技能描述中 |
|
||||
| `app_description` | string | 应用功能描述,帮助 Agent 理解何时使用该应用 |
|
||||
|
||||
### 获取 app_code
|
||||
|
||||
1. 登录 [LinkAI 控制台](https://link-ai.tech/console)
|
||||
2. 进入「应用管理」或「工作流管理」
|
||||
3. 选择要集成的应用/工作流
|
||||
4. 在应用详情页找到 `app_code`
|
||||
|
||||
## 应用类型
|
||||
|
||||
### 1. 普通应用
|
||||
|
||||
配置了系统提示词和参数的标准对话应用,可以:
|
||||
- 设置角色和性格
|
||||
- 绑定知识库
|
||||
- 启用插件(图像识别、网页搜索、代码执行等)
|
||||
|
||||
### 2. 知识库应用
|
||||
|
||||
基于特定知识库的问答应用,适合:
|
||||
- 企业内部知识库
|
||||
- 产品文档问答
|
||||
- 客户支持
|
||||
|
||||
### 3. 工作流
|
||||
|
||||
多步骤的自动化流程,可以:
|
||||
- 串联多个处理节点
|
||||
- 条件分支
|
||||
- 循环处理
|
||||
- 调用外部 API
|
||||
|
||||
## 响应格式
|
||||
|
||||
### 成功响应
|
||||
|
||||
API 返回 OpenAI 兼容格式,从 `choices[0].message.content` 获取回复内容:
|
||||
|
||||
```json
|
||||
{
|
||||
"choices": [{
|
||||
"message": {
|
||||
"role": "assistant",
|
||||
"content": "人工智能(AI)是计算机科学的一个分支..."
|
||||
}
|
||||
}],
|
||||
"usage": {
|
||||
"prompt_tokens": 10,
|
||||
"completion_tokens": 150,
|
||||
"total_tokens": 160
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 错误响应
|
||||
|
||||
```json
|
||||
{
|
||||
"error": {
|
||||
"message": "应用不存在",
|
||||
"code": "xxx"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## 常见错误
|
||||
|
||||
### LINKAI_API_KEY environment variable is not set
|
||||
**原因:** 未配置 API Key
|
||||
**解决:** 使用 `env_config` 工具设置 LINKAI_API_KEY
|
||||
|
||||
### 应用不存在 (402)
|
||||
**原因:** app_code 不正确或应用已删除
|
||||
**解决:** 检查 app_code 是否正确,确认应用存在
|
||||
|
||||
### 无访问权限 (403)
|
||||
**原因:** 尝试访问他人的私有应用
|
||||
**解决:** 确保应用是公开的或你是创建者
|
||||
|
||||
### 账号积分额度不足 (406)
|
||||
**原因:** LinkAI 账户余额不足
|
||||
**解决:** 前往控制台充值
|
||||
|
||||
### 内容审核不通过 (409)
|
||||
**原因:** 请求或响应包含敏感内容
|
||||
**解决:** 修改输入内容,避免敏感词
|
||||
|
||||
## 技术实现
|
||||
|
||||
### 自动技能描述生成
|
||||
|
||||
当 skill 系统加载 `linkai-agent` 时,会自动:
|
||||
1. 读取 `config.json` 中的应用列表
|
||||
2. 将每个应用的 name 和 description 动态添加到技能描述中
|
||||
3. Agent 加载时会看到完整的应用列表
|
||||
|
||||
这是在 `agent/skills/loader.py` 中实现的特殊处理。
|
||||
|
||||
### 工作流程
|
||||
|
||||
```
|
||||
用户配置 config.json
|
||||
↓
|
||||
Agent 启动/重新加载技能
|
||||
↓
|
||||
SkillLoader 检测到 linkai-agent
|
||||
↓
|
||||
动态读取 config.json
|
||||
↓
|
||||
生成包含所有应用描述的 description
|
||||
↓
|
||||
Agent 看到所有可用应用的完整信息
|
||||
↓
|
||||
用户请求触发
|
||||
↓
|
||||
Agent 根据描述选择合适的应用
|
||||
↓
|
||||
通过 bash + curl 调用 LinkAI API
|
||||
↓
|
||||
LinkAI API 处理并返回结果
|
||||
```
|
||||
|
||||
## 最佳实践
|
||||
|
||||
1. **清晰的描述** - 为每个应用写清晰、具体的描述,帮助 Agent 理解应用用途
|
||||
2. **合理分工** - 不同应用负责不同领域,避免功能重叠
|
||||
3. **无需重启** - 修改 config.json 后,Agent 下次加载技能时会自动更新
|
||||
4. **模型选择** - 根据任务复杂度选择合适的模型
|
||||
5. **知识库优化** - 为专业领域的应用绑定相关知识库
|
||||
|
||||
## 扩展用法
|
||||
|
||||
### 在 Agent 系统中使用
|
||||
|
||||
当 Agent 系统加载这个 skill 时,会自动从 `config.json` 读取应用列表并生成描述:
|
||||
|
||||
```
|
||||
Call LinkAI apps/workflows. 通用助手(G7z6vKwp: 通用AI助手,可以回答各类问题); 产品文档助手(kb_app_001: 基于产品文档知识库的问答助手); 数据分析工作流(wf_002: 执行数据清洗、分析和可视化的完整工作流)
|
||||
```
|
||||
|
||||
Agent 会根据用户问题自动选择最合适的应用进行调用。
|
||||
|
||||
## 相关链接
|
||||
|
||||
- LinkAI 平台: https://link-ai.tech
|
||||
- API 文档: https://docs.link-ai.tech
|
||||
- 控制台: https://link-ai.tech/console
|
||||
- 模型列表: https://link-ai.tech/console/models
|
||||
- 应用广场: https://link-ai.tech/square
|
||||
|
||||
## License
|
||||
|
||||
Part of the chatgpt-on-wechat project.
|
||||
@@ -1,85 +0,0 @@
|
||||
---
|
||||
name: linkai-agent
|
||||
description: Call LinkAI applications and workflows. Use bash with curl to invoke the chat completions API.
|
||||
homepage: https://link-ai.tech
|
||||
metadata:
|
||||
emoji: 🤖
|
||||
default_enabled: false
|
||||
requires:
|
||||
bins: ["curl"]
|
||||
env: ["LINKAI_API_KEY"]
|
||||
---
|
||||
|
||||
# LinkAI Agent
|
||||
|
||||
Call LinkAI applications and workflows through the chat completions API. Available apps are loaded from config.json.
|
||||
|
||||
## Setup
|
||||
|
||||
This skill requires a LinkAI API key.
|
||||
|
||||
1. Get your API key from [LinkAI Console](https://link-ai.tech/console/interface)
|
||||
2. Set the environment variable: `export LINKAI_API_KEY=Link_xxxxxxxxxxxx` (or use env_config tool)
|
||||
|
||||
## Configuration
|
||||
|
||||
1. Copy `config.json.template` to `config.json`
|
||||
2. Add your apps/workflows in config.json. The skill description is auto-generated from this config when loaded.
|
||||
|
||||
## Usage
|
||||
|
||||
Use the bash tool with curl to call the API. **Prefer curl** to avoid encoding issues on Windows PowerShell.
|
||||
|
||||
```bash
|
||||
curl -X POST "https://api.link-ai.tech/v1/chat/completions" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "Authorization: Bearer $LINKAI_API_KEY" \
|
||||
-d '{
|
||||
"app_code": "<app_code>",
|
||||
"messages": [{"role": "user", "content": "<question>"}],
|
||||
"stream": false
|
||||
}'
|
||||
```
|
||||
|
||||
**Optional parameters**:
|
||||
|
||||
- Add `--max-time 120` to curl for long-running tasks (video/image generation)
|
||||
|
||||
**On Windows cmd**: Use `%LINKAI_API_KEY%` instead of `$LINKAI_API_KEY`.
|
||||
|
||||
**Example** (via bash tool):
|
||||
|
||||
```bash
|
||||
bash(command='curl -sS --max-time 120 -X POST "https://api.link-ai.tech/v1/chat/completions" -H "Content-Type: application/json" -H "Authorization: Bearer $LINKAI_API_KEY" -d "{\"app_code\":\"G7z6vKwp\",\"messages\":[{\"role\":\"user\",\"content\":\"What is AI?\"}],\"stream\":false}"', timeout=130)
|
||||
```
|
||||
|
||||
## Response
|
||||
|
||||
Success (extract `choices[0].message.content` from JSON):
|
||||
|
||||
```json
|
||||
{
|
||||
"choices": [{
|
||||
"message": {
|
||||
"role": "assistant",
|
||||
"content": "AI stands for Artificial Intelligence..."
|
||||
}
|
||||
}],
|
||||
"usage": {
|
||||
"prompt_tokens": 10,
|
||||
"completion_tokens": 50,
|
||||
"total_tokens": 60
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Error:
|
||||
|
||||
```json
|
||||
{
|
||||
"error": {
|
||||
"message": "Error description",
|
||||
"code": "error_code"
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -1,14 +0,0 @@
|
||||
{
|
||||
"apps": [
|
||||
{
|
||||
"app_code": "G7z6vKwp",
|
||||
"app_name": "LinkAI客服助手",
|
||||
"app_description": "当用户需要了解LinkAI平台相关问题时才选择该助手,基于LinkAI知识库进行回答"
|
||||
},
|
||||
{
|
||||
"app_code": "SFY5x7JR",
|
||||
"app_name": "内容创作助手",
|
||||
"app_description": "当用户需要创作图片或视频时才使用该助手,支持Nano Banana、Seedream、即梦、Veo、可灵等多种模型"
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user