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:- AutonomousAgent with a workspace directory
- Workspace files (
AGENTS.md,skills/folder_organization/SKILL.md) that define how the agent classifies and moves files
tree, plans a structure, moves files, and writes a log — entirely on its own.
Project Structure
Environment Variables
Installation
Usage
- Drop your files into
workspace/unorganized_folder/ - Run the agent:
How It Works
| Step | What happens |
|---|---|
| Survey | Agent runs tree on the target folder to map all files |
| Classify | Groups files by semantic category using name, extension, and context |
| Move | Executes all moves into the new structure |
| Log | Writes REORGANIZATION_LOG.md with every original path → new path move |
The agent never deletes files — only moves them. Duplicates are kept together, not resolved.
Complete Implementation
main.py
Workspace: SKILL.md
The agent’s behavior is fully defined inworkspace/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

