简体中文 | English | 日本語 | Getting Started
Note
-
Intent Recognition Node: New Intent Recognition node that can automatically identify user input intent based on preset categories, supporting multi-classification routing!
-
CrewAI Node Support: Now you can leverage CrewAI's powerful multi-agent capabilities in your workflows! Create sophisticated agent teams and orchestrate complex collaborative tasks with ease.
Flock is a workflow-based low-code platform for rapidly building chatbots, RAG applications, and coordinating multi-agent teams. Built on LangChain and LangGraph, it provides a flexible, low-code orchestrating solution for collaborative agents, supporting chatbots, RAG applications, agents, and multi-agent systems, with the capability for offline operation.
flock.mp4
Flock's workflow system consists of various node types, each serving a specific purpose:
- Input Node: Processes initial input and converts it into a format the workflow can handle.
- LLM Node: Utilizes large language models for text generation and processing.
- Retrieval Node: Fetches relevant information from knowledge bases.
- Tool Node: Executes specific tasks or operations, extending workflow functionality.
- Retrieval Tool Node: Combines retrieval capabilities with tool functionality.
- Intent Recognition Node: Automatically identifies user input intent based on preset categories and routes to different processing flows.
- Answer Node: Generates final answers or outputs, integrating results from previous nodes.
- Subgraph Node: Encapsulates a complete sub-workflow, allowing for modular design.
- Start and End Nodes: Mark the beginning and end of the workflow.
Future planned nodes include:
- Conditional Branch Node (If-Else)
- File Upload Node
- Code Execution Node
- Parameter Extraction Node
These nodes can be combined to create powerful and flexible workflows suitable for various complex business needs and application scenarios.
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
Note
Flock supports various model providers and makes it easy to add new ones. Check out our Models Guide to learn about supported models and how to add support for new providers.
Flock comes with various built-in tools and supports easy integration of custom tools. Check out our Tools Guide to learn about available tools and how to add your own.
1 APP
- ChatBot
- SimpleRAG
- Hierarchical Agent
- Sequential Agent
- Work-Flow
- Intent Recognition Node - Automatically identify user input intent and route to different processing flows
- CrewAI Integration
- More muti-agent ---On Progress
2 Model
- OpenAI
- ZhipuAI
- Siliconflow
- Ollama
- Qwen
- Xinference
3 Ohters
- Tools Calling
- I18n
- Langchain Templates
- Persistent conversations: Save and maintain chat histories, allowing you to continue conversations.
- Observability: Monitor and track your agents’ performance and outputs in real-time using LangSmith to ensure they operate efficiently.
- Tool Calling: Enable your agents to utilize external tools and APIs.
- Retrieval Augmented Generation: Enable your agents to reason with your internal knowledge base.
- Human-In-The-Loop: Enable human approval before tool calling.
- Open Source Models: Use open-source LLM models such as llama, Qwen and Glm.
- Multi-Tenancy: Manage and support multiple users and teams.
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