Skip to main content
An autonomous agent that semantically reorganizes any messy folder into a clean, navigable structure. Drop your files into workspace/unorganized_folder/, run the agent, and get a logically grouped hierarchy back. No hardcoded sorting rules β€” the agent reads the folder_organization skill and reasons about what goes where based on file names, types, and context.

Overview

The setup has two parts:
  1. AutonomousAgent with a workspace directory
  2. Workspace files (AGENTS.md, skills/folder_organization/SKILL.md) that define how the agent classifies and moves files
The agent has no custom tools and no hardcoded logic. It reads the skill, surveys the folder with tree, plans a structure, moves files, and writes a log β€” entirely on its own.

Project Structure

Environment Variables

Installation

Usage

  1. Drop your files into workspace/unorganized_folder/
  2. Run the agent:
The agent surveys the folder, classifies each file semantically, moves them into a structured hierarchy, and writes a log.

How It Works

The agent never deletes files β€” only moves them. Duplicates are kept together, not resolved.

Complete Implementation

main.py

One task, one line. No custom tools, no system prompt, no sorting logic in code.

Workspace: SKILL.md

The agent’s behavior is fully defined in workspace/skills/folder_organization/SKILL.md. It specifies:
  • Categories: photos/, videos/, audio/, documents/official/, design/, code/<project>/, archives/, projects/<name>/
  • Classification rules: infer purpose from name, extension, and folder context
  • Move rules: never delete, keep related files together, prefer semantic names
  • Log format: every move recorded as original path β†’ new path
Change the skill file to change the agent’s behavior β€” no code changes needed.

Example output structure

Repository

View the full example: Folder Organizer