# flock

> MCP Client

Flock is a flexible low-code platform for orchestrating collaborative agents, offering features like MCP tools support, parameter extraction, subgraph nodes, human-in-the-loop interactions, and multimodal chat capabilities. Flock is a flexible

## Overview

- **Category:** Productivity
- **Language:** TypeScript
- **Stars:** 1094
- **Forks:** 76
- **Owner:** Onelevenvy
- **GitHub:** https://github.com/Onelevenvy/flock
- **Homepage:** Email:qingxin1114@163.com
- **Created:** 2024-09-04T01:21:01+00:00
- **Updated:** 2025-03-28T16:52:43+00:00
- **Source:** https://model-context-protocol.com/clients/low-code-workflow-chatbot-rag-agent

## Setup

## Setup

#### 1. Deploy with Docker Compose

##### 1.1 Method 1: Pull Frontend and Backend Images from Docker Hub

```bash
# Clone the repository
git clone https://github.com/Onelevenvy/flock.git

# Navigate to the docker directory
cd flock/docker

# Copy the environment configuration file
cp ../.env.example .env

# Start the docker compose
docker compose  up -d

```

#### 1.2 Method 2: Locally Build Frontend and Backend Images

```bash
# Clone the repository
git clone https://github.com/Onelevenvy/flock.git

# Navigate to the docker directory
cd flock/docker

# Copy the environment configuration file
cp ../.env.example .env

# First, build the frontend and backend images
docker compose -f docker-compose.localbuild.yml build

# Then, start Docker Compose
docker compose -f docker-compose.localbuild.yml up -d

```

#### 2. Start with Local Source Code

#### 2.1 Preparation

##### 2.1.1 Clone the Code

git clone https://github.com/Onelevenvy/flock.git

##### 2.1.2 Copy Environment Configuration File

```bash
cp .env.example .env
```

##### 2.1.3 Generate Secret Keys

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:

```bash
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.

##### 2.1.4 Install postgres,qdrant,redis

```bash
cd docker
docker compose -f docker-compose.middleware.yml up -d
```

#### 2.2 Run Backend

##### 2.2.1 Installation of the basic environment

Server startup requires Python 3.12.x. It is recommended to use pyenv for quick installation of the Python environment.

To install additional Python versions, use pyenv install.

```bash
pyenv install 3.12
```

To switch to the "3.12" Python environment, use the following command:

```bash
pyenv global 3.12
```

Follow these steps :
Navigate to the "backen" directory:

```bash
cd backend
```

activate the environment.

```bash
poetry env use 3.12
poetry install
```

##### 2.2.2 initiral data

```bash

# Run migrations
alembic upgrade head

```

##### 2.2.3 run unicorn

```bash
 uvicorn app.main:app --reload --log-level debug
```

##### 2.2.4 run celery (Not necessary, unless you want to use the rag function)

```bash
poetry run celery -A app.core.celery_app.celery_app worker --loglevel=debug
```

#### 2.3 Run Frontend

##### 2.3.1 Enter the web directory and install the dependencies

```bash
cd web
pnpm install
```

##### 2.3.2 Start the web service

```bash
cd web
pnpm dev

# or pnpm build then pnpm start
```

## Tools

## Available Tools

1.  ChatBot (Build chatbots)
2.  SimpleRAG (Build RAG applications)
3.  Hierarchical Agent (Coordinate hierarchical agent teams)
4.  Sequential Agent (Coordinate sequential agent teams)
5.  Work-Flow (Orchestrate workflows)
6.  Intent Recognition Node (Automatically identify user input intent and route to different processing flows)
7.  CrewAI Integration (Leverage CrewAI's multi-agent capabilities)
8.  MCP Tools Support (Integrate with Model Context Protocol (MCP) servers)
9.  Parameter Extractor Node (Automatically extract structured information from text and output in JSON format)
10. Subgraph Node Support (Encapsulate and reuse complete sub-workflows)
11. Human Node (Human-in-the-loop node supporting tool call review, LLM output validation, and context provision)
12. Multimodal Chat Support (Support for multimodal chat, currently only supports image modality)
13. If-Else Node (Support conditional logic in workflows)
14. Code Execution Node (Write and execute Python scripts directly within your workflow)
15. Tool Calling (Enable agents to utilize external tools and APIs)
16. Retrieval Augmented Generation (Enable agents to reason with internal knowledge base)
17. Human-In-The-Loop (Enable human approval before tool calling)
18. Open Source Models (Use open-source LLM models such as llama, Qwen and Glm)
19. Multi-Tenancy (Manage and support multiple users and teams)
20. Persistent conversations (Save and maintain chat histories, allowing you to continue conversations)
21. Observability (Monitor and track your agents' performance and outputs in real-time using LangSmith)

