Mule is an AI workflow platform that enables users to create, configure, and execute complex AI-powered workflows. It combines the power of AI agents, custom tools, and WebAssembly modules to create flexible and extensible automation pipelines.
The easiest way to get started is using Docker Compose:
# Clone the repository
git clone https://github.com/mule-ai/mule.git
cd mule
# Start the services
docker-compose up -d
# Check the services are running
docker-compose ps
# Access the application
# Web UI: http://localhost:8080
# API: http://localhost:8080/v1
# Health check: http://localhost:8080/healthThe Docker Compose setup includes:
- Mule API Server: The main application on port 8080
- PostgreSQL Database: Configured with the Mule database schema on port 5432
# Build the Docker image
docker build -t mule:latest .
# Run with custom database connection
docker run -p 8080:8080 \
-e DB_CONN_STRING="postgres://user:pass@host:5432/dbname?sslmode=disable" \
mule:latest
# View logs
docker-compose logs -f mule
docker-compose logs -f postgres- Go 1.24 or later
- PostgreSQL 12 or later
- Node.js 18+ (for frontend development)
- Create a PostgreSQL database:
CREATE DATABASE mulev2;
CREATE USER mule WITH PASSWORD 'mule';
GRANT ALL PRIVILEGES ON DATABASE mulev2 TO mule;- Run the database migration:
psql -h localhost -U mule -d mulev2 -f internal/database/migrations/0001_initial_schema.sql# Install dependencies
go mod tidy
# Build the application
make build
# Run the server
./cmd/api/bin/mule -db "postgres://mule:mule@localhost:5432/mulev2?sslmode=disable"
# Or use the Makefile
make run- Product Requirements Document - Complete specification of Mule v2
- Data Model Diagram - Entity relationship diagram showing database schema
- Sequence Diagram - Workflow execution flow and component interactions
- Software Architecture - High-level system architecture
- Primitives Relationship - How core primitives relate to each other
- Component Interaction - Detailed component interaction diagram
- Database Migrations - Database schema migration guide
- Skill System - Documentation for the pi agent skills system
Mule consists of a few core primitives:
- AI providers - connections to models, supporting OpenAI-compliant APIs
- Skills - pi agent skills that can be assigned to agents for specialized capabilities
- WASM modules - imperative code execution using the wazero library
- Agents - AI agents powered by pi RPC runtime with configurable skills
- Workflow Steps - either a call to an Agent or execution of a WASM module
- Workflows - ordered execution of workflow steps
- Backend: Go programming language with pi RPC agent runtime and wazero
- Frontend: React UI compiled into the Go binary with light/dark mode support
- Database: PostgreSQL for configuration storage and job queuing
- API: OpenAI-compatible API as the main interface to workflows
- Containerization: Multi-stage Docker builds with scratch final stage
- Fully static React frontend compiled into Go binary
- Workflow builder with drag-and-drop interface
- Per-step and full workflow execution with real-time output streaming
- Background job processing with configurable worker pools
- Synchronous and asynchronous execution modes
- Light and dark UI modes
- Docker support with multi-stage builds for minimal container size
- Health checks and graceful shutdown
- Built-in tools via pi including filesystem, bash command execution, and more
- Agent skills system for specialized capabilities
- WebSocket support for real-time updates
GET /health- Health check endpointGET /v1/models- List available AI models (agents and workflows)POST /v1/chat/completions- OpenAI-compatible chat completions
GET /api/v1/skills- List all skillsPOST /api/v1/skills- Create a new skillGET /api/v1/skills/{id}- Get a skill by IDPUT /api/v1/skills/{id}- Update a skillDELETE /api/v1/skills/{id}- Delete a skill
GET /api/v1/agents/{id}/skills- Get skills assigned to an agentPUT /api/v1/agents/{id}/skills- Assign skills to an agentDELETE /api/v1/agents/{id}/skills/{skillId}- Remove a skill from an agent
GET/POST/PUT/DELETE /api/v1/providers- AI provider managementGET /api/v1/providers/{id}/models- List models from a providerGET/POST/PUT/DELETE /api/v1/agents- Agent managementGET/POST/PUT/DELETE /api/v1/workflows- Workflow managementGET /api/v1/workflows/{id}/steps- List workflow stepsPOST /api/v1/workflows/{id}/steps- Create workflow stepPOST /api/v1/workflows/{id}/steps/reorder- Reorder workflow stepsPUT /api/v1/workflows/{workflow_id}/steps/{step_id}- Update workflow stepDELETE /api/v1/workflows/{workflow_id}/steps/{step_id}- Delete workflow stepGET/POST /api/v1/jobs- List or create jobsGET /api/v1/jobs/{id}- Job detailsDELETE /api/v1/jobs/{id}- Cancel a jobGET /api/v1/jobs/{id}/steps- Job step details
GET /api/v1/agents/{id}/tools- Get tools assigned to an agentPOST /api/v1/agents/{id}/tools- Assign tools to an agentDELETE /api/v1/agents/{id}/tools/{toolId}- Remove a tool from an agent
GET/POST/PUT/DELETE /api/v1/tools- Tool management
GET /api/v1/memory-config- Get memory configurationPUT /api/v1/memory-config- Update memory configurationGET /api/v1/settings- List all settingsGET/PUT /api/v1/settings/{key}- Get or update a specific setting
GET/POST /api/v1/wasm-modules- List and create WASM modulesPOST /api/v1/wasm-modules/compile- Compile Go code to WASMPOST /api/v1/wasm-modules/test- Test a WASM moduleGET /api/v1/wasm-modules/example- Get example WASM Go codeGET/PUT/DELETE /api/v1/wasm-modules/{id}- WASM module CRUDGET/PUT /api/v1/wasm-modules/{id}/source- Get or update WASM module source code
WS /ws- WebSocket endpoint for real-time job updates
The application can be configured via command-line flags:
./mule -db "postgres://user:pass@host:5432/dbname?sslmode=disable" -listen ":8080"-db: PostgreSQL connection string (default:postgres://user:pass@localhost:5432/mulev2?sslmode=disable)-listen: HTTP listen address (default::8080)
cd frontend
npm install
npm start# Run all tests
make test
# Run linting
make lint
# Run with hot reload
make air# Build for production
make build
# Build Docker image
docker build -t mule:latest .For detailed technical specifications, see the Product Requirements Document.