Flock is a low-code platform for rapidly building chatbots, RAG applications, and coordinating multi-agent teams, primarily using LangChain, LangGraph, NextJS, and FastAPI.
MIT License
A chatbot, RAG, agent, and multi-agent application project based on LangChain, LangGraph, and other frameworks, open-source, and capable of offline deployment.
Flock aims to be an open-source platform for developing large language model (LLM) applications. It is an LLM-based application utilizing the concepts of LangChain and LangGraph. The goal is to create a suite of LLMOps solutions that supports chatbots, RAG applications, agents, and multi-agent systems, with the capability for offline operation.
Inspired by the StreetLamb project and its tribe project , Flock adopts much of the approach and code. Building on this foundation, it introduces some new features and directions of its own.
Some of the layout in this project references Lobe-chat, Dify, and fastgpt. They are all excellent open-source projects, thanks🙇.
Project tech stack: LangChain + LangGraph + React + Next.js + Chakra UI + PostgreSQL
1 APP
2 Model
3 Ohters
git clone https://github.com/Onelevenvy/flock.git
cp .env.example .env
Some environment variables in the .env file have a default value of changethis. You have to change them with a secret key, to generate secret keys you can run the following command:
python -c "import secrets; print(secrets.token_urlsafe(32))"
Copy the content and use that as password / secret key. And run that again to generate another secure key.
cd docker
docker compose --env-file ../.env up -d
Server startup requires Python 3.10.x. It is recommended to use pyenv for quick installation of the Python environment.
To install additional Python versions, use pyenv install.
pyenv install 3.10
To switch to the "3.10" Python environment, use the following command:
pyenv global 3.10
Follow these steps : Navigate to the "backen" directory:
cd backend
activate the environment.
poetry env use 3.10
poetry install
# Let the DB start
python /app/app/backend_pre_start.py
# Run migrations
alembic upgrade head
# Create initial data in DB
python /app/app/initial_data.py
uvicorn app.main:app --reload --log-level debug
poetry run celery -A app.core.celery_app.celery_app worker --loglevel=debug
cd web
pnpm install
cd web
pnpm dev
# or pnpm build then pnpm start