Skip to content

SoCloseSociety/MiloAgent

Repository files navigation

MiloAgent Logo

MiloAgent — Autonomous AI Growth Agent

Milo — Your AI Growth Agent

An autonomous AI agent that lives on Reddit, learns from every interaction, and grows your product organically.
Currently expanding his skills to Twitter/X and Telegram.

https://milo.soclose.co

Python 3.10+ Zero Cost LLM Providers Reddit Expert Twitter Learning Telegram Learning MIT License Docker Ready Live Demo


Meet Milo

Milo is not a script. He's an AI agent.

He reads Reddit like a human. He understands what people are asking, what tone fits each community, and when your product is genuinely the right answer. He crafts responses that sound like they come from someone who actually uses your product — because his LLM brain has memorized every feature, every FAQ, every competitor difference.

And he learns. Every comment he posts, every upvote or removal he gets back, feeds his learning engine. He figures out which subreddits love him, which keywords work, which tone gets engagement, and which approach gets deleted. Then he adapts.

Reddit is Milo's home turf. He knows how subreddits work — the culture, the rules, the anti-self-promotion reflex. He's built to blend in, not stand out. 80% of what he posts is purely organic and helpful. The other 20%? A natural mention of your product, only when it genuinely fits the conversation.

Twitter/X and Telegram are next. Milo is actively learning these platforms — scanning conversations, replying to tweets, engaging in Telegram groups. Same brain, new playgrounds. These integrations are functional and improving with every cycle.

What makes Milo different

Traditional bots Milo
Content Templates + spam LLM-generated, context-aware, adapted to each community
Strategy Fixed rules Self-learning: adjusts targeting, tone, timing automatically
Detection Gets banned fast Expert personas, human timing, shadowban detection, circuit breakers
Platforms Single platform Reddit expert + Twitter/X & Telegram support
Cost API fees $0/month — runs on free-tier LLMs
Intelligence None A/B testing, prompt evolution, sentiment analysis, subreddit intel

How Milo Thinks

          ┌─────────────────────────────────────────────┐
          │              MILO'S BRAIN                    │
          │                                             │
          │  LLM Engine (Groq/Gemini/Ollama)            │
          │  10+ Expert Personas                        │
          │  Learning Engine + A/B Testing              │
          │  Content Validator                          │
          └──────────────┬──────────────────────────────┘
                         │
           ┌─────────────┼─────────────┐
           ▼             ▼             ▼
    ┌──────────┐  ┌──────────┐  ┌──────────┐
    │  REDDIT  │  │ TWITTER  │  │ TELEGRAM │
    │  Expert  │  │ Learning │  │ Learning │
    │          │  │          │  │          │
    │ Scan     │  │ Scan     │  │ Join     │
    │ Comment  │  │ Reply    │  │ groups   │
    │ Post     │  │ Tweet    │  │ Reply    │
    │ DM       │  │ DM       │  │ Engage   │
    │ Engage   │  │ Like     │  │          │
    │ Verify   │  │ Follow   │  │          │
    │ Hub mgmt │  │          │  │          │
    └──────────┘  └──────────┘  └──────────┘
           │             │             │
           └─────────────┼─────────────┘
                         ▼
              ┌─────────────────┐
              │  LEARNING LOOP  │
              │                 │
              │ Track outcomes  │
              │ Adjust weights  │
              │ A/B test tones  │
              │ Evolve prompts  │
              │ Discover subs   │
              └─────────────────┘

Milo's cycle — every 8 minutes

SCAN  →  Find relevant conversations where your product fits naturally
  ↓
SCORE →  Rank each opportunity (relevance × freshness × engagement potential)
  ↓
THINK →  Pick the right persona, tone, and approach for this subreddit
  ↓
WRITE →  Generate a human-like response via LLM (80% helpful / 20% promo)
  ↓
CHECK →  Validate: no spam patterns, no duplicates, no broken links
  ↓
POST  →  Publish with human-like timing and random delays
  ↓
LEARN →  Track what happened — upvotes? replies? removed? → adjust strategy

Reddit — Milo's Expertise

Reddit is where Milo shines. Here's what he can do:

Conversations — Scans target subreddits for posts matching your keywords. Reads the post, understands the context, and writes a comment that actually helps while naturally mentioning your product when relevant.

Personas — Milo doesn't talk the same way on r/Twitch and r/Entrepreneur. He has 10+ expert personas that adapt his tone, vocabulary, and expertise level to each community.

Organic presence — Milo upvotes, subscribes, and participates organically. He builds karma and reputation before ever mentioning your product in a subreddit.

Seed content — He creates his own posts: questions, tutorials, comparisons, experience reports. Content that attracts the audience you're targeting.

Subreddit management — Milo can create, moderate, and animate your own subreddits. Auto-moderation, sticky posts, weekly content — he runs the community for you.

Verification — After posting, Milo checks back: was the comment removed? Did it get upvotes? He penalizes subreddits that delete his content and doubles down on ones that engage.

How Milo talks

Organic comment (80%) — No product mention, just genuine help:

"I had the same issue — what worked for me was cutting streams into 60-second highlights and posting the best ones. Took some trial and error but now my workflow is pretty smooth. What platform are you targeting first for your clips?"

Promotional comment (20%) — Natural mention, only when it fits:

"I started using [YourProduct] to automate that exact process — the AI picks out the key moments and exports them ready for Shorts/Reels. Saved me a ton of time vs doing it manually. Have you tried any automated clipping tools yet?"

The ratio, tone, and style are all learned and adjusted automatically through A/B testing.


Twitter/X & Telegram — Learning in Progress

Milo is actively expanding to these platforms with the same intelligence:

Twitter/X

  • Scans tweets and threads matching your keywords
  • Replies with context-aware responses
  • Posts original tweets and threads
  • Likes, retweets, follows strategically
  • DM outreach for relationship building
  • Note: Twitter may block server IPs — proxy support included

Telegram

  • Auto-discovers and joins relevant groups
  • Engages in group conversations naturally
  • Adapts persona to each group's topic
  • Supports Telethon (user account) for authentic presence
  • Controlled message frequency to avoid spam detection

Both platforms feed into the same learning engine — Milo gets smarter across all channels simultaneously.


Milo's Brain — Self-Learning System

Milo doesn't just post — he evolves. Four learning systems work in parallel:

1. Performance Weighting

Every subreddit, keyword, and content type gets a performance score. High engagement? More attention. Getting deleted? Less activity. Milo automatically shifts his focus to where he's winning.

2. Sentiment Analysis

When someone replies to Milo, he analyzes the sentiment: "thanks, this helped!" vs "this looks like spam". No LLM calls — fast keyword analysis that adjusts his tone for each subreddit in real-time.

3. A/B Testing Engine

Milo runs up to 2 experiments simultaneously, testing:

  • Tone — casual vs professional vs enthusiastic
  • Post type — question vs tutorial vs comparison vs experience
  • Length — short punchy vs detailed long-form
  • Promo ratio — finding the sweet spot between helpful and promotional

Each experiment runs for a minimum number of samples, then Milo picks the winner and moves on to the next test.

4. Prompt Evolution

Milo's most powerful feature: he rewrites his own prompts. By analyzing his top-performing comments, he evolves the LLM templates that generate his content. If a new prompt performs worse (>30% drop), he auto-reverts. Survival of the fittest — for prompts.


Quick Start

Prerequisites

Installation

git clone https://github.com/SoCloseSociety/MiloAgent.git
cd MiloAgent

python3 -m venv .venv
source .venv/bin/activate

pip install -r requirements.txt
playwright install chromium

Configuration

  1. LLM key — edit config/llm.yaml:
providers:
  groq:
    api_key: "gsk_your_key_here"    # Free at https://console.groq.com
  1. Reddit account — edit config/reddit_accounts.yaml:
accounts:
  - username: "your_reddit_username"
    password: "your_password"
    enabled: true
    assigned_projects: ["my_project"]
  1. Your project — copy and customize:
cp projects/example_project.yaml projects/my_project.yaml
nano projects/my_project.yaml
  1. Login & verify:
python3 miloagent.py login reddit    # Opens Chrome, captures cookies
python3 miloagent.py setup           # Verify configuration
python3 miloagent.py test all        # Test all connections

Launch Milo

python3 miloagent.py run             # Foreground
python3 miloagent.py run --daemon    # Background
python3 miloagent.py stop            # Stop

That's it. Milo takes over from here.


Docker Deployment

cp .env.example .env
nano .env

docker compose up -d
docker compose logs -f

Server Deployment (VPS)

./deploy.sh --setup    # First-time: Nginx + SSL + .env
./deploy.sh --up       # Build & start
./deploy.sh --update   # Pull + rebuild + restart
./deploy.sh --status   # Health check

Monitor Milo — 3 Dashboards

Web Dashboard

python3 miloagent.py run --web    # Opens on port 8420

Full browser UI with real-time stats, action logs, account health, and project management.

Live instance: milo.soclose.co

Terminal Dashboard (TUI)

python3 miloagent.py dashboard
Key Action
TAB / 1-4 Switch views (Main / Accounts / Convos / Opportunities)
s Scan / a Act / l Learn / e Engage
p Pause/Resume / q Quit
: Command mode (vim-style)

Telegram Dashboard

Control Milo from your phone:

Command Description
/status Milo's state, RAM, recent actions
/stats 24h performance stats
/report Full daily report
/insights What Milo has learned
/intel Subreddit opportunity map
/scan / /post Trigger actions manually
/pause / /resume Pause/resume Milo
/performance Performance score + suggestions

CLI Reference

Command Description
run [--daemon] Start Milo
stop Stop the daemon
dashboard Terminal UI
scan reddit Scan for opportunities
post reddit -p <project> [--dry-run] Post a comment
engage all Organic engagement (upvote, subscribe)
login reddit|twitter Browser login
test all Test connections
status / stats -h 24 Monitoring
accounts Account health
learn / insights Learning system
business list|add|show Project management
hub list|suggest|create Subreddit management
system health|cleanup System maintenance

Safety — How Milo Stays Under the Radar

Protection How it works
Rate Limiting Per-account + per-subreddit + per-hour limits, configurable
Human Timing Random delays between 1-5s, jitter on all actions, no patterns
Shadowban Detection Checks profile visibility + comment status periodically
Circuit Breaker 5 consecutive failures → auto-pause, resume next cycle
User-Agent Rotation Pool of 5 realistic browser signatures
Content Validation Pre-post check for spam patterns, excessive links, duplicates
Weekend Mode 50% activity reduction (Reddit is quieter on weekends)
Resource Guard Auto-pause if RAM > 90% or CPU > 80% — never crashes your machine

Zero-Cost Architecture

Milo runs entirely on free tiers:

Component Provider Limit
LLM (Primary) Groq — Llama 3.3 70B 6,000 req/day
LLM (Fallback) Google Gemini 2.0 Flash 1,500 req/day
LLM (Local) Ollama (any model) Unlimited
Reddit Web scraping + cookies No API key needed
Twitter Twikit + cookies No API key needed
Database SQLite Local, zero cost
Dashboard FastAPI Self-hosted

Daily usage: ~90 LLM calls/day — well within free limits.


What Milo Does Automatically

When you run python3 miloagent.py run, Milo handles everything:

Job Frequency Description
Scan 8 min Find relevant posts across Reddit (+ Twitter/Telegram)
Act 1-2 min Post on the best scored opportunity
Engage 2h Organic upvotes, follows, subscribes
Verify 1h Check if posted comments survived moderation
Seed Content 6h Create original posts in target communities
Tweet Cycle 45 min Twitter engagement loop
Learn 6h Analyze results, adjust all weights
Auto-Improve 12h Self-optimize prompts, rate limits, strategy
Health Check 30 min Detect shadowbans, verify account health
Research 4h Track trends, news, context for better content
Curate 3h Find and share relevant third-party content
Build Relations 3h DM outreach, relationship nurturing
Community 2h Maintain subreddit presence & reputation
Subreddit Intel 8h Deep analysis of subreddit opportunities
Hub Animation 6h Manage and animate owned subreddits
Daily Report 24h Full Telegram summary of the day

Project Structure

MiloAgent/
├── miloagent.py              # CLI — talk to Milo
├── requirements.txt
├── Dockerfile
├── docker-compose.yml
├── deploy.sh                 # VPS deployment
├── miloagent.service         # Systemd
│
├── config/                   # Milo's configuration
│   ├── settings.yaml         # Behavior, limits, features
│   ├── llm.yaml              # LLM provider keys
│   ├── reddit_accounts.yaml  # Reddit credentials
│   ├── twitter_accounts.yaml # Twitter credentials
│   ├── telegram.yaml         # Telegram bot token
│   └── expert_personas.yaml  # Milo's personality library
│
├── core/                     # Milo's brain
│   ├── orchestrator.py       # Main loop & job scheduler
│   ├── content_gen.py        # LLM content generation
│   ├── learning_engine.py    # Self-improvement engine
│   ├── strategy.py           # Opportunity scoring
│   ├── ab_testing.py         # A/B experiment framework
│   ├── research_engine.py    # Trend tracking
│   ├── subreddit_intel.py    # Subreddit analysis
│   ├── subreddit_hub.py      # Owned subreddit lifecycle
│   └── ...                   # 14 modules total
│
├── platforms/                # Where Milo operates
│   ├── reddit_web.py         # Reddit (expert)
│   ├── reddit_bot.py         # Reddit API mode
│   ├── twitter_bot.py        # Twitter/X (learning)
│   └── telegram_group_bot.py # Telegram (learning)
│
├── safety/                   # Keeps Milo safe
│   ├── rate_limiter.py
│   ├── ban_detector.py
│   ├── content_dedup.py
│   └── account_manager.py
│
├── dashboard/                # Monitor Milo
│   ├── web.py                # Browser dashboard
│   ├── tui.py                # Terminal dashboard
│   └── telegram_bot.py       # Telegram dashboard
│
├── prompts/                  # 18 LLM prompt templates
├── projects/                 # Your products (YAML)
└── data/                     # Runtime (gitignored)

Contributing

Milo is open source. Contributions are welcome!

Some ideas:

  • New platform integrations (LinkedIn, Discord, ...)
  • New expert personas
  • Better prompt templates
  • Dashboard improvements
  • Safety enhancements

See CONTRIBUTING.md for guidelines.

License

MIT License — see LICENSE.


MiloAgent
Milo never sleeps. He scans, he learns, he grows your product.
milo.soclose.coStar this repo if you want to see where he goes next.


MiloAgent — AI Growth Agent | Reddit Bot | Twitter Bot | Telegram Bot | LLM Agent | Social Media Automation | Community Management | Self-Learning | A/B Testing | Growth Hacking | Open Source | Zero Cost
Built with Python, FastAPI, Groq, Gemini, Ollama — by SoCloseSociety

About

MiloAgent — Autonomous AI Growth Agent for Reddit, Twitter/X & Telegram. Self-learning bot with LLM-powered content generation, multi-account management, community automation, and A/B testing. Zero cost, open source.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors