Skip to content

Run AI locally with Ollama

Connect Avenvail to Ollama on your own hardware, pick a vision model, and describe and tag screenshots without sending them to a hosted AI service.

Screenshots and photos are often private: chats, account pages, documents, receipts. Hosted AI services need every one of them sent to their servers. Ollama runs open models on your own machine instead, and Avenvail talks to it like any other AI service, so every AI step and every AI guide works with it.

This guide sets up the connection, helps you choose a model, and builds a library workflow that writes a detailed description of each new screenshot and keeps it as a searchable attachment. Afterwards, searching Files for TypeError or invoice finds screenshots by what they show, even when their names say nothing.

  1. File uploaded (trigger)PNG, JPEG and WebP
  2. Load content
  3. AI describe imageDetailed · Ollama
  4. Save the descriptionAdd attachment · Description
  5. AI suggest tagsFrom the description · Ollama
  6. Any tags?
    • True
      1. Add tags
    • FalseNothing runs

What you'll build

For screenshot-build-error.png, the file gets an attachment called Description:

A dark terminal window titled "Terminal — npm run build". A Vite production build transforms 312 modules and then fails with "TypeError: Cannot read properties of undefined (reading 'map')" at renderList in src/components/OrderList.tsx, line 42. npm reports exit code 1.

and the tags code, errors and terminal. Searching Files for orderlist then lists it, with the matching line highlighted.

The attachment, the tags and the search result are verified from a run. The description's wording is illustrative: it's what a good vision model writes for the sample, and yours will differ.

Before you start

DifficultyIntermediate
TimeAbout 30 minutes, plus downloading a model
Workflow kindLibrary workflow
ConnectionsOllama, set up below
ModelsA vision model, such as gemma3:4b or qwen2.5vl:7b
Folders, fieldsNone
TagsA few you already use, such as code, errors, receipts
Sample filescreenshot-build-error.png
WhoAn administrator, to allow the connection to reach your own network

You need a machine that can run a model: the Avenvail server itself, or another computer on your network, ideally with a GPU or Apple silicon. A small vision model needs about 4 to 8 GB of free memory.

The built-in Describe and tag imagestemplate is close to this workflow. It suggests up to five tags, including new ones, and has no Condition before Add tags, so an image the model suggests no tags for fails its run. To start from it, add it with your Ollama connection, then add the Condition described in Tag it from the description.

Build it

Install Ollama and pull a model

Install Ollama on the machine that will run the model, then pull a vision model:

ollama pull gemma3:4b
ModelGood for
gemma3:4bA fast start on modest hardware. Describes, names and classifies screenshots well.
gemma3:12bNoticeably better at reading small text, if you have the memory.
qwen2.5vl:7bReading text in images, such as receipts and documents.
llama3.2Text only. Fine for steps that only get text, such as suggesting tags from a description, but it can't look at images.

Avenvail recognizes these names as vision models. Try two models on the same sample and keep the one whose answers you like.

Let Avenvail reach Ollama

Ollama listens on localhost:11434, which only programs on the same machine, outside containers, can reach. Pick the setup that matches yours:

Ollama on the same machine as Avenvail in Docker. Start Ollama with OLLAMA_HOST=0.0.0.0 so it listens beyond localhost. On Docker Desktop, the address is http://host.docker.internal:11434/v1. On Linux, also add this to the avenvail service in compose.yaml, then run docker compose up -d:

compose.yaml
services:
  avenvail:
    extra_hosts:
      - "host.docker.internal:host-gateway"

Ollama in the same Compose project. Add a service and use http://ollama:11434/v1:

compose.yaml
services:
  ollama:
    image: ollama/ollama
    restart: unless-stopped
    volumes:
      - ollama-models:/root/.ollama

volumes:
  ollama-models:

Pull models with docker compose exec ollama ollama pull gemma3:4b. For GPU access, follow Ollama's Docker instructions.

Ollama on another computer. Start it with OLLAMA_HOST=0.0.0.0 and use that computer's address, such as http://192.168.1.50:11434/v1 or http://gpu-box.lan:11434/v1. Ollama has no password, so don't expose its port to the internet.

Add the connection

Open Automations › Connections, click Add connection and choose Ollama.

  • Address: the address from the previous step, ending in /v1.
  • Allow private network addresses: on. Every address above is on your own network, which Avenvail refuses by default. This switch starts on for administrators; other users can't turn it on. See Outside addresses only.
  • Default model: open the picker. It lists the models Ollama has pulled; choose gemma3:4b. Select Image input in the picker to hide models known not to take images.
  • Under Usage limits, set At the same time to 1 if Ollama runs on a CPU or a small GPU. Requests then wait their turn instead of competing for memory.

Click Test connection. It checks that Ollama answers and knows the default model, without running the model. Then click Add connection. The Connections page shows it as Local or Private network, from its address.

Create the workflow

Open Automations › Workflows, click New workflow, name it Describe screenshots, keep Library workflow, and choose File uploaded. Set File types to image/png, image/jpeg and image/webp.

Add Load content after the trigger.

Describe the image

Add AI describe image and click Configure step.

  • Connection: your Ollama connection. Model stays at Connection default.
  • Image: Load content › Content.
  • Length: Detailed: subjects, setting, visible text and notable details.
  • Add text input, then a template: File name: {{ subject.name }}. It's sent as context, not instructions.
  • On the Advanced tab, Additional instructions: Quote any headings, error messages, product names and prices exactly as they appear.

Search matches whole words in the description, so the words the model quotes are the words you'll find the screenshot by.

Save it as an attachment

Add Add attachment, rename it Save the description:

  • Name: Description
  • Text: from a step, AI describe image › Description.
  • Kind: Text.

Text attachments are searchable and never shown on share pages.

Tag it from the description

Add AI suggest tags and click Configure step.

  • Connection: your Ollama connection. Keep Method at Language model.
  • Add text input, then from a step, AI describe image › Description.
  • Most tags: 3.

This step reads the description instead of the image, so it's quicker, and a text-only model can do it. Then add a Condition named Any tags? with AI suggest tags › Tags isn't empty, and Add tags on True with Tags from a step, AI suggest tags › Tags. Add tags fails when it has nothing to add, which is what the Condition prevents.

Test it

  1. Upload the sample with the workflow inactive.
  2. Click Test, choose it, and turn on Allow sending content to outside services. Avenvail treats every AI connection as an outside service, even a local one, because only the address you entered says where it is. The content still only goes to your Ollama.
  3. Click Start test. The first request can take a while, because Ollama loads the model into memory first.
  4. Select AI describe image to read the description, and its Test tab for how long it took and the tokens it used.

Turn it on

Click Publish, then turn on Active. Upload a few screenshots, wait for their runs to finish, and search Files for a word that appears in one of them.

To describe screenshots you already have, build the same steps in a workflow whose trigger is Run manually, select files in Files, and choose More actions › Run automation. With At the same time set to 1, they're described one at a time.

What to expect

A verified run, with an illustrative description:

StepResult
AI describe imageThe description above. Its ai output names the model that answered and the tokens it used.
Save the descriptionA 272-byte text attachment, Description
AI suggest tagscode, errors, terminal
Add tagsThe three tags

Searching Files for orderlist lists the screenshot, found by its attachment.

Speed

Local models are as fast as the hardware they run on. As a rough guide, a small vision model describes a screenshot in a few seconds on a recent GPU or Apple silicon, and can take a minute or more on a CPU.

  • The first request after Ollama has been idle loads the model, which adds seconds to minutes.
  • Each AI step attempt may take up to 8 minutes, and a single request to an AI connection up to 3 minutes. A slower model times out and is tried again.
  • At the same time on the connection and Runs at the same time in the workflow's settings keep a burst of uploads from overwhelming the machine. Runs wait their turn; nothing is lost.
  • Length Short or Alt text writes less and answers faster than Detailed.

Use Ollama with the other AI guides

Every AI guide works with this connection. Two settings differ from the hosted defaults:

  • AI classify and AI detect start with Method set to Decision model. Ollama doesn't serve decision models, so the editor flags the connection: set Method to Language model.
  • AI extract starts with Method set to Extraction model. Set it to Language model for the same reason.

With those changes, Build a self-organizing screenshot library, Extract and organize receipts and Name screenshots with AI run entirely on your own hardware.

Troubleshooting

ProblemCause and fix
outbound_blockedThe address is on your network and Allow private network addresses is off. Turn it on, as an administrator.
connection_unreachableAvenvail can't reach Ollama. Check the address from inside the container, that Ollama was started with OLLAMA_HOST=0.0.0.0, and, on Linux, the extra_hosts line.
The model picker is emptyOllama has no models yet, or Avenvail can't reach it. Run ollama list on the Ollama machine, then Refresh in the picker.
ai_model_unavailableThe model isn't pulled on that machine. Run ollama pull with the exact name, including the tag after :.
ai_model_missing_featureThe model is known not to take images, such as llama3.2. Choose a vision model for steps with an image.
connection_timeout, or steps keep retryingThe model is too slow for the hardware. Use a smaller model, set At the same time to 1, or move Ollama to a machine with a GPU.
ai_invalid_output on AI suggest tags or classifyA small model didn't answer in the required JSON shape twice. Try a larger model; Ollama holds answers to the step's schema, which helps most models.
Descriptions miss the text in the imageUse a model that reads text better, such as qwen2.5vl:7b or gemma3:12b, and keep the instruction to quote text.

Make it your own

  • Shorter, cheaper descriptions. Use Length Alt text for one sentence per screenshot. It's quicker, and still finds screenshots by their main subject.
  • Summaries for documents. Replace AI describe image with AI summarize, Length Bullet points, and save its Summary as a Markdown attachment.
  • OCR instead of a vision model. Make screenshots searchable reads the exact text with Avenvail OCR in about a second per screenshot on a processor, with no model at all. Use both: OCR for exact words, a description for what the screenshot shows.
  • Several machines. Make one connection per Ollama machine, and pick which one each workflow uses.

Privacy, cost and reliability

  • Files only go to the address in the connection. With Ollama on your own hardware, they never leave your network. Ollama itself doesn't need an internet connection once a model is pulled.
  • There's no cost per request, only the electricity and the hardware. Token counts still appear in each run, and Tokens a day still works as a cap.
  • The connection's address decides where data goes, not the preset you chose. If you point an Ollama connection at a server you don't control, files go there.
  • If the Ollama machine is off, AI steps fail with connection_unreachable after their retries. Set If this step fails to Continue on optional AI steps, as the other guides do, so the rest of the workflow still runs.
  • AI descriptions can be wrong or miss things. They're notes about a file, never a change to it.