Loading...
Loading...
Build and deploy autonomous AI agents with CowAgent - planning, memory, knowledge base, skills, and multi-channel support
npx skill4agent add aradotso/ai-agent-skills cowagent-ai-assistantSkill by ara.so — AI Agent Skills collection.
bash <(curl -fsSL https://cdn.link-ai.tech/code/cow/run.sh)irm https://cdn.link-ai.tech/code/cow/run.ps1 | iexcurl -O https://cdn.link-ai.tech/code/cow/docker-compose.yml
docker compose up -d# Clone repository
git clone https://github.com/zhayujie/CowAgent.git
cd CowAgent
# Install dependencies (Python 3.8+)
pip3 install -r requirements.txt
# Copy and configure
cp config-template.json config.json
# Start the agent
python3 app.pyhttp://localhost:9899cow# Service control
cow start # Start CowAgent
cow stop # Stop CowAgent
cow restart # Restart CowAgent
cow status # Check service status
cow logs # View logs
# Updates and skills
cow update # Pull latest code and restart
cow skill install <name> # Install a skill from Skill Hub
cow install-browser # Install browser automation dependencies
# Usage examples
cow skill list # List installed skills
cow skill search weather # Search for skillsconfig.json{
"model": "claude-opus-4",
"claude_api_key": "${CLAUDE_API_KEY}",
"openai_api_key": "${OPENAI_API_KEY}",
"gemini_api_key": "${GEMINI_API_KEY}",
"vision_model": "gpt-4o",
"image_create_model": "dall-e-3",
"speech_recognition_model": "whisper-1",
"text_to_speech_model": "tts-1",
"embedding_model": "text-embedding-3-small"
}channel_type{
"channel_type": "wx", // Options: terminal, wx, web, feishu, dingtalk, wecom_bot, qq
// Web channel (default)
"web": {
"port": 9899,
"admin_password": "your_password"
},
// WeChat
"wechat": {
"single_chat_prefix": ["bot", "@bot"],
"single_chat_reply_prefix": "[bot] ",
"group_chat_prefix": ["@bot"],
"group_name_white_list": ["ChatGroup1", "ChatGroup2"]
},
// Feishu
"feishu": {
"app_id": "${FEISHU_APP_ID}",
"app_secret": "${FEISHU_APP_SECRET}"
}
}{
"memory": {
"enable_long_term": true,
"deep_dream_time": "03:00", // Daily Deep Dream time
"max_context_messages": 20,
"enable_hybrid_search": true
}
}{
"knowledge": {
"enable": true,
"auto_curate": true,
"update_threshold": 3
}
}cow skill install weather
cow skill install stock-query
cow skill install github-repo-search/skill search weather
/skill install weather
/skill listskill.json{
"name": "custom-api-caller",
"version": "1.0.0",
"description": "Call external API and process results",
"author": "Your Name",
"triggers": ["call api", "fetch data from api"],
"parameters": [
{
"name": "endpoint",
"type": "string",
"description": "API endpoint URL",
"required": true
},
{
"name": "method",
"type": "string",
"description": "HTTP method (GET/POST)",
"default": "GET"
}
],
"steps": [
{
"action": "web_fetch",
"params": {
"url": "{{endpoint}}",
"method": "{{method}}"
}
},
{
"action": "write",
"params": {
"path": "result.json",
"content": "{{web_fetch.response}}"
}
}
]
}skills/custom-api-caller/skill.jsonskill-creatorCreate a skill that fetches GitHub repository info and saves it to a markdown file.# Agent uses these tools automatically
read(path="/path/to/file.txt")
write(path="output.txt", content="data")
edit(path="config.json", replacements=[{"old": "value1", "new": "value2"}])
ls(path="./data")bash(command="ls -la")
bash(command="python script.py")memory(query="what did user say about project X")
knowledge_search(query="API documentation")web_fetch(url="https://api.example.com/data")
web_search(query="Python async best practices")
browser(action="navigate", url="https://example.com")
browser(action="click", selector="#submit-button")scheduler(action="add", time="2026-05-25 14:00", task="Send report")
scheduler(action="list")mcp.json{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/workspace"],
"transport": "stdio"
},
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"transport": "stdio",
"env": {
"GITHUB_TOKEN": "${GITHUB_TOKEN}"
}
},
"puppeteer": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-puppeteer"],
"transport": "stdio"
}
}
}mcp.jsonplugins/my_plugin.pyimport plugins
from bridge.context import ContextType
from bridge.reply import Reply, ReplyType
from common.log import logger
@plugins.register(
name="MyPlugin",
desc="Custom functionality plugin",
version="1.0",
author="Your Name"
)
class MyPlugin(plugins.Plugin):
def __init__(self):
super().__init__()
self.handlers[Event.ON_HANDLE_CONTEXT] = self.on_handle_context
logger.info("[MyPlugin] initialized")
def on_handle_context(self, e_context: EventContext):
context = e_context['context']
if context.type != ContextType.TEXT:
return
content = context.content.strip()
if content.startswith("/hello"):
reply = Reply()
reply.type = ReplyType.TEXT
reply.content = "Hello from custom plugin!"
e_context['reply'] = reply
e_context.action = EventAction.BREAK_PASS
return
def get_help_text(self, **kwargs):
return "MyPlugin: Use /hello to get a greeting"from channel.channel import Channel
from bridge.context import Context, ContextType
from bridge.reply import Reply
class CustomChannel(Channel):
def __init__(self):
super().__init__()
def startup(self):
# Initialize your channel (websocket, HTTP server, etc.)
logger.info("[CustomChannel] starting...")
def handle_message(self, message):
context = Context()
context.type = ContextType.TEXT
context.content = message['text']
context['session_id'] = message['user_id']
# Process through agent
reply = super().build_reply_content(message['text'], context)
# Send reply through your channel
self.send_message(message['user_id'], reply.content)
def send_message(self, user_id, content):
# Implement sending logic
passchannel/channel_factory.pyfrom channel.custom.custom_channel import CustomChannel
def create_channel(channel_type):
if channel_type == "custom":
return CustomChannel()
# ... existing channels{
"name": "github-issue-reporter",
"version": "1.0.0",
"description": "Search GitHub repos, analyze issues, generate report",
"triggers": ["analyze github issues", "report on github repository"],
"parameters": [
{
"name": "repo",
"type": "string",
"description": "GitHub repository (owner/repo)",
"required": true
}
],
"steps": [
{
"action": "web_fetch",
"params": {
"url": "https://api.github.com/repos/{{repo}}/issues",
"headers": {
"Authorization": "token ${GITHUB_TOKEN}"
}
},
"output": "issues_data"
},
{
"action": "bash",
"params": {
"command": "echo '{{issues_data}}' | jq '[.[] | {title: .title, state: .state, comments: .comments}]' > /tmp/issues.json"
}
},
{
"action": "read",
"params": {
"path": "/tmp/issues.json"
},
"output": "processed_issues"
},
{
"action": "write",
"params": {
"path": "github_report_{{repo | replace('/', '_')}}.md",
"content": "# GitHub Issues Report for {{repo}}\n\n{{processed_issues}}\n\nGenerated at {{now}}"
}
}
]
}# Agent automatically searches memory when relevant
# Manual retrieval in custom code:
from plugins import memory_search
results = memory_search(
query="user's favorite programming language",
limit=5
)# Agent auto-curates during conversation
# Manual update:
from plugins import knowledge_update
knowledge_update(
topic="Project Setup",
content="New setup steps: 1. Install deps 2. Configure .env",
operation="append"
){
"steps": [
{"action": "web_fetch", "params": {"url": "..."}},
{"action": "bash", "params": {"command": "process.sh"}},
{"action": "read", "params": {"path": "result.txt"}},
{"action": "memory", "params": {"action": "save", "content": "{{read.content}}"}}
]
}python3 --version # Ensure 3.8+
pip3 install --upgrade pip setuptools wheelpip3 install -r requirements.txt --force-reinstall{
"web": {
"port": 9900 // Change from default 9899
}
}export CLAUDE_API_KEY=sk-...config.jsoncow logs # Check for API errorsmodelclaude_api_keyopenai_api_keycurl -X POST https://api.anthropic.com/v1/messages \
-H "x-api-key: ${CLAUDE_API_KEY}" \
-H "anthropic-version: 2023-06-01" \
-H "content-type: application/json" \
-d '{"model":"claude-opus-4","messages":[{"role":"user","content":"test"}],"max_tokens":100}'wechatconfig.jsonapp_idapp_secretmemory.deep_dream_timeknowledge.auto_curate: trueknowledge.update_thresholdtriggersskill.json/skill listcow skill install <name>cow logs # Check for tool errorscow install-browser{
"browser": {
"headless": false // Debug with visible browser
}
}claude-sonnet-4gpt-4o-minideepseek-v4-flashmemory.max_context_messages0 3 * * * cow restartcow logs # View recent logs
cow logs -f # Follow logs in real-time
tail -f logs/app.log # Direct log accessconfig.json{
"debug": true,
"log_level": "DEBUG"
}cow statuscow logsnetstat -tuln | grep 9899