For the complete documentation index, see llms.txt. This page is also available as Markdown.

LLMs

LLM Integration

OM1's LLM integration is intended to make it easy to (1) send input information to LLMs and then (2) route LLM responses to various system actions, such as speak and move. The OM1 system integrates various concrete implementations of Large Language Models (LLMs), each designed to address different requirements and interaction patterns. These implementations manage API communication, conversation history, and the processing of structured responses, particularly for function calls that trigger agent actions. The framework ensures a consistent interface, allowing the system to interchangeably utilize diverse LLM backends.

OM1 also supports per-mode LLM configuration. If a mode specifies its own LLM, it takes precedence over the top-level cortex_llm setting. This allows different modes to use different models based on their specific requirements.

The plugins handle authentication, API communication, prompt formatting, response parsing, and conversation history management. LLM plugin examples are located in plugins/llm: Code.

Endpoint Overview

# Base URL: https://api.openmind.com/

POST /api/core/{provider}/chat/completions    # Single agent
DELETE /api/core/agent/memory                 # Multi agent memory wipe

LLM Modes

OM1 supports three LLM execution strategies depending on your latency, quality, and reliability requirements.

Mode
Description
Performance

Single

One LLM processes all requests

Good — fast, but limited capability

Dual

Local + cloud LLMs in parallel

Better — higher accuracy, but slower

Parallel

N specialized LLMs run simultaneously

Best — fastest and most capable

Single LLM Integration

For testing and introductory educational purposes, we integrate with multiple language models (LLMs) to provide chat completion via a POST /api/core/{provider}/chat/completions endpoint. Each LLM plugin takes fused input data (the prompt) and sends it to an LLM. The response is then parsed and provided to internal/runtime/cortex.go for distribution to the system actions:

response, err := client.ChatCompletions(ctx, &ChatRequest{
    Model:    config.Model,
    Messages: messages,
    ResponseFormat: outputModel,
    Timeout:  config.Timeout,
})

parsedResponse := outputModel.Validate(response.Choices[0].Message.Content)
return parsedResponse

The standard output model is defined in internal/llm/output_model.go.

Example config:

Dual LLM support

OM1 implements a dual-LLM response mechanism that combines both local and cloud-based models to optimize response quality and latency.

  • Local model: Qwen3-30B (on-device)

  • Cloud model: GPT-4.1

Example config:

How It Works

  1. For each request, OM1 sends the prompt to both the local and cloud LLMs in parallel.

  2. The system waits up to 3.2 seconds for responses.

  3. If both models return a response within the threshold:

    • The two responses are evaluated by the local LLM.

    • The local LLM selects the better response as the final output.

  4. If only one model responds within the threshold:

    That response is used directly as the final output.

This approach ensures fast responses while leveraging cloud models for higher-quality outputs when available.

Parallel LLM

Multiple LLMs run in parallel, each handling specific actions they are capable of. Results stream as they complete, allowing the cortex to execute actions immediately without waiting for all LLMs.

Example config:

Local LLMs

The system supports on-device inference using the Qwen3-30B local LLM. This enables low-latency responses and allows certain workloads to run entirely on the device without relying on cloud connectivity.

Ollama Integration

Ollama provides an easy way to run open-source models locally. OM1 supports Ollama through the OllamaLLM plugin.

Prerequisites:

  1. Install Ollama: https://ollama.ai

  2. Pull a model: ollama pull llama3.2

  3. Ensure Ollama is running: ollama serve

Configuration:

Run with Ollama:

Agent Architecture

The system employs four primary agents that work together:

  • Navigation Agent: Processes spatial and movement-related tasks

  • Perception Agent: Handles sensory input analysis and environmental understanding

  • RAG Agent: Provides retrieval-augmented generation (RAG) capabilities using the user's knowledge base

  • Team Agent: Synthesizes outputs from all agents into a unified response

Main API Endpoint

Supported Models

Examples

A Smart Dog

Imagine you would like to program a smart dog. Describe the desired capabilities and behaviors of the dog in system_prompt_base. For example:

Last updated

Was this helpful?