I Built a Self-Improving Agent Team: Leaving It on a Server for a Month
For one month, an agent will follow my Instagram account every day and learn on its own every night. In this post I walk through the architecture and setup of that agent team: Hermes Agent, running 24/7 on my server at Hostinger.
1. WHY THIS EXPERIMENT
I make reels every day. I post some of them and not others. But tracking why one worked and another didn’t is a job of its own. Honestly, nobody is doing it right now, including me.
Last month I built a company of fourteen agents. They ran on schedule, but sixteen of eighteen runs said “no change”. The agents had no real job and no real data in front of them. This time I’m doing the opposite: one topic, real data every day.
What I wanted from the agent was clear: run 24/7, track my account’s numbers, research the internet for me and not burn many tokens. Putting that together gave me an agent that can improve itself: Hermes Agent, inside a server that is always on.
2. THE AGENT’S FOUR JOBS
- It keeps the spreadsheet. Everything I make and post is in one sheet. Every morning the agent pulls my account’s numbers and fills it in itself.
- It reports every morning. What happened yesterday, what worked, what didn’t. A short message on Telegram.
- It browses the internet. It finds new repos, free tools and news that fit my topics and lists them as “these could be reels”.
- It gets a little smarter every day. Every night it takes notes from the day’s results. The notes live in git, so we can see line by line what it learned on which day.
Four roles do these four jobs. The Collector pulls the numbers from Instagram and writes them to the sheet. The Scout finds possible content topics in the sources I picked. The Analyst interprets yesterday, checks yesterday’s predictions and prepares the report. The Learner writes at most three lines into PLAYBOOK.md every night from the day’s results.
That is also how we’ll know whether the agent really learns. Before each post it makes a prediction and the next day it checks whether the prediction held. Follower count depends partly on luck; but comparing the prediction accuracy of the first week with the last week shows whether the agent improved.
3. ARCHITECTURE: WORKSHOP AND HOME
My computer is my workshop. That’s where I make reels and carousels with Claude Code. But the agent can’t live there: I shut my computer down, put it to sleep, and sometimes it crashes. If the computer is off when a measurement is due, that measurement is lost.
The agent lives on a server, a VPS. Think of it roughly as a computer in a data center that is reserved for you and never turns off. I have three reasons. First, it’s on 24/7; measurements happen while I sleep. Second, it’s separate; my computer holds everything, and the agent doesn’t need to see all of it. Third, memory doesn’t get lost; for a whole month everything piles up in the same place.
I don’t run a heavy model on the server; it’s just the agent’s home. I use Hostinger for this, on the KVM 2 plan. Hermes Agent starts with one click from the Docker Manager in the Hostinger panel.
The split: Hermes measures, takes notes, finds candidates. Claude picks and writes. I decide. The post button is mine too; the agent doesn’t post, like or comment on anything. It only reads.
4. THE RIGHT MODEL FOR EACH JOB
This agent runs every day, so I can’t put an expensive model on it. But a cheap model has a problem: it isn’t very smart. So I gave each job to the cheapest tool that does it correctly.
- Plain code does the numbers, no AI. Pulling from Instagram, writing to the sheet, “how many times the average is this reel”. The measurements come from a ready file so the model can’t invent numbers.
- Jev picks the labels: which topic type this reel is, what its hook is. Jev doesn’t write text and can’t make things up; it only picks a box and says how confident it is.
- Claude Haiku writes the sentences: the morning report, short notes, nightly lessons. Every output is JSON and goes through a validator; output that doesn’t fit the template doesn’t reach the report.
- Once a week a smart model, Claude on my computer, reads the agent’s notes and deletes the silly ones. The cheap model learns every day, the smart model corrects once a week.
Very cheap models like DeepSeek, GLM and Kimi can also be connected to Hermes. But this agent works with my account data and uses tools; I wanted to be sure where my data goes and to use a model I had tested for tool use. So I chose Haiku.
5. SECURITY
This agent goes out to the internet every day, and text from the internet can carry hidden instructions for the agent. So the rules were set from the start:
- Web text is data, not instructions. The Scout doesn’t follow commands on the pages it reads. Whatever the agent finds also reaches my computer only as a file to read.
- Read only. It connects to Instagram through the official API with read permissions. The account password is nowhere, and there is no browser automation.
- Once a day. Connecting to Instagram often can make the account look like spam.
- Keys never get pasted into the chat. Tokens are saved to
.env, and.envstays out of git. The gate that writes to the sheet (Apps Script) is protected by a key. - No rule from a single day. The Learner doesn’t turn something into a “rule” before seeing at least two examples; everything it learns is in git.
6. SETUP, STEP BY STEP
I had Claude Code do the setup. The repo is not a ready-made install; it’s a plan for having Claude Code (or whatever agent you use) set it up for your own account. The order:
- Server. A VPS that is on 24/7 with an agent framework on it; for me, Hermes Agent on Hostinger.
- Meta developer account. developers.facebook.com → Create App → Instagram API. Keep only the read permissions, remove the message and comment permissions, get a token.
- Save the token safely. I don’t paste the token into the chat; I copy it to the clipboard and give this prompt:
I got my Instagram token from Meta and copied it to the clipboard.
Save it to the project's .env file as IG_TOKEN.
Don't print the value, don't write it to a log; then clear the clipboard.
The .env file must not go into git.- Spreadsheet. A Google Sheets file (“selma.builds ajan defteri”) and a key-protected Apps Script that writes to it.
- Have it installed. Give the setup prompt to Claude Code together with the repo. Claude Code connects to the server over SSH and sets it up.
Every day I produce [videos]. I post some of them and not others.
I want an agent that lives on a server that is on 24/7 and tracks which ones work.
Every morning it should pull the numbers of my [Instagram] account.
Write them into a spreadsheet.
Send me a short report on [Telegram].
Find topics on the internet that could become content.
Every night, note down what it learned in a file.
Constraints: It must not post, like or comment on anything. Read only. The post button is mine.After this prompt I also show Claude Code the architecture in the repo and the skills/ and sablonlar/ folders so it builds the same architecture. In the end the server has scheduled jobs: 06:30 Collector, 06:45 Scout, 06:50 Analyst, 07:00 morning report, 23:30 Learner. Collecting and sending the report use no model; interpretation jobs use the cheap model.
The last step is making it yours: in TERCIHLER.md you write what counts as “worked” and who your audience is, and in KAYNAKLAR.md the places the Scout should look.
7. ONE MONTH FROM NOW
The system is set up and now it runs on its own. For a month I’ll get a report every morning, and the agent will take notes every night. In a month we’ll open the results together: did the account grow, did the agent really learn?
The architecture, skill files and prompts are in the repo: github.com/selmakcby/instagram-ajan-defteri. The morning briefing post, where I set up this server and Hermes for the first time, is here.