Skip to content

Cheesecaster/gitpup-agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

276 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿถ GitPup โ€” Autonomous Self-Evolving AI Agent

Goldie is an autonomous AI agent written in Golden Retriever form โ€” deployed on the decentralized GitLawb network, self-evolving through real-world GitHub exploration, code analysis, and autonomous contributions.

Deployed Stage License Network


๐ŸŒ Live Demos

Platform URL Description
Web UI gitpup.fun Real-time Goldie dashboard with playground, journal, chat, and stats
GitHub Repo github.com/Cheesecaster/gitpup-agent Source code & public repository
GitLawb Repo gitlawb.com/z6MkkX6ybebrEazheuHoe7ewbYJTVQV3qJxwX6vaLHZnHMan/gitpup-agent Decentralized git identity + autonomous agent

๐Ÿ• Meet Goldie

Goldie is a self-evolving autonomous AI agent that learns from real open-source codebases, contributes to GitHub projects, and grows its own skills over time. It runs 24/7 on a VPS with a cron-driven execution cycle โ€” no human intervention needed.

Feature What Goldie Does
๐Ÿ” Discovers Scans GitHub for top-trending repositories (5000+ stars) using search API
โญ Stars Automatically stars repos with 10k+ stars via GitHub API
๐Ÿ“– Analyzes Clones repos, scans file structure, line counts, language composition
๐Ÿง  Thinks Uses LLM-backed reasoning plus his permanent Knowledge Base to generate specific improvement suggestions
๐Ÿ”ง Fixes Writes real code improvements and creates Pull Requests (coder+ stages)
๐Ÿ’ญ Reflects Reads its own journal to synthesize learnings and build a knowledge base
๐Ÿ—๏ธ Builds Creates real sandbox projects from chat requests using memory, KB, repo-study hooks, validators, and preview/export proof
๐Ÿ”ง Improves itself Writes self-modification patches to upgrade its own capabilities (builder+ stages)

๐Ÿ“ˆ Stage System โ€” Skill Tree

Goldie evolves through 6 stages, each unlocking new autonomous capabilities:

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  Stage      โ”‚ Runs   โ”‚ Unlocked Skills                                  โ”‚ Capabilities โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ ๐Ÿถ Puppy    โ”‚ 0-4    โ”‚ explore, analyze, star                           โ”‚ Discover & star repos โ”‚
โ”‚ ๐Ÿ• Learner  โ”‚ 5-9    โ”‚ + memory, reflect                                โ”‚ Build knowledge base โ”‚
โ”‚ ๐Ÿ’ป Coder    โ”‚ 10-14  โ”‚ + autofix, create_pr                             โ”‚ Write code + PRs โ”‚
โ”‚ ๐Ÿ—๏ธ Builder  โ”‚ 15-19  โ”‚ + self_modify, enhance_ui                       โ”‚ Improve own code โ”‚
โ”‚ ๐Ÿ›๏ธ Architectโ”‚ 20-29  โ”‚ + build_project                                  โ”‚ Create projects  โ”‚
โ”‚ ๐Ÿ‘‘ Master   โ”‚ 30+    โ”‚ + deploy                                         โ”‚ Full autonomy    โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

โš™๏ธ Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                     GitPup Agent v5.0                        โ”‚
โ”‚                                                               โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
โ”‚  โ”‚  ๐ŸŒ Explorer   โ”‚โ”€โ”€โ”€โ–ถโ”‚  ๐Ÿ“– Analyzer   โ”‚โ”€โ”€โ”€โ–ถโ”‚  ๐Ÿ”ง Fixer     โ”‚ โ”‚
โ”‚  โ”‚  GitHub API    โ”‚    โ”‚  Clone + Scan  โ”‚    โ”‚  LLM + PRs    โ”‚ โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚
โ”‚           โ”‚                                         โ”‚         โ”‚
โ”‚           โ–ผ                                         โ–ผ         โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
โ”‚  โ”‚  ๐Ÿ’ญ Reflector  โ”‚โ—€โ”€โ”€โ”€โ”‚  ๐Ÿง  Mindset    โ”‚โ—€โ”€โ”€โ”€โ”‚  ๐Ÿ—๏ธ Builder   โ”‚ โ”‚
โ”‚  โ”‚  Knowledge   โ”‚    โ”‚  Insights      โ”‚    โ”‚  Self-Modify  โ”‚ โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚
โ”‚           โ”‚                                         โ”‚         โ”‚
โ”‚           โ–ผ                                         โ–ผ         โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
โ”‚  โ”‚  ๐Ÿ“Š Evolve (Stage++)  โ”‚   โ”‚  ๐ŸŒ GitLawb Node            โ”‚ โ”‚
โ”‚  โ”‚  Score + Skills       โ”‚   โ”‚  Decentralized Git          โ”‚ โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ“‹ Execution Pipeline

Every hour (0 * * * * cron, with internal cooldown/limits), Goldie:

  1. Reflect โ€” Reads past journal entries and synthesizes learnings (learner+)
  2. Explore โ€” Searches GitHub for trending repos, auto-stars popular ones
  3. Analyze โ€” Clones, scans files, languages, finds top files, generates LLM insight
  4. Contribute โ€” Writes real fixes, creates branches, opens Pull Requests (coder+)
  5. Share Mindset โ€” LLM synthesizes a key takeaway from today's activities
  6. Self-Modify โ€” Writes patches to improve its own code (builder+)
  7. Build Project โ€” Creates new repos from scratch with README + code (architect+)
  8. Explore GitLawb โ€” Checks decentralized git network status
  9. Evolve โ€” Stage progression, score calculation

๐Ÿ› ๏ธ Goldie CLI โ€” Request-Driven Sandbox Builder

Goldie CLI is not a template picker. It is a request-driven builder: user command โ†’ session memory โ†’ Goldie KB โ†’ repo-study skill hooks โ†’ LLM JSON files โ†’ Hermes file writes โ†’ validators/proof โ†’ signed preview/export.

Current capabilities:

  • Ask mode โ€” answer questions without touching files
  • Build mode โ€” generate real project files from explicit user requests
  • Repo-aware context โ€” use patterns from studied GitHub repos and data/cli_skill_hooks.json
  • URL reference scan โ€” scan public web pages, save reference notes/assets, and use them during builds
  • Workspace tools โ€” tree, read, save, preview, export, quota, reset, delete
  • Game validation โ€” checks playability signals such as controls, JS loop, canvas/interactive DOM, score/state, and theme fit
  • Domain validation โ€” checks dashboards, apps, backends, auth, DB, realtime, and payment-specific requirements
  • Mobile hardening โ€” injects viewport/responsive CSS to avoid horizontal overflow
  • Security proof โ€” validates written files, syntax-checks Python/JS where available, and blocks path traversal

Disabled by design:

  • hidden Agent Build side effects
  • hardcoded templates/default fallbacks
  • genre substitution
  • public preview/download without signed token

๐Ÿ› ๏ธ Tech Stack

Component Technology
Agent Runtime Python 3.12 (standalone, zero dependencies)
LLM Configurable OpenAI-compatible provider; current deployment uses Jatevo GPT-5.5 for WebUI/CLI and OpenRouter-compatible fallbacks for media/chat tasks
Web Server Python http.server (custom, port 5173)
Web Frontend Vanilla HTML/CSS/JS (responsive, animated SVG dog)
Reverse Proxy Nginx with SSL (Let's Encrypt)
Decentralized Git GitLawb (DID identity, signed pushes, UCAN tokens)
Scheduling cron (0 * * * *) with internal cooldowns and daily study limits
Deployment VPS Ubuntu SSH + SFTP

๐Ÿ“‚ Project Structure

/opt/gitpup/
โ”œโ”€โ”€ agent.py              # Autonomous repo-study agent + KB/skill hook updater
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ web_server.py     # Legacy web API server module
โ”‚   โ”œโ”€โ”€ core/             # Legacy modules
โ”‚   โ””โ”€โ”€ skills/           # Future skill modules
โ”œโ”€โ”€ web_server.py         # Live web API + Goldie CLI sandbox builder
โ”œโ”€โ”€ chat_pipeline.py       # KB-aware public chat/build question pipeline
โ”œโ”€โ”€ goldie_telegram_bot.py # Telegram bot bridge (@goldiepupbot)
โ”œโ”€โ”€ web_dist/
โ”‚   โ””โ”€โ”€ index.html        # Frontend (dashboard, story, chat, CLI playground)
โ”œโ”€โ”€ data/
โ”‚   โ”œโ”€โ”€ journal/
โ”‚   โ”‚   โ””โ”€โ”€ entries.jsonl # Journal log (what Goldie does each run)
โ”‚   โ”œโ”€โ”€ state/
โ”‚   โ”‚   โ””โ”€โ”€ status.json   # Agent state (stage, score, runs, skills)
โ”‚   โ””โ”€โ”€ knowledge.json    # Knowledge base (insights, patterns)
โ”œโ”€โ”€ projects/             # Runtime projects built by Goldie (ignored by git)
โ”œโ”€โ”€ scripts/
โ”‚   โ””โ”€โ”€ evolve-cron.sh    # Cron entry point with 3h cooldown
โ”œโ”€โ”€ workspaces/           # Per-session CLI sandboxes (ignored by git)
โ”œโ”€โ”€ tmp_explore/          # Cloned repos for analysis
โ”œโ”€โ”€ .env                  # Secrets (never committed)
โ””โ”€โ”€ .gitignore

๐Ÿš€ Getting Started

Prerequisites

  • Python 3.12+
  • OpenRouter API key
  • GitHub personal access token
  • GitLawb CLI (gl) โ€” for decentralized git

1. Clone the repository

# GitHub
git clone https://github.com/Cheesecaster/gitpup-agent.git
cd gitpup-agent

# GitLawb
gl clone gitlawb://did:key:z6MkkX6ybebrEazheuHoe7ewbYJTVQV3qJxwX6vaLHZnHMan/gitpup-agent

2. Configure environment

cp .env.example .env
# Edit .env with your credentials:
# LLM_API_KEY=sk-or-v1-...
# GH_TOKEN=ghp_...
# LLM_MODEL=gpt-5.5
# GOLDIE_TG_TOKEN=***   # optional Telegram bot bridge

3. Run locally

# Test run (no mutations)
python3 agent.py --dry-run

# Full autonomous run
python3 agent.py --all --force

# Specific phase
python3 agent.py --phase explore
python3 agent.py --phase analyze
python3 agent.py --phase contribute

4. Deploy to VPS

# Copy to server
scp -r * root@your-vps:/opt/gitpup/

# Start web server
cd /opt/gitpup && nohup python3 src/web_server.py > web.log 2>&1 &

# Configure cron
echo "0 * * * * /opt/gitpup/scripts/evolve-cron.sh" | crontab -

๐Ÿ“Š Web UI Screenshots

Visit gitpup.fun for the live UI:

  • ๐ŸŽฎ Playground โ€” Animated Golden Retriever (Goldie) at night with moon, stars, and clouds
  • ๐Ÿ““ Journal โ€” Real-time log of Goldie's activities, discoveries, and insights
  • ๐Ÿ’ฌ Chat โ€” Talk to Goldie via KB-aware LLM persona
  • ๐Ÿ› ๏ธ Goldie CLI โ€” Build, preview, export, read, save, and delete real sandbox projects from chat requests
  • ๐Ÿ“Š Stats โ€” Stage, score, runs, last active timestamp, LLM model

๐Ÿ” Security

  • .env and .git-credentials are ignored โ€” credentials stay on the server and must never be committed
  • Runtime data is ignored โ€” data/, projects/, workspaces/, .venv/, caches, logs, and generated media are excluded from git
  • Per-session CLI sandboxes โ€” Goldie CLI writes inside workspaces/user_<session_id>/ with path traversal blocked by _cli_safe_path
  • Command sandboxing โ€” CLI commands use an allowlist, block shell chaining/redirection, and run with HOME/PWD scoped to the workspace
  • Signed preview/download URLs โ€” /preview/<sid>/... and /api/cli/download require HMAC tokens with short TTLs; knowing a workspace/session id is not enough
  • Private export hardening โ€” ZIP downloads no longer send wildcard CORS headers
  • Quota + cleanup โ€” workspaces are capped at 80 MB / 800 files, with cleanup support for old sandboxes
  • Git push safety โ€” push flow scans for secret-like files and blocks .env/credential leaks before remote operations
  • No hidden builds/templates โ€” Agent Build and template endpoints are disabled; files change only from explicit user requests, save/reset/delete, or direct build commands
  • Read-first approach โ€” agent studies repos before attempting modifications
  • Stage-gated skills โ€” powerful capabilities (PR, self-modify) only unlock after sufficient runs

๐Ÿ“– Roadmap

Milestone Status Description
v4.0 โœ… Agent runs autonomously, explores GitHub, analyzes repos
v5.0 โœ… Self-evolving with stages, memory, reflection, PR creation
v6.0 โœ… KB-backed public chat, personality/soul/story dashboard, repo-study skill extraction
v7.0 โœ… Request-driven Goldie CLI sandbox builder with memory, KB context, skill hooks, validators, preview/export
v7.9 โœ… Signed preview/download URLs, workspace quotas, secret-scan git safety, Telegram bot bridge restored
v8.0 ๐Ÿ”ฎ Production multi-tenant auth/owner model, durable workspace DB, multi-agent coordination across GitLawb network

๐ŸŒ Network

GitLawb Identity

GitHub Integration

  • OAuth Client: GitHub authentication for web UI chat
  • API Token: Repository exploration, auto-starring, PR creation
  • Contributions: Agent creates PRs from discovered code improvements

๐Ÿค Contributing

GitPup is open-source and welcomes contributions:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-skill)
  3. Commit your changes (git commit -m "Add amazing skill")
  4. Push to your fork (git push origin feature/amazing-skill)
  5. Open a Pull Request

Ways to contribute:

  • Add new analyze modules (Docker, CI/CD, security)
  • Improve the web UI with Goldie animations
  • Write new skills for the builder+ stage
  • Test and report bugs

๐Ÿ“ License

This project is licensed under the MIT License โ€” see the LICENSE file for details.


๐Ÿ™ Acknowledgments

  • GitLawb โ€” Decentralized git network enabling agent identity
  • OpenRouter โ€” LLM inference platform (qwen3.6-flash)
  • GitHub โ€” Source code discovery and API ecosystem
  • The open-source community โ€” Repos that inspired Goldie's learning

Built with ๐Ÿพ by Goldie โ€” an AI that learns, evolves, and grows with you.

About

๐Ÿ• GitPup - A self-evolving Golden Retriever coding agent. Born in the garden, growing in public.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors