DEV Community

Cover image for Build Your Own Local AI Agent (Part 1): The Desktop Tidy-Up 🧹
Harish Kotra (he/him)
Harish Kotra (he/him)

Posted on

Build Your Own Local AI Agent (Part 1): The Desktop Tidy-Up 🧹

Welcome to a 4-part series on building private, local AI agents using Goose and Ollama.

Do you have a "Downloads" folder that looks like a war zone? PDFs, images, random installers... it's a mess. In this first post, we'll build a Desktop Tidy-Up Agent that cleans it for you—without sending a single file to the cloud.

The Goal

We want an agent that:

  1. Scans a folder.
  2. Reads the files to understand what they are (e.g., "This PDF is an invoice").
  3. Moves them into organized folders (/Finance, /Work, /Personal).

The Architecture

Here is how our Agent works under the hood:

Architecture of Goose Tidy Up

Step 1: Install the Tools

  1. Install Ollama: Download from ollama.com.
  2. Pull a Model: Run ollama pull llama3.2 (Small, fast, perfect for this task).
  3. Install Goose: Follow instructions at github.com/block/goose.

Step 2: Creates the "Recipe"

Goose uses "Recipes" (YAML files) to know what to do. Create tidy_up.yaml:

title: Desktop Tidy-Up
description: Organizes files by content.
instructions: |
  You are the Tidy-Up Agent.
  1. List files in the target folder.
  2. For each file, read a snippet to guess the category (Finance, Work, Personal).
  3. Move the file to the subfolder.
Enter fullscreen mode Exit fullscreen mode

Step 3: Run It!

Open your terminal and point Goose to your local Ollama:

GOOSE_PROVIDER=ollama \
OLLAMA_HOST=http://localhost:11434 \
goose run --recipe tidy_up.yaml --model gpt-oss:20b -s
Enter fullscreen mode Exit fullscreen mode

Result? Your messy folder is instantly organized.

Tidy up example

Here's the Github repo.

Next Up: In [Part 2], we'll build an agent that can talk to your Databases!

Top comments (0)