This website is built using Mintlify, a modern website generator.
See here for instructions on how to get a notebook in the notebook
directory rendered on the website.
- To build and test documentation locally, first install Node.js. For example,
nvm install --lts
Then, install the required packages by running the following commands:
pip install pydoc-markdown pyyaml termcolor nbclient
-
You also need to install quarto. Please click on the
Pre-release
tab from this website to download the latest version ofquarto
and install it. Ensure that thequarto
version is1.5.23
or higher. -
Finally, run the following commands to build and serve the documentation:
cd website
python ./process_api_reference.py
python ./process_notebooks.py render
npm install
npm run mintlify:dev
The last command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
To build and test documentation within a docker container, run the following commands from your project root directory:
docker build -f .devcontainer/dev/Dockerfile -t ag2ai_dev_img https://github.com/ag2ai/ag2.git#main
Then start the container like so, this will log you in and ensure that Docker port 3000 is mapped to port 8081 on your local machine:
docker run -it -p 8081:3000 -v $(pwd):/home/autogen/ag2 ag2ai_dev_img bash
Once at the CLI in Docker run the following commands:
cd website
python ./process_api_reference.py
python ./process_notebooks.py render
npm install
npm run mintlify:dev
Once done you should be able to access the documentation at http://127.0.0.1:8081