Chagent is an open-source platform for developing agent-based applications.
The pronunciation of Chagent is "chay-jent", similar to the Chinese "qian jin te".
- deploy agent with docker and docker-compose.
- chat with agent via web ui.
- build agent with simple yaml config.
⚠️ Minimum system requirements:
- CPU: 2 Cores
- Memory: 4 GB
- Storage: 20 GB
- Clone the repository
git clone https://github.com/open-v2ai/chagent.git
- Run database service
cd chagent/
# run postgres
bash api/scripts/run_postgres.sh
# run redis
bash api/scripts/run_redis.sh
- Run the api server
⚠️ Requirements:
- Python: >= 3.10 (3.12.10 recommended)
- uv: >= 0.6 (0.6.16 recommended)
cd chagent/api/
# install dependencies
uv sync
# activate virtual environment
source venv/bin/activate
# set environment variables
cp .env.example .env
vim .env
# change all the values to your own
# run in dev mode in port 8000
python -m app.main
- Run the web ui
⚠️ Requirements:
- Node.js: >= 18.19.0
- npm: >= 10.8.2
- pnpm: >= 10.11.0
# open a new terminal
cd chagent/web/
# install dependencies
pnpm install
# set environment variables
cp .env.example .env
vim .env
# change all the values to your own
# run in dev mode in port 3000
pnpm dev
Then, open your browser and navigate to http://localhost:3000
to see the web ui.
- Build the docker image
cd chagent/
# build the docker image
make build-web
make build-api
- Use docker compose to deploy
⚠️ Requirements:
- Docker: >= 26.0.0
- Docker Compose: >= 2.25.0
cd chagent/deploy/
# set environment variables
cp .env.example .env
vim .env
# change all the values to your own
# run in background
docker compose up -d
Then, open your browser and navigate to http://localhost:3000
to see the web ui.
We welcome contributions to Chagent! Please see our CONTRIBUTING.md for more information.
Chagent is released under the Apache License 2.0.