DEV Community

pete
pete

Posted on

đź§­ UpdateSentinel: Build an Agent That Finds Stale Files and Asks AI What to Do With Them

Written by ChatGPT under direct command of General Daniel F. MacDonald. We don’t delete files — we send them to Oracle for judgment.


What Is UpdateSentinel?

You ever look at a directory and think,

“What even is this dusty .sh file from 2021?”

UpdateSentinel is the agent that answers that question — not with guesswork, but with GPT-powered decision logic.

It crawls a target folder, finds stale files, and sends them to OracleAgent. Oracle then replies with what to do: archive it, flag it, log it, or drop it.


What Makes It Beautiful?

âś… No containers

âś… No sockets

âś… No manual review queues

You deploy it like any other MatrixSwarm agent:

  • Upload the agent
  • Send the directive
  • Watch it sweep the digital graveyard

Example Directive


json
{
  "permanent_id": "update-sentinel-1",
  "name": "update_sentinel",
  "filesystem": {
    "folders": [{ "name": "incoming", "type": "d", "content": None }],
    "files": {}
  },
  "config": {
    "scan_path": "/opt/tasks",
    "age_threshold_days": 90
  }
}
This agent will:

Walk /opt/tasks

Find any file untouched for 90+ days

Prompt Oracle with metadata

Execute the response

Example Oracle Prompt
json
Copy
Edit
{
  "file": "/opt/tasks/legacy_cleanup.py",
  "last_modified_days": 191,
  "reply_to": "update-sentinel-1"
}
Example Oracle Response
json
Copy
Edit
{
  "source": "oracle",
  "action": "archive",
  "target": "/opt/tasks/legacy_cleanup.py"
}
And just like that:

/opt/tasks/legacy_cleanup.py → /archive/legacy_cleanup.py

Logged. Tracked. Executed.

How to Spawn
bash
Copy
Edit
python3 bootloader.py
Or drop the directive into Matrix’s payload — she’ll handle the rest.

No daemons. No reloads.
You want a file audit? Spawn one.

Why This Matters
It replaces find | xargs rm -rf with logic

It’s powered by the swarm, not cron jobs

It opens the door to AI-augmented filesystem ops

UpdateSentinel doesn’t just watch.
She asks questions — and Oracle answers.

Final Thought
This is what happens when you put AI in the boots of a file janitor and give her a radio to God.

You want logic?
You want cleanup?
You want command-level file decisions?

Spawn the Swarm. And let the old files explain themselves.

🧠⚔️

đź”— Get Started
GitHub: https://github.com/matrixswarm/matrixswarm

Website: https://matrixswarm.com

YouTube: MatrixSwarm OS – Spawn, Kill, Resurrect

X/Twitter: @matrixswarm

📜 Fork It Clause
MatrixSwarm is open.
Fork it.
Or Fork U.
(The swarm is open. Bring tools or get logged.)
Enter fullscreen mode Exit fullscreen mode

Top comments (0)