MoinMoin Logo
  • Comments
  • Immutable Page
  • Menu
    • Navigation
    • RecentChanges
    • FindPage
    • Local Site Map
    • Help
    • HelpContents
    • HelpOnMoinWikiSyntax
    • Display
    • Attachments
    • Info
    • Raw Text
    • Print View
    • Edit
    • Load
    • Save
  • Login

Navigation

  • Start
  • Sitemap
Unknown action login.
  • ollama

Contents

  1. ollama
    1. Setup proxy
    2. Chatbots - LLM - AI accessible via browser
    3. Stuff
    4. Meta-prompt
    5. Private JARVIS-style assistant

ollama

  • https://ollama.com/

  • https://ollama.com/search

  • https://github.com/ollama/ollama

   1 cd ~
   2 curl -fsSL https://ollama.com/install.sh | sh
   3 # >>> The Ollama API is now available at 127.0.0.1:11434.
   4 curl localhost:11434 
   5 # Ollama is running
   6 ollama run llama3.2:1b
   7 ollama show llama3.2:1b
   8 ollama list
   9 ollama ps
  10 ollama serve # start server 
  11 ollama stop llama3.2:1b
  12 ollama rm llama3.2:1b
  13 
  14 ollama run llama3.2

Setup proxy

   1 sudo nano  /etc/systemd/system/ollama.service

   1 [Unit]
   2 Description=Ollama Service
   3 After=network-online.target
   4 
   5 [Service]
   6 ExecStart=/usr/local/bin/ollama serve
   7 User=ollama
   8 Group=ollama
   9 Restart=always
  10 RestartSec=3
  11 Environment="PATH=/home/vagrant/.dotnet/tools:/home/vagrant/dotnetcore9:/usr/local/bin:/usr/bin:/bin:/home/vagrant/jdk-17.0.7+7/bin/:/home/vagrant/gradle-8.1/bin/"
  12 Environment="HTTPS_PROXY=http://192.168.0.123:3128/"
  13 Environment="HTTP_PROXY=http://192.168.0.123:3128/"
  14 
  15 [Install]
  16 WantedBy=default.target

   1 sudo systemctl daemon-reload
   2 sudo systemctl restart ollama
   3 systemctl show ollama
   4 ollama run llama3.2:1b

Chatbots - LLM - AI accessible via browser

  • Gemini prompt - https://gemini.google.com/

  • Copilot prompt - https://copilot.microsoft.com/

  • Grok prompt - https://grok.com/

  • ChatGPT prompt - https://chatgpt.com/

Stuff

Does a local run of ollama spends tokens ? No

LLMs might generate different versions because they are probabilistic. They predict the next word/token based on probabilities.

The reason for results variation is called temperature.

High temperature [0.8 - 1.0] the model takes more risks that leads to creative code.

Low temperature [0.0 - 0.2] becomes very focused and predictable. At temperature 0 (zero) it will choose the most likely word/token.

Seed value, in ollama, if not specified a random one is generated for each request.

If you want the same code every time set the same seed and temperature 0.

RAG, retrieved augmented generation. Create a domain-specialized assistant.

Tools like copilot chat looks at the .md files and source code and perform a RAG workflow.

RAG.

  • R retrieval, the tool searches for the relevant code or markdown text
  • A augmentation, takes those snippets and pastes them into the prompt and send it to the model
  • G the model reads the code/docs and generates an answer based only on the specific context

A specific project is the domain. Project memory/domain (markdown + code)

Local LLM runner (ollama) VS code extension continue RAM local models

  • 8GB RAM -> llama3:8b

  • 16GB - 32GB -> codestral

Continue talks with ollama via a local REST API

A chatbot just talks. An agent can do things.

Continue is agentic. It has perception (context awareness). It sees the prompt, sees open files, the git git history and terminal errors.

Tool use: can perform actions on my behalf.

Reasoning: if i prompt "fix this error", looks at the stack trace, reasons which file is causing the bug and proposes a fix.

Continue is a "human in the loop" agent, asks my command/prompt, performs complex task, ask for approval.

Ollama is the brain. Continue (private coding agent) is the agentic body lives inside vscode .

Meta-prompt

Convert this task into a x.md skill: I want to update the version in a pom.xml. It must use the current date and time in ISO8601 format with only numbers.

Convert this task into a y.md skill: I wnat to bump up the minor version in Java pom files of this project. It must add 1 to the minor version.

In VSCode copilot to run the skill use #SkillName .

Meta-prompt template

  • I have a specific task: <>. I want you to create a professional skill for this task.

  • clean meta-prompt
    • Convert this task into a skillx.md skill: ensure indentation is OK.Autonomously choose the ideal persona, rules and output format to ensure a professional, zero regression result. Use structured markdown.

A skill represents a single expert. A toolchain represents a whole department.

Private JARVIS-style assistant

Openclaw + ollama

   1 ollama run llama3:8b
   2 
   3 ollama ps
   4 # NAME         ID              SIZE      PROCESSOR    CONTEXT    UNTIL              
   5 # llama3:8b    365c0bd3c000    4.9 GB    100% CPU     4096       4 minutes from now    
   6 
   7 # http://localhost:11434
   8 # Ollama is running
   9 
  10 cd ~
  11 curl -fsSL https://openclaw.ai/install.sh | bash 
  12 # Quick start (recommended) (Find AI access on this machine, verify it, then open the web dashboard.)
  13 #◆  Model/auth provider
  14 #│  ● Ollama (detected) (Cloud and local open models)
  15 #◆  Ollama auth method
  16 #│  ● Ollama (Connect to an Ollama server and select a cloud or local model)
  17 #◆  Ollama mode
  18 #│  ○ Cloud + Local
  19 #│  ○ Cloud only
  20 #│  ● Local only (Local models only)
  21 #◆  Ollama base URL
  22 #│  http://127.0.0.1:11434█
  23 #Workspace OK: ~/.openclaw/workspace
  24 #Sessions OK: ~/.openclaw/agents/main/sessions
  25 #Systemd: Linux installs use a systemd user service by default. Without lingering, systemd stops the user #session on logout/idle and kills the Gateway.
  26 #Enabling lingering now (may require sudo; writes /var/lib/systemd/linger).
  27 #Systemd: Enabled systemd lingering for vitor.
  28 #Gateway service runtime: QuickStart uses Node for the Gateway service (stable + supported).
  29 #Gateway service
  30 #Preparing Gateway service...
  31 #Installing Gateway service...
  32 #(||)  Setting up your workspace, gateway, and sessions….
  33 #Installed systemd service: /home/vitor/.config/systemd/user/openclaw-gateway.service
  34 #Gateway service installed.
  35 #(||)  Setting up your workspace, gateway, and sessions…..│
  36 #◇  Inference ready ──────────────────────────╮
  37 #│                                            │
  38 #│  Workspace: ~/.openclaw/workspace          │
  39 #│  Gateway: running at ws://127.0.0.1:18789  │
  40 #◇  Inference ready ───────────────────────────────────────────────────────────────────────╮
  41 #│                                                                                         │
  42 #│  Inference verified: ollama/llama3.2:1b                                                 │
  43 #│  This model is small, so I set up the lean surface — switching to a bigger model later  │
  44 #│  lifts it.                                                                              │
  45 #│  AI check: replied in 6.5s                                                              │
  46 #│                                                                                         │
  47 #├─────────────────────────────────────────────────────────────────────────────────────────╯
  48 # http://127.0.0.1:18789/chat/main
  49 ollama list
  50 #NAME                               ID              SIZE      MODIFIED       
  51 #llama3:8b                          365c0bd3c000    4.7 GB    13 minutes ago    
  52 #llama3.1:8b                        46e0c10c039e    4.9 GB    2 months ago      
  53 #ollama-custom-test-model:latest    69272621c99f    1.3 GB    9 months ago      
  54 #llama3.2:1b                        baf6a787fdff    1.3 GB    9 months ago      
  55 
  56 ~/.npm-global/bin/openclaw status
  57 
  58 # open new tab 
  59 openclaw status
  60 openclaw models set ollama/llama3.2:1b
  61 openclaw models list
  62 #OpenClaw 2026.9.1 (ad6fe23) — I've seen your commit messages. We'll work on that together.
  63 #Model                                      Input      Ctx         Local Auth  Tags
  64 #ollama/llama3.2:1b                         text       33k/131k    yes   yes   default,configured
  65 
  66 openclaw logs --follow
  67 
  68 openclaw gateway stop
  69 openclaw gateway start
  70 openclaw doctor --deep --yes 
  71 openclaw config set memory.search.enabled false 
  72 
  73 pkill -f openclaw
  74 
  75 openclaw status --all
  76 
  77 ######
  78 git clone https://github.com/openclaw/OpenClaw.git 
  79 cd OpenClaw
  80 npm i 
  81 # .env file 
  82 AI_PROVIDER=ollama
  83 OLLAMA_BASE_URL=http://localhost:11434
  84 MODEL=llama3:8b
  85 API_KEY=ollama
  86 OPENCLAW_WORKSPACE_DIR=/tmp
  87 # launch openclaw
  88 npm start 
  89 # http://localhost:3000
  90 

TextToSPeech (TTS) or SpeechToText (STT)

  • whisper (STT)
  • piper (TTS)

Private alexa

  • ears, whisper
  • brain, ollama
  • hand, openclaw
  • tools, MCP servers
  • mouth, piper
  • wake word, openwakeword or porcupine

MCP Servers act as the workshop full of tools (the hammers, wrenches, and drills).

RAG, looks up information in a book

Skill, a specific task to be done with that info

A skill is hybrid, it's part human language (instructions) and part code (logic and parameters).

A skill is like a job description:

  • input parameters, the materials
  • system instructions: expertise for the hypothetical worker
    • you are an actor X
    • you must

A skill turns a complex logic into a reusable template

"Persona" in systems instructions tells which parts if the model/brain it is allowed to be used:

  • Persona 2 years old child
  • Persona 10 years old child
  • Goal: divide a 10 by 2 ( 10/2 )

Persona also sets the output target audience. Persona is the speaker, target audience the listener.

You are X. Your task is to xyz. You must follow these rules/constraints asdf.

A model is a giant library and the persona tells which shelves to visit. Shelves might also be functional clusters, features or circuits.

Ask LLM to write a skill for itself is called meta-prompting.

Autonomous role discovery, let the LLM analyze the task and choose the most efficient speaker and listener to get the task done.

  • MoinMoin Powered
  • Python Powered
  • GPL licensed
  • Valid HTML 4.01