MCPcopy
hub / github.com/mudler/LocalAGI

github.com/mudler/LocalAGI @v2.9.0 sqlite

repository ↗ · DeepWiki ↗ · release v2.9.0 ↗
1,447 symbols 3,952 edges 199 files 414 documented · 29%
README

LocalAGI Logo

Your AI. Your Hardware. Your Rules

Go Report Card License: MIT GitHub stars GitHub issues

Try on Telegram

Create customizable AI assistants, automations, chat bots and agents that run 100% locally. No need for agentic Python libraries or cloud service keys, just bring your GPU (or even just CPU) and a web browser.

LocalAGI is a powerful, self-hostable AI Agent platform that allows you to design AI automations without writing code. Create Agents with a couple of clicks, connect via MCP, and use built-in Skills (manage skills in the Web UI and enable them per agent). Every agent exposes a complete drop-in replacement for OpenAI's Responses APIs with advanced agentic capabilities. No clouds. No data leaks. Just pure local AI that works on consumer-grade hardware (CPU and GPU). Skills follow the skillserver format and can be created, imported, or synced from git.

🛡️ Take Back Your Privacy

Are you tired of AI wrappers calling out to cloud APIs, risking your privacy? So were we.

LocalAGI ensures your data stays exactly where you want it—on your hardware. No API keys, no cloud subscriptions, no compromise.

🌟 Key Features

  • 🎛 No-Code Agents: Easy-to-configure multiple agents via Web UI.
  • 🖥 Web-Based Interface: Simple and intuitive agent management.
  • 🤖 Advanced Agent Teaming: Instantly create cooperative agent teams from a single prompt.
  • 📡 Connectors: Built-in integrations with Discord, Slack, Telegram, GitHub Issues, and IRC.
  • 🛠 Comprehensive REST API: Seamless integration into your workflows. Every agent created will support OpenAI Responses API out of the box.
  • 📚 Short & Long-Term Memory: Built-in knowledge base (RAG) for collections, file uploads, and semantic search. Manage collections in the Web UI under Knowledge base; agents with "Knowledge base" enabled use it automatically (implementation uses LocalRecall libraries).
  • 🧠 Planning & Reasoning: Agents intelligently plan, reason, and adapt.
  • 🔄 Periodic Tasks: Schedule tasks with cron-like syntax.
  • 💾 Memory Management: Control memory usage with options for long-term and summary memory.
  • 🖼 Multimodal Support: Ready for vision, text, and more.
  • 🔧 Extensible Custom Actions: Easily script dynamic agent behaviors in Go (interpreted, no compilation!).
  • 📚 Built-in Skills: Manage reusable agent skills in the Web UI (create, edit, import/export, git sync). Enable "Skills" per agent to inject skill tools and the skill list into the agent.
  • 🛠 Fully Customizable Models: Use your own models or integrate seamlessly with LocalAI.
  • 📊 Observability: Monitor agent status and view detailed observable updates in real-time.

🛠️ Quickstart

# Clone the repository
git clone https://github.com/mudler/LocalAGI
cd LocalAGI

# CPU setup (default)
docker compose up

# NVIDIA GPU setup
docker compose -f docker-compose.nvidia.yaml up

# Intel GPU setup (for Intel Arc and integrated GPUs)
docker compose -f docker-compose.intel.yaml up

# AMD GPU setup
docker compose -f docker-compose.amd.yaml up

# Start with a specific model (see available models in models.localai.io, or localai.io to use any model in huggingface)
MODEL_NAME=gemma-3-12b-it docker compose up

# NVIDIA GPU setup with custom multimodal and image models
MODEL_NAME=gemma-3-12b-it \
MULTIMODAL_MODEL=moondream2-20250414 \
IMAGE_MODEL=flux.1-dev-ggml \
docker compose -f docker-compose.nvidia.yaml up

Now you can access and manage your agents at http://localhost:8080

Still having issues? see this Youtube video: https://youtu.be/HtVwIxW3ePg

Videos

Creating a basic agent Agent Observability Filters and Triggers RAG and Matrix

📚🆕 Local Stack Family

🆕 LocalAI is now part of a comprehensive suite of AI tools designed to work together:

LocalAI Logo

LocalAI

LocalAI is the free, Open Source OpenAI alternative. LocalAI act as a drop-in replacement REST API that's compatible with OpenAI API specifications for local AI inferencing. Does not require GPU.
LocalRecall Logo

LocalRecall

A REST-ful API and knowledge base management system. LocalAGI embeds this functionality: the Web UI includes a Knowledge base section and the same collections API, so you no longer need to run LocalRecall separately.

🖥️ Hardware Configurations

LocalAGI supports multiple hardware configurations through Docker Compose profiles:

CPU (Default)

  • No special configuration needed
  • Runs on any system with Docker
  • Best for testing and development
  • Supports text models only

NVIDIA GPU

  • Requires NVIDIA GPU and drivers
  • Uses CUDA for acceleration
  • Best for high-performance inference
  • Supports text, multimodal, and image generation models
  • Run with: docker compose -f docker-compose.nvidia.yaml up
  • Default models:
  • Text: gemma-3-4b-it-qat
  • Multimodal: moondream2-20250414
  • Image: sd-1.5-ggml
  • Environment variables:
  • MODEL_NAME: Text model to use
  • MULTIMODAL_MODEL: Multimodal model to use
  • IMAGE_MODEL: Image generation model to use
  • LOCALAI_SINGLE_ACTIVE_BACKEND: Set to true to enable single active backend mode

Intel GPU

  • Supports Intel Arc and integrated GPUs
  • Uses SYCL for acceleration
  • Best for Intel-based systems
  • Supports text, multimodal, and image generation models
  • Run with: docker compose -f docker-compose.intel.yaml up
  • Default models:
  • Text: gemma-3-4b-it-qat
  • Multimodal: moondream2-20250414
  • Image: sd-1.5-ggml
  • Environment variables:
  • MODEL_NAME: Text model to use
  • MULTIMODAL_MODEL: Multimodal model to use
  • IMAGE_MODEL: Image generation model to use
  • LOCALAI_SINGLE_ACTIVE_BACKEND: Set to true to enable single active backend mode

Customize models

You can customize the models used by LocalAGI by setting environment variables when running docker-compose. For example:

# CPU with custom model
MODEL_NAME=gemma-3-12b-it docker compose up

# NVIDIA GPU with custom models
MODEL_NAME=gemma-3-12b-it \
MULTIMODAL_MODEL=moondream2-20250414 \
IMAGE_MODEL=flux.1-dev-ggml \
docker compose -f docker-compose.nvidia.yaml up

# Intel GPU with custom models
MODEL_NAME=gemma-3-12b-it \
MULTIMODAL_MODEL=moondream2-20250414 \
IMAGE_MODEL=sd-1.5-ggml \
docker compose -f docker-compose.intel.yaml up

# With custom actions directory
LOCALAGI_CUSTOM_ACTIONS_DIR=/app/custom-actions docker compose up

If no models are specified, it will use the defaults: - Text model: gemma-3-4b-it-qat - Multimodal model: moondream2-20250414 - Image model: sd-1.5-ggml

Good (relatively small) models that have been tested are:

  • qwen_qwq-32b (best in co-ordinating agents)
  • gemma-3-12b-it
  • gemma-3-27b-it

🏆 Why Choose LocalAGI?

  • ✓ Ultimate Privacy: No data ever leaves your hardware.
  • ✓ Flexible Model Integration: Supports GGUF, GGML, and more thanks to LocalAI.
  • ✓ Developer-Friendly: Rich APIs and intuitive interfaces.
  • ✓ Effortless Setup: Simple Docker compose setups and pre-built binaries.
  • ✓ Feature-Rich: From planning to multimodal capabilities, connectors for Slack, MCP support, built-in Skills, LocalAGI has it all.

🌟 Screenshots

Powerful Web UI

Web UI Dashboard Web UI Agent Settings Web UI Create Group Web UI Agent Observability

Connectors Ready-to-Go

Telegram Discord Slack IRC GitHub

📖 Full Documentation

Explore detailed documentation including: - Installation Options - REST API Documentation - Connector Configuration - Agent Configuration - Skills

Environment Configuration

LocalAGI supports environment configurations. Note that these environment variables needs to be specified in the localagi container in the docker-compose file to have effect.

Variable What It Does
LOCALAGI_MODEL Your go-to model
LOCALAGI_MULTIMODAL_MODEL Optional model for multimodal capabilities
LOCALAGI_LLM_API_URL OpenAI-compatible API server URL
LOCALAGI_LLM_API_KEY API authentication
LOCALAGI_TIMEOUT Request timeout settings
LOCALAGI_STATE_DIR Where state gets stored
LOCALAGI_BASE_URL Optional base URL for the app (only relevant when using an external LocalRAG URL; not used for built-in knowledge base)
LOCALAGI_ENABLE_CONVERSATIONS_LOGGING Toggle conversation logs
LOCALAGI_API_KEYS A comma separated list of api keys used for authentication
LOCALAGI_CUSTOM_ACTIONS_DIR Directory containing custom Go action files to be automatically loaded

For the built-in knowledge base, optional env (defaults use LOCALAGI_STATE_DIR): COLLECTION_DB_PATH, FILE_ASSETS, VECTOR_ENGINE (e.g. chromem, postgres), EMBEDDING_MODEL, DATABASE_URL (when VECTOR_ENGINE=postgres).

Skills are stored in a fixed skills subdirectory under LOCALAGI_STATE_DIR (e.g. /pool/skills in Docker). Git repo config for skills lives in that directory. No extra environment variables are required.

Installation Options

Pre-Built Binaries

Download ready-to-run binaries from the Releases page.

Source Build

Requirements: - Go 1.20+ - Git - Bun 1.2+

# Clone repo
git clone https://github.com/mudler/LocalAGI.git
cd LocalAGI

# Build it
cd webui/react-ui && bun i && bun run build
cd ../..
go build -o localagi

# Run it
./localagi

Using as a Library

LocalAGI can be used as a Go library to programmatically create and manage AI agents. Let's start with a simple example of creating a single agent:

Basic Usage: Single Agent

import (
    "github.com/mudler/LocalAGI/core/agent"
    "github.com/mudler/LocalAGI/core/types"
)

// Create a new agent with basic configuration
agent, err := agent.New(
    agent.WithModel("gpt-4"),
    agent.WithLLMAPIURL("http://localhost:8080"),
    agent.WithLLMAPIKey("your-api-key"),
    agent.WithSystemPrompt("You are a helpful assistant."),
    agent.WithCharacter(agent.Character{
        Name: "my-agent",
    }),
    agent.WithActions(
        // Add your custom actions here
    ),
    agent.WithStateFile("./state/my-agent.state.json"),
    agent.WithCharacterFile("./state/my-agent.character.json"),
    agent.WithTimeout("10m"),
    agent.EnableKnowledgeBase(),
    agent.EnableReasoning(),
)

if err != nil {
    log.Fatal(err)
}

// Start the agent
go func() {
    if err := agent.Run(); err != nil {
        log.Printf("Agent stopped: %v", err)
    }
}()

// Stop the agent when done
agent.Stop()

This basic example shows how to: - Create a single agent with essential configuration - Set up the agent's model and API connection - Configure basic features like knowledge base and reasoning - Start and stop the agent

Advanced Usage: Agent Pools

For managing multiple agents, you can use the AgentPool system:

Extension points exported contracts — how you extend this code

Action (Interface)
Actions is something the agent can do [49 implementers]
core/types/actions.go
AgentExecutor (Interface)
AgentExecutor defines the interface for executing agent tasks [4 implementers]
core/scheduler/interfaces.go
Connector (Interface)
(no doc) [9 implementers]
core/state/config.go
MemoryLayer (Interface)
(no doc) [51 implementers]
services/prompts/memory.go
Envelope (Interface)
Envelope defines the interface for content that can be broadcast to clients. [3 implementers]
core/sse/sse.go
RAGDB (Interface)
(no doc) [4 implementers]
core/agent/agent.go
Backend (Interface)
Backend is the interface used by REST handlers for collection operations. It is implemented by in-process state (embedde [2 …
webui/collections/types.go
TrackerKey (Interface)
(no doc)
core/conversations/conversationstracker.go

Core symbols most depended-on inside this repo

Unmarshal
called by 91
core/types/actions.go
showToast
called by 87
webui/react-ui/src/App.jsx
String
called by 71
core/sse/sse.go
Get
called by 66
core/scheduler/interfaces.go
Close
called by 61
core/scheduler/interfaces.go
buildUrl
called by 50
webui/react-ui/src/utils/api.js
Definition
called by 39
core/types/actions.go
Run
called by 36
services/prompts/memory.go

Shape

Method 652
Function 535
Struct 221
Interface 21
TypeAlias 14
FuncType 4

Languages

Go88%
TypeScript12%

Modules by API surface

core/agent/options.go54 symbols
core/agent/agent.go44 symbols
webui/types/openai.go42 symbols
core/types/actions.go36 symbols
core/sse/sse.go36 symbols
core/state/pool.go35 symbols
services/actions/memory.go30 symbols
webui/skills_handlers.go29 symbols
pkg/localrag/client.go29 symbols
core/types/job.go27 symbols
webui/app.go24 symbols
services/connectors/slack.go24 symbols

Used by 1 indexed graphs manifest dependencies, hub-wide

Dependencies from manifests, versioned

dario.cat/mergov1.0.2 · 1×
github.com/JohannesKaufmann/domv0.2.0 · 1×
github.com/JohannesKaufmann/html-to-markdown/v2v2.4.0 · 1×
github.com/Masterminds/goutilsv1.1.1 · 1×
github.com/Masterminds/semver/v3v3.4.0 · 1×
github.com/Masterminds/sprig/v3v3.3.0 · 1×
github.com/Microsoft/go-winiov0.6.2 · 1×
github.com/ProtonMail/go-cryptov1.1.6 · 1×
github.com/andybalholm/brotliv1.2.0 · 1×
github.com/andybalholm/cascadiav1.3.3 · 1×

Datastores touched

localrecallDatabase · 1 repos

For agents

$ claude mcp add LocalAGI \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact