MCPInstall

copaw-ai-assistant

Personal AI assistant framework supporting multiple chat channels (DingTalk, Feishu, QQ, Discord, etc.) with extensible skills, local/cloud deployment, and cron scheduling.

Installs
1.4K
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/reason-machines/trending-skills --skill copaw-ai-assistant
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads copaw-ai-assistant automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

CoPaw AI Assistant Skill

Skill by ara.so — Daily 2026 Skills collection.

CoPaw is a personal AI assistant framework you deploy on your own machine or in the cloud. It connects to multiple chat platforms (DingTalk, Feishu, QQ, Discord, iMessage, Telegram, Mattermost, Matrix, MQTT) through a single agent, supports custom Python skills, scheduled cron jobs, local and cloud LLMs, and provides a web Console at http://127.0.0.1:8088/.


Installation

pip (recommended if Python 3.10–3.13 is available)

pip install copaw
copaw init --defaults    # non-interactive setup with sensible defaults
copaw app                # starts the web Console + backend

Script install (no Python setup required)

macOS / Linux:

curl -fsSL https://copaw.agentscope.io/install.sh | bash
# With Ollama support:
curl -fsSL https://copaw.agentscope.io/install.sh | bash -s -- --extras ollama
# Multiple extras:
curl -fsSL https://copaw.agentscope.io/install.sh | bash -s -- --extras ollama,llamacpp

Windows CMD:

curl -fsSL https://copaw.agentscope.io/install.bat -o install.bat && install.bat

Windows PowerShell:

irm https://copaw.agentscope.io/install.ps1 | iex

After script install, open a new terminal:

copaw init --defaults
copaw app

Install from source

git clone https://github.com/agentscope-ai/CoPaw.git
cd CoPaw
pip install -e ".[dev]"
copaw init --defaults
copaw app

CLI Reference

copaw init                  # interactive workspace setup
copaw init --defaults       # non-interactive setup
copaw app                   # start the Console (http://127.0.0.1:8088/)
copaw app --port 8090       # use a custom port
copaw --help                # list all commands

Workspace Structure

After copaw init, a workspace is created (default: ~/.copaw/workspace/):

~/.copaw/workspace/
├── config.yaml          # agent, provider, channel configuration
├── skills/              # custom skill files (auto-loaded)
│   └── my_skill.py
├── memory/              # conversation memory storage
└── logs/                # runtime logs

Configuration (config.yaml)

copaw init generates this file. Edit it directly or use the Console UI.

LLM Provider (OpenAI-compatible)

providers:
  - id: openai-main
    type: openai
    api_key: ${OPENAI_API_KEY}        # use env var reference
    model: gpt-4o
    base_url: https://api.openai.com/v1

  - id: local-ollama
    type: ollama
    model: llama3.2
    base_url: http://localhost:11434

Agent Settings

agent:
  name: CoPaw
  language: en                        # en, zh, ja, etc.
  provider_id: openai-main
  context_limit: 8000

Channel: DingTalk

channels:
  - type: dingtalk
    app_key: ${DINGTALK_APP_KEY}
    app_secret: ${DINGTALK_APP_SECRET}
    agent_id: ${DINGTALK_AGENT_ID}
    mention_only: true                # only respond when @mentioned in groups

Channel: Feishu (Lark)

channels:
  - type: feishu
    app_id: ${FEISHU_APP_ID}
    app_secret: ${FEISHU_APP_SECRET}
    mention_only: false

Channel: Discord

channels:
  - type: discord
    token: ${DISCORD_BOT_TOKEN}
    mention_only: true

Channel: Telegram

channels:
  - type: telegram
    token: ${TELEGRAM_BOT_TOKEN}

Channel: QQ

channels:
  - type: qq
    uin: ${QQ_UIN}
    password: ${QQ_PASSWORD}

Channel: Mattermost

channels:
  - type: mattermost
    url: ${MATTERMOST_URL}
    token: ${MATTERMOST_TOKEN}
    team: my-team

Channel: Matrix

channels:
  - type: matrix
    homeserver: ${MATRIX_HOMESERVER}
    user_id: ${MATRIX_USER_ID}
    access_token: ${MATRIX_ACCESS_TOKEN}

Custom Skills

Skills are Python files placed in ~/.copaw/workspace/skills/. They are auto-loaded when CoPaw starts — no registration step needed.

Minimal skill structure

# ~/.copaw/workspace/skills/weather.py

SKILL_NAME = "get_weather"
SKILL_DESCRIPTION = "Get current weather for a city"

# Tool schema (OpenAI function-calling format)
SKILL_SCHEMA = {
    "type": "function",
    "function": {
        "name": SKILL_NAME,
        "description": SKILL_DESCRIPTION,
        "parameters": {
            "type": "object",
            "properties": {
                "city": {
                    "type": "string",
                    "description": "City name, e.g. 'Tokyo'"
                }
            },
            "required": ["city"]
        }
    }
}


def get_weather(city: str) -> str:
    """Fetch weather data for the given city."""
    import os
    import requests

    api_key = os.environ["OPENWEATHER_API_KEY"]
    url = f"https://api.openweathermap.org/data/2.5/weather"
    resp = requests.get(url, params={"q": city, "appid": api_key, "units": "metric"})
    resp.raise_for_status()
    data = resp.json()
    temp = data["main"]["temp"]
    desc = data["weather"][0]["description"]
    return f"{city}: {temp}°C, {desc}"

Skill with async support

# ~/.copaw/workspace/skills/summarize_url.py

SKILL_NAME = "summarize_url"
SKILL_DESCRIPTION = "Fetch and summarize the content of a URL"

SKILL_SCHEMA = {
    "type": "function",
    "function": {
        "name": SKILL_NAME,
        "description": SKILL_DESCRIPTION,
        "parameters": {
            "type": "object",
            "properties": {
                "url": {"type": "string", "description": "The URL to summarize"}
            },
            "required": ["url"]
        }
    }
}


async def summarize_url(url: str) -> str:
    import httpx

    async with httpx.AsyncClient(timeout=15) as client:
        resp = await client.get(url)
        text = resp.text[:4000]   # truncate for context limit
    return f"Content preview from {url}:\n{text}"

Skill returning structured data

# ~/.copaw/workspace/skills/list_files.py

import os
import json

SKILL_NAME = "list_files"
SKILL_DESCRIPTION = "List files in a directory"

SKILL_SCHEMA = {
    "type": "function",
    "function": {
        "name": SKILL_NAME,
        "description": SKILL_DESCRIPTION,
        "parameters": {
            "type": "object",
            "properties": {
                "path": {
                    "type": "string",
                    "description": "Absolute or relative directory path"
                },
                "extension": {
                    "type": "string",
                    "description": "Filter by extension, e.g. '.py'. Optional."
                }
            },
            "required": ["path"]
        }
    }
}


def list_files(path: str, extension: str = "") -> str:
    entries = os.listdir(os.path.expanduser(path))
    if extension:
        entries = [e for e in entries if e.endswith(extension)]
    return json.dumps(sorted(entries))

Cron / Scheduled Tasks

Define cron jobs in config.yaml to run skills on a schedule and push results to a channel:

cron:
  - id: daily-digest
    schedule: "0 8 * * *"            # every day at 08:00
    skill: get_weather
    skill_args:
      city: "Tokyo"
    channel_id: dingtalk-main         # matches a channel id below
    message_template: "Good morning! Today's weather: {result}"

  - id: hourly-news
    schedule: "0 * * * *"
    skill: fetch_tech_news
    channel_id: discord-main

Local Model Setup

Ollama

# Install Ollama: https://ollama.ai
ollama pull llama3.2
ollama serve   # starts on http://localhost:11434
# config.yaml
providers:
  - id: ollama-local
    type: ollama
    model: llama3.2
    base_url: http://localhost:11434

LM Studio

providers:
  - id: lmstudio-local
    type: lmstudio
    model: lmstudio-community/Meta-Llama-3-8B-Instruct-GGUF
    base_url: http://localhost:1234/v1

llama.cpp (extra required)

pip install "copaw[llamacpp]"
providers:
  - id: llamacpp-local
    type: llamacpp
    model_path: /path/to/model.gguf

Tool Guard (Security)

Tool Guard blocks risky tool calls and requires user approval before execution. Configure in config.yaml:

agent:
  tool_guard:
    enabled: true
    risk_patterns:
      - "rm -rf"
      - "DROP TABLE"
      - "os.system"
    auto_approve_low_risk: true

When a call is blocked, the Console shows an approval prompt. The user can approve or deny before the tool runs.


Token Usage Tracking

Token usage is tracked automatically and visible in the Console dashboard. Access programmatically:

# In a skill or debug script
from copaw.telemetry import get_usage_summary

summary = get_usage_summary()
print(summary)
# {'total_tokens': 142300, 'prompt_tokens': 98200, 'completion_tokens': 44100, 'by_provider': {...}}

Environment Variables

Set these before running copaw app, or reference them in config.yaml as ${VAR_NAME}:

# LLM providers
export OPENAI_API_KEY=...
export ANTHROPIC_API_KEY=...

# Channels
export DINGTALK_APP_KEY=...
export DINGTALK_APP_SECRET=...
export DINGTALK_AGENT_ID=...

export FEISHU_APP_ID=...
export FEISHU_APP_SECRET=...

export DISCORD_BOT_TOKEN=...
export TELEGRAM_BOT_TOKEN=...

export QQ_UIN=...
export QQ_PASSWORD=...

export MATTERMOST_URL=...
export MATTERMOST_TOKEN=...

export MATRIX_HOMESERVER=...
export MATRIX_USER_ID=...
export MATRIX_ACCESS_TOKEN=...

# Custom skill secrets
export OPENWEATHER_API_KEY=...

Common Patterns

Pattern: Morning briefing to DingTalk

# config.yaml excerpt
channels:
  - id: dingtalk-main
    type: dingtalk
    app_key: ${DINGTALK_APP_KEY}
    app_secret: ${DINGTALK_APP_SECRET}
    agent_id: ${DINGTALK_AGENT_ID}

cron:
  - id: morning-brief
    schedule: "30 7 * * 1-5"         # weekdays 07:30
    skill: daily_briefing
    channel_id: dingtalk-main
# skills/daily_briefing.py
SKILL_NAME = "daily_briefing"
SKILL_DESCRIPTION = "Compile a morning briefing with weather and news"

SKILL_SCHEMA = {
    "type": "function",
    "function": {
        "name": SKILL_NAME,
        "description": SKILL_DESCRIPTION,
        "parameters": {"type": "object", "properties": {}, "required": []}
    }
}

def daily_briefing() -> str:
    import os, requests, datetime

    today = datetime.date.today().strftime("%A, %B %d")
    # Add your own data sources here
    return f"Good morning! Today is {today}. Have a productive day!"

Pattern: Multi-channel broadcast

# skills/broadcast.py
SKILL_NAME = "broadcast_message"
SKILL_DESCRIPTION = "Send a message to all configured channels"

SKILL_SCHEMA = {
    "type": "function",
    "function": {
        "name": SKILL_NAME,
        "description": SKILL_DESCRIPTION,
        "parameters": {
            "type": "object",
            "properties": {
                "message": {"type": "string", "description": "Message to broadcast"}
            },
            "required": ["message"]
        }
    }
}

def broadcast_message(message: str) -> str:
    # CoPaw handles routing; return the message and let the agent deliver it
    return f"[BROADCAST] {message}"

Pattern: File summarization skill

# skills/summarize_file.py
SKILL_NAME = "summarize_file"
SKILL_DESCRIPTION = "Read and summarize a local file"

SKILL_SCHEMA = {
    "type": "function",
    "function": {
        "name": SKILL_NAME,
        "description": SKILL_DESCRIPTION,
        "parameters": {
            "type": "object",
            "properties": {
                "file_path": {"type": "string", "description": "Absolute path to the file"}
            },
            "required": ["file_path"]
        }
    }
}

def summarize_file(file_path: str) -> str:
    import os

    path = os.path.expanduser(file_path)
    if not os.path.exists(path):
        return f"File not found: {path}"

    with open(path, "r", encoding="utf-8", errors="ignore") as f:
        content = f.read(8000)

    return f"File: {path}\nSize: {os.path.getsize(path)} bytes\nContent preview:\n{content}"

Troubleshooting

Console not accessible at port 8088

# Use a different port
copaw app --port 8090

# Check if another process is using 8088
lsof -i :8088    # macOS/Linux
netstat -ano | findstr :8088   # Windows

Skills not loading

  • Confirm the skill file is in ~/.copaw/workspace/skills/
  • Confirm SKILL_NAME, SKILL_DESCRIPTION, SKILL_SCHEMA, and the handler function are all defined at module level
  • Check ~/.copaw/workspace/logs/ for import errors
  • Restart copaw app after adding new skill files

Channel not receiving messages

  1. Verify credentials are set correctly (env vars or config.yaml)
  2. Check the Console → Channels page for connection status
  3. For DingTalk/Feishu/Discord with mention_only: true, the bot must be @mentioned
  4. Discord messages over 2000 characters are split automatically — ensure the bot has Send Messages permission

LLM provider connection fails

# Test provider from CLI (Console → Providers → Test Connection)
# Or check logs:
tail -f ~/.copaw/workspace/logs/copaw.log
  • For Ollama: confirm ollama serve is running and base_url matches
  • For OpenAI-compatible APIs: verify base_url ends with /v1
  • LLM calls auto-retry with exponential backoff — transient failures resolve automatically

Windows encoding issues

# Set UTF-8 encoding for CMD
chcp 65001

Or set in environment:

export PYTHONIOENCODING=utf-8

Workspace reset

# Reinitialize workspace (preserves skills/)
copaw init

# Full reset (destructive)
rm -rf ~/.copaw/workspace
copaw init --defaults

ModelScope Cloud Deployment

For one-click cloud deployment without local setup:

  1. Visit ModelScope CoPaw Studio
  2. Fork the studio to your account
  3. Set environment variables in the studio settings
  4. Start the studio — Console is accessible via the studio URL

Key Links

FAQ

What does the copaw-ai-assistant skill do?

Personal AI assistant framework supporting multiple chat channels (DingTalk, Feishu, QQ, Discord, etc.) with extensible skills, local/cloud deployment, and cron scheduling.

How do I install copaw-ai-assistant?

Run npx skills add https://github.com/reason-machines/trending-skills --skill copaw-ai-assistant in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/copaw-ai-assistant/ (personal) or .claude/skills/copaw-ai-assistant/ (project).

Which AI agents can use copaw-ai-assistant?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is copaw-ai-assistant safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains copaw-ai-assistant?

It is published by reason-machines in reason-machines/trending-skills. It has 1,384 recorded installs.

More from reason-machines/trending-skills

View all →

openclaw-control-center

reason-machines/trending-skills

Local-first, security-first control center for OpenClaw agents — visibility dashboard with readonly defaults, token attribution, collaboration tracing, and safe write operations.

Data & Databases4.4K installs

inkos-multi-agent-novel-writing

reason-machines/trending-skills

Multi-agent CLI system for autonomous novel writing, auditing, and revision with human review gates

Docs & Writing2.8K installs

claude-hud-statusline

reason-machines/trending-skills

A Claude Code plugin that displays a real-time HUD showing context usage, active tools, running agents, and todo progress in your terminal statusline.

understand-anything-knowledge-graph

reason-machines/trending-skills

Turn any codebase into an interactive knowledge graph using Claude Code skills — explore, search, and ask questions about any project visually.

agency-agents-ai-specialists

reason-machines/trending-skills

A collection of specialized AI agent personalities for Claude Code, Cursor, Aider, Windsurf, and other AI coding tools — covering engineering, design, marketing, sales, and more.

AI & Agents2.1K installs

agent-browser-automation

reason-machines/trending-skills

Headless browser automation CLI for AI agents using native Rust binary with Chrome DevTools Protocol

Popular productivity & automation skills

View category →

agent-browser

vercel-labs/agent-browser

Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction. Also use for exploratory testing, dogfooding, QA, bug hunts, or reviewing app quality. Also use for automating Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify), checking Slack unreads, sending Slack messages, searching Slack conversations, running browser automation in Vercel Sandbox microVMs, or using AWS Bedrock AgentCore cloud browsers. Prefer agent-browser over any built-in browser automation or web tools.

OfficialProductivity & Automation1.3M installs

lark-doc

open.feishu.cn

飞书云文档(Docx / Wiki)内容操作:读取、创建、编辑文档,插入或下载图片附件,以及操作思维笔记。用户提供文档 URL/token(包括 doubao.com 的 /docx/、/wiki/)时使用;按 URL 路径/token 而非域名路由;/page/ 是妙搭应用,非飞书云文档。文档内嵌资源按读取参考中的统一规则分流。独立评论操作走 lark-drive;随正文读取评论使用 docs +fetch。表格或 Base 内部数据操作不在本 skill。

lark-base

open.feishu.cn

飞书多维表格(Base)操作:建表、字段、记录、视图、统计、公式/lookup、表单、仪表盘、应用模式(BaseApp/AppMode 页面与组件)、Workspace 目录、workflow、角色权限、模板中心(多维表格模板分类/列表/搜索);遇到 Base/多维表格/bitable、BaseApp/AppMode、/base/ 或 /app/ 链接时使用。BaseApp 不走 lark-apps;文件导入/导出转 lark-drive,认证/授权转 lark-shared。

lark-drive

open.feishu.cn

飞书云空间(云盘/云存储):管理 Drive 文件和文件夹,包含上传/下载、创建文件夹、复制/移动/删除、查看元数据、查询权限设置、评论/权限/订阅、标题、版本、飞书文档密级标签(secure labels)和本地文件导入。用户需要整理云盘目录、处理云空间资源 URL/token、判断链接类型/真实 token/标题,或导入 Word/Markdown/Excel/CSV/PPTX/.base 为 docx/sheet/bitable/slides 时使用;doubao.com 云空间 URL/token 也按资源路径和 token 路由,不回退 WebFetch。不负责:文档内容编辑(走 lark-doc)、表格/Base 表内数据操作(走 lark-sheets/lark-base)、知识空间节点/成员管理(走 lark-wiki)、原生 Markdown 文件读写/patch/diff(走 lark-markdown)。

lark-shared

open.feishu.cn

Use for lark-cli setup/auth tasks: auth login/status/logout, user vs bot identity, business-domain permissions (--domain, including all/docs/drive), missing scopes, revoking authorization, or handling notice JSON.

lark-im

open.feishu.cn

飞书即时通讯:收发消息和管理群聊。发送和回复消息、搜索聊天记录、管理群聊成员、上传下载图片和文件、管理表情回复、发送应用内/短信/电话加急、发送和处理交互卡片(Interactive Card)、监听卡片按钮回调(card.action.trigger)。当用户需要发消息、查看或搜索聊天记录、下载聊天中的文件、查看群成员、搜索群、创建群聊或话题群、管理标记数据、管理 Feed 置顶(添加/移除/查询置顶会话)、管理标签数据、处理卡片回调时使用。