Skip to main content

Source Code Deployment

1. Clone the project

git clone https://github.com/zhayujie/CowAgent
cd CowAgent/
For network issues, use the mirror: https://gitee.com/zhayujie/CowAgent

2. Install dependencies

Core dependencies (required):
pip3 install -r requirements.txt
Optional dependencies (recommended):
pip3 install -r requirements-optional.txt

3. Install Cow CLI

Install the command-line tool for managing services and skills:
pip3 install -e .
Then use the cow command:
cow help
This step is recommended. After installation you can use cow start, cow stop, cow update to manage the service, and cow skill to manage skills. Without the CLI, you can use ./run.sh or python3 app.py to run.

4. Configure

Copy the config template and edit:
cp config-template.json config.json
Fill in model API keys, channel type, and other settings in config.json. See the model docs for details.

5. Run

Using Cow CLI (recommended):
cow start
Or run locally in foreground:
python3 app.py
By default, the Web console starts. Access http://localhost:9899 to chat. Background run on server (without CLI):
nohup python3 app.py & tail -f nohup.out
If deploying on a server, open port 9899 in your firewall or security group to access the Web console. It’s recommended to restrict access to specific IPs for security.

Docker Deployment

Docker deployment does not require cloning source code or installing dependencies. For Agent mode, source deployment is recommended for broader system access.
Requires Docker and docker-compose.
1. Download config
curl -O https://cdn.link-ai.tech/code/cow/docker-compose.yml
Edit docker-compose.yml with your configuration. 2. Start container
sudo docker compose up -d
3. View logs
sudo docker logs -f chatgpt-on-wechat
If deploying on a server, open port 9899 in your firewall or security group to access the Web console. It’s recommended to restrict access to specific IPs for security.

Core Configuration

{
  "channel_type": "web",
  "model": "MiniMax-M2.5",
  "agent": true,
  "agent_workspace": "~/cow",
  "agent_max_context_tokens": 40000,
  "agent_max_context_turns": 30,
  "agent_max_steps": 15
}
ParameterDescriptionDefault
channel_typeChannel typeweb
modelModel nameMiniMax-M2.5
agentEnable Agent modetrue
agent_workspaceAgent workspace path~/cow
agent_max_context_tokensMax context tokens40000
agent_max_context_turnsMax context turns30
agent_max_stepsMax decision steps per task15
Full configuration options are in the project config.py.