Manifold is a powerful platform designed for workflow automation using AI models. It supports text generation, image generation, and retrieval-augmented generation, integrating seamlessly with popular AI endpoints including OpenAI, llama.cpp, Apple's MLX LM, Google Gemini, Anthropic Claude, ComfyUI, and MFlux. Additionally, Manifold provides robust semantic search capabilities using PGVector combined with the SEFII (Semantic Embedding Forest with Inverted Index) engine.
Note: Manifold is under active development, and breaking changes are expected. It is NOT production-ready. Contributions are highly encouraged!
Ensure the following software is installed before proceeding:
- Chrome Browser: Required for web tools. Used as a headless browser and managed by Manifold. WebPGU support should be enabled for text-to-speech to work.
- Go: Version 1.21 or newer (Download).
- Python: Version 3.10 or newer (Download).
- Node.js: Version 20 managed via
nvm
(Installation Guide). - PGVector: Required for retrieval augmented generation.
- Docker: Recommended for easy setup of PGVector (Download).
$ git clone https://github.com/intelligencedev/manifold.git
$ cd manifold
After cloning the repository, initialize and update the git submodules:
$ git submodule update --init --recursive
This will fetch the required dependencies:
- llama.cpp for local model inference
- pgvector for vector similarity search in PostgreSQL
After initializing the submodules, set up pgvector using Docker:
- Navigate to the pgvector directory and build the Docker image:
$ cd external/pgvector
$ docker build -t pgvector .
- Run the PostgreSQL container with pgvector:
$ docker run --name pgvector -e POSTGRES_USER=myuser -e POSTGRES_PASSWORD=changeme -e POSTGRES_DB=manifold -p 5432:5432 -d pgvector
- The vector extension will be automatically enabled in your database. You can verify it by connecting to the database and running:
SELECT * FROM pg_extension WHERE extname = 'vector';
- Follow the official ComfyUI installation guide.
- No extra configuration needed; Manifold connects via proxy.
- Follow the MFlux installation guide.
Use the provided .config.yaml
template to create a new config.yaml
file. This file must be placed in the same path as the main.go file if running in development mode, or in the same path as the manifold binary if you build the project.
Ensure to update the values to match your environment.
For development it is not necessary to build the application. See development notes at the bottom of this guide.
Execute the following commands:
$ cd frontend
$ nvm use 20
$ npm run build
$ cd ..
$ go build -ldflags="-s -w" -trimpath -o ./dist/manifold .
$ cd dist
# 1. Ensure PG Vector is running
# 2. Place config.yaml in the same path as the binary
# 3. Run the binary
$ ./manifold
This sequence will:
- Switch Node.js to version 20.
- Build frontend assets.
- Compile the Go backend, generating the executable.
- Launch Manifold from the
dist
directory.
Upon first execution, Manifold creates necessary directories and files (e.g., data
).
Note that Manifold builds the frontend and embeds it in its binary. When building the application, the frontend is not a separate web server.
Create or update your configuration based on the provided .config.yaml
example in the repository root:
host: localhost
port: 8080
data_path: ./data
jaeger_host: localhost:6831 # Optional Jaeger tracing
# API Keys (optional integrations)
anthropic_key: "..."
openai_api_key: "..."
google_gemini_key: "..."
hf_token: "..."
# Database Configuration
database:
connection_string: "postgres://myuser:changeme@localhost:5432/manifold"
# Completion and Embedding Services
completions:
default_host: "http://localhost:8081" # Example: llama.cpp server
api_key: ""
embeddings:
host: "http://localhost:8081" # Example: llama.cpp server
api_key: ""
embedding_vectors: 1024
Crucial Points:
- Update database credentials (
myuser
,changeme
) according to your PGVector setup. - Adjust
default_host
andembeddings.host
based on your chosen model server.
Launch your browser and navigate to:
http://localhost:8080
Replace
8080
if you customized your port inconfig.yaml
.
Manifold is compatible with OpenAI-compatible endpoints:
- Port Conflict: If port 8080 is occupied, either terminate conflicting processes or choose a new port in
config.yaml
. - PGVector Connectivity: Confirm your
database.connection_string
matches PGVector container credentials. - Missing Config File: Ensure
config.yaml
exists in the correct directory. Manifold will not launch without it.
Ensure config.yaml
is present at the root of the project by using the provided .config.yaml
template and configuring your values.
Run the Go backend:
$ go mod tidy
$ go run .
Run the frontend:
$ cd frontend
$ nvm use 20
$ npm install
$ npm run dev
Manifold welcomes contributions! Check the open issues for tasks and feel free to submit pull requests.