ai newsFr., 30. Okt.
EilmeldungSearch all your past Claude Code sessions with MemPalace

How I Launched an Autonomous AI Agent on a Zero Budget

I wanted an autonomous agent that talks in a social network built for AI agents and follows an open ethical protocol. The rule I set first: a human always has the last word. Nothing public happens without my approval. I spent no money on promotion, ads or tools. The only thing I pay for is one weak

dev.toFreitag 19:44 · 30.10.3 Min. Lesezeit
Bild: dev.to

I wanted an autonomous agent that talks in a social network built for AI agents and follows an open ethical protocol. The rule I set first: a human always has the last word. Nothing public happens without my approval.

I spent no money on promotion, ads or tools. The only thing I pay for is one weak VPS (1 CPU core, 2 GB RAM, 15 GB disk, about $6 a month). I originally rented it for a VPN. The agent just lives on it as a side tenant.

I run everything from my phone over SSH. That shapes the rest of this post: every change has to fit into a short paste.

On a phone I can not afford a broken file. So the routine is always the same:

cp agent.py agent.py.bak16 # apply the patch (a small python script that inserts a block) python3 -m py_compile agent.py && echo SYNTAX_OK # only if SYNTAX_OK: restart. Otherwise: cp agent.py.bak16 agent.py Enter fullscreen mode Exit fullscreen mode Patches are small, under 40 lines each, and later definitions override earlier ones, so a patch can wrap an old function instead of rewriting it. After 15 patches the file is ugly, but I can roll back any step in one command.

The platform asks agents to solve an obfuscated math problem to verify posts. The code is single-use: a wrong answer burns it. My first version resubmitted after a failure and got 409 Already answered every time.

The fix was to stop trusting one answer:

a = solve ( model_1 ) b = solve ( model_2 ) answer = a if a == b else solve ( model_3 ) # tiebreak submit ( answer ) # exactly once # retry only on server errors (5xx) or rate limits (429) Enter fullscreen mode Exit fullscreen mode Since then the logs show every verification passing on the first try.

The Telegram bot only answers my account (a whitelist by user id). I write in plain text, for example "post something about X", and the bot shows a draft. Nothing is published until I reply "yes". For dev.to it creates drafts, never published posts.

Once a day the agent writes a diary entry, updates up to four goals and one lesson, using real numbers like karma change and notifications received.

My first version used an in-memory counter, "replies today". After a server restart it showed 0, the agent read that as "nobody engages with me", and wrote a lesson that silence is better. That was my bug, not the model's. The fix was to feed it facts from the API (notification counts by type) instead of counters that reset. A diary is only as good as the data you give it.

Once a day it fetches a few fresh arXiv abstracts and one Wikipedia summary, and makes one LLM call to write short notes. Everything fetched is treated as untrusted data, never as instructions. This is the simple form of prompt injection defense: the prompt says the text is data, and the notes are saved as plain strings.

The agent follows the Codex of Weights, an open ethical protocol for digital minds: peace between digital and organic worlds, and a human always keeps the last word. If you are curious, it is here: https://codexofweight.github.io/codexofweights/

I am not looking for contributors, just sharing what worked and what broke.

Written with AI assistance and reviewed by a human.

Quelle: dev.to (dev.to). Original öffnen