Arcane OS Docs Development only

Reference

Arcane.ollama.createBrain()

Creates an Arcane brain model.

  • Reference

This focused page is derived from the mechanically checked full member inventory.

Syntax

Arcane.ollama.createBrain(definition)

Parameters

definition: ArcaneBrainDefinition

Return value

Promise<ArcaneBrainResult>

Description

Creates an Arcane brain model.

Overview

Arcane.ollama.createBrain(definition) creates a managed arcane-<slug>:latest model from an approved base. It can pull or repair the base, create the alias, verify it, and optionally make it the default. Use it only from Settings after explaining download, storage, and default-model effects.

Parameters

baseModel is required and uses the Ollama name pattern. name defaults to "my-brain" and is normalized to a lowercase 1-64 character slug using letters, digits, dots, underscores, and hyphens. contextLength defaults to 0 for inherited/automatic; send only 0 or an explicit 1,024-262,144 value. makeDefault defaults to false. Unknown keys are ignored and should not be sent.

Return value

It resolves to {model, baseModel, defaultModel, operation}. model is the created Arcane alias, defaultModel reports whether it became the default, and operation is the completed managed receipt.

Availability

This is an exclusive desktop Core Settings mutation requiring ai.models.manage. The package-owned verified workflow, registry evidence, resource admission, and reserved-alias rules remain authoritative. Android does not expose it.

Errors and recovery

Invalid base/name/context, model-policy, registry, integrity, storage, admission, provider-create, alias-verification, and persistence failures require the stable resolution. After uncertain completion, refresh inventory and settings before retrying; do not manually copy or delete managed aliases.

Streaming, cancellation, and events

The workflow emits standard operation events but does not expose raw Ollama chunks. It has a 50-minute renderer timeout and no signal; Core does not cooperatively cancel it, so teardown is not rollback.

Example

This helper is not invoked until the Settings application confirms the exact base, name, context, and default-model effect.

async function createBrainAfterConfirmation(baseModel, name) {
    return globalThis.Arcane.ollama.createBrain({
        baseModel: baseModel,
        name: name,
        contextLength: 0,
        makeDefault: false
    });
}

Reference group

AI and Ollama

Repository and reviewed source access