Harbor Documentation

repository·main·Indexed 25 days ago

https://github.com/av/harbor

A CLI and companion application for orchestrating local LLM stacks. Harbor automates the configuration and management of backends (Ollama, llama.cpp, vLLM, MLX), frontends (Open WebUI), and supporting services like SearXNG, Speaches, and ComfyUI. It includes specialized tools such as Harbor Boost, an LLM optimizer proxy, and Harbor Bench for benchmarking, as well as Promptfoo integration for evaluation workflows.

Tokens
195.9K
Snippets
713
Records
1.2K
Agent score
82%

What's inside Harbor

  1. Overview of Harbor Backend Services

    main

    Harbor integrates with various backend services to provide LLM inference capabilities. These backends can range from local runners to large-scale inference engines. Key categories include:

    • General LLM Inference: Services like Ollama, vLLM, llama.cpp, mistral.rs, Aphrodite, and Text Generation Inference.
    • Apple Silicon Optimized: MLX and oMLX provide host-native inference for Apple hardware via OpenAI-compatible proxies.
    • Audio (TTS/STT): Speaches (supports both TTS and STT), openedai-speech (uses Coqui AI's xtts_v2 or piper), and Parler.
    • Specialized/Hardware Optimized: Lemonade (optimized for AMD), AirLLM (70B inference on single 4GB GPU), and KTransformers.
    • Multi-modal/Tooling: SGLang (LLM and Vision), Needle (function-calling), and Lemonade (LLM, Speech, and Image).
  2. Overview of Harbor capabilities

    main

    Harbor provides a pre-wired environment for local AI development. Key features include:

    • Pre-connected Backends: All backends are automatically connected to Open WebUI.
    • Service Orchestration: Handles Docker Compose, configuration, and connectivity for multiple services.
    • Extensible Stack: Supports adding web search (SearXNG), voice chat (Speaches), and image generation (ComfyUI).
    • Automated Setup: Eliminates manual configuration for complex local LLM stacks.
  3. Overview of Harbor Boost

    main

    boost is an optimizing LLM proxy that provides OpenAI-compatible, Anthropic-compatible, and OpenAI Responses API interfaces. It acts as a drop-in proxy to combine multiple LLM backends behind a single endpoint with a single API key.

    Key capabilities include:

    • OpenAI Compatibility: Works with most LLM providers and clients.
    • Anthropic Compatibility: Automatically converts Anthropic Messages API requests to OpenAI format, routes them through the Boost pipeline (modules, workflows, model routing), and converts responses back to Anthropic format.
    • OpenAI Responses API Support: Supports the /v1/responses endpoint, converting these requests to Chat Completions internally.
    • Modules: Allows running custom code (e.g., for web research, reasoning, or style) during the chat completion process.
  4. Explore Harbor Services and Tools

    main
    Harbor provides a catalog of services and specialized tools for LLM workflows. You can explore the available services, the Harbor companion application (Harbor App), and the specific features related to tool use through the official documentation.
  5. Use the wswp Harbor Boost module

    main
    The wswp module attempts to swap adjacent word positions in the input text based on a certain probability. This is intended to help avoid model overfitting, particularly when an LLM is overly focused on specific word orders or structures, though usability may be limited.
  6. Use faster-whisper-server for Speech-to-Text

    main

    The faster-whisper-server is an OpenAI API-compatible Speech-to-Text (STT) server. It handles the stt service type and exposes the /v1/audio/transcriptions endpoint.

    Note: Harbor also supports speaches, a newer OpenAI-compatible STT/TTS server that supersedes faster-whisper-server. For new setups, consider using speaches instead.

  7. Explore Harbor Frontend integrations

    main

    Harbor integrates with various frontend services that provide user interfaces for interacting with language models. These services vary in capability, including support for RAG (Retrieval-Augmented Generation), workflows, image generation, and CLI/TUI interfaces.

    Key frontend options include:

    • AnythingLLM: Desktop & Docker AI application with built-in RAG and agents.
    • Lobe Chat: Modern AI chat framework supporting multiple providers, Knowledge Base (RAG), and Multi-Modals.
    • Open WebUI: Feature-rich web interface supporting OpenAI-compatible/Ollama backends, TTS, and Web RAG.
    • Onyx: AI platform with Chat UI, RAG, MCP support, and 40+ document connectors.
    • SillyTavern: Advanced chat frontend for power users supporting personas and extensions.
    • ComfyUI: Modular diffusion model GUI for image workflows.
    • oterm / Parllama: Terminal-based (CLI/TUI) clients for Ollama.
    • Voicebox: Local-first AI voice studio for speech generation and cloning.
  8. Explore Harbor Services (UIs, Backends, and Satellites)

    main

    Harbor provides a wide ecosystem of integrated services categorized into three main types:

    1. UIs (Frontends): User interfaces for interacting with models (e.g., Open WebUI, LibreChat, Lobe Chat, SillyTavern).
    2. Backends: Inference engines and model runners (e.g., Ollama, llama.cpp, vLLM, Aphrodite, MLX).
    3. Satellites: Specialized tools, agents, and integrations (e.g., Aider, Dify, Open Interpreter, SearXNG, n8n).

    For detailed information on how to use or configure any specific service, refer to the official services documentation.

  9. Create and set Plandex Model Packs

    main

    Model packs allow you to group specific models and parameters (temperature, Top P) for different roles within Plandex (e.g., planner, builder, summarizer).

    1. Create a pack: Use harbor plandex model-packs create to define a new pack and assign models/parameters to roles like planner, summarizer, builder, names, commit-messages, auto-continue, verifier, and auto-fix.
    2. Set as default: Use harbor pdx set-model default to apply a model pack to all new plans going forward.