Skip to content

open-v2ai/chagent

Repository files navigation

Chagent = Chat + Agent

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".

中文 README

Features

  • deploy agent with docker and docker-compose.
  • chat with agent via web ui.
  • build agent with simple yaml config.

Quick Start

⚠️ Minimum system requirements:

  • CPU: 2 Cores
  • Memory: 4 GB
  • Storage: 20 GB
  1. Clone the repository
git clone https://github.com/open-v2ai/chagent.git
  1. Run database service
cd chagent/

# run postgres
bash api/scripts/run_postgres.sh

# run redis
bash api/scripts/run_redis.sh
  1. 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
  1. 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.

Deploy

  1. Build the docker image
cd chagent/

# build the docker image
make build-web
make build-api
  1. 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.

Contributing

We welcome contributions to Chagent! Please see our CONTRIBUTING.md for more information.

License

Chagent is released under the Apache License 2.0.

About

chagent = chat + agent

Topics

Resources

License

Code of conduct

Contributing

Stars

2 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors