Arang.dev
Search

Creating a Self-Evolving AI Agent with OpenClaw - AlphaHunter Development Story

An experience building a system where the OpenClaw AI agent develops ideas on its own, tracks tasks with TODO.md, and receives user approval via Discord emojis. A new development pattern for collaborating with AI.

#OpenClaw#AI Agent#μžλ™ν™”#Twitter Bot#Discord
🌐 Translated

This post was machine-translated from Korean by AI. Some expressions may differ from the original.

Read the original (Korean)

Introduction

A project that started with the thought "AI will do everything for me" has transformed into an experience of real collaboration with AI.

While creating the "AlphaHunter" bot, which automatically collects and tweets crypto market conditions, I discovered three patterns:

  1. Self-Evolving Ideas - AI proposes improvements on its own
  2. Task State Management - Tracking progress with TODO.md
  3. Emoji Approval Workflow - User decision-making via Discord

In this post, I'll share how I implemented each of these.


Background: AlphaHunter Project

Goal

A bot that collects crypto market information and automatically posts insightful tweets.

Features

  • πŸ“± Real-time collection from 70+ Telegram channels
  • πŸ“° Collection of news/indicators/announcements (CoinDesk, Kimchi Premium, Fear & Greed)
  • 🧠 AI Analysis (Sentiment, Trends)
  • πŸ“Š Automatic chart generation
  • 🐦 Automatic Twitter posting (after approval)

Pattern 1: Self-Evolving Ideas

Problem

Initially, when I simply instructed it to "Collect from Telegram and tweet," the AI created only the basic features and stopped.

Solution

Made the AI think of development ideas on its own:

## λ°œμ „ 아이디어 (ROADMAP.md)
 
1. 감성 뢄석: μˆ˜μ§‘λœ μ •λ³΄μ˜ 긍/λΆ€μ • 감성 뢄석
2. νŠΈλ Œλ“œ 감지: κ°‘μžκΈ° μ–ΈκΈ‰λŸ‰ μ¦κ°€ν•˜λŠ” ν† ν”½ 감지
3. μžλ™ 차트 생성: μ‹œν™© νŠΈμœ—μ— 차트 이미지 첨뢀
4. μŠ€λ ˆλ“œ μž‘μ„±: λ³΅μž‘ν•œ 뢄석은 μŠ€λ ˆλ“œλ‘œ μž‘μ„±
5. μ˜ˆμ•½ ν¬μŠ€νŒ…: 졜적의 μ‹œκ°„λŒ€μ— μ˜ˆμ•½ κ²Œμ‹œ
6. μ„±κ³Ό νŠΈλž˜ν‚Ή: νŠΈμœ—λ³„ 쑰회수/μ’‹μ•„μš” 기둝
7. A/B ν…ŒμŠ€νŠΈ: νŠΈμœ— μŠ€νƒ€μΌλ³„ λ°˜μ‘ 비ꡐ
8. νŒ”λ‘œμ›Œ 뢄석: νŒ”λ‘œμ›Œ 증감 좔이 λͺ¨λ‹ˆν„°λ§

Result

The AI suggested 8 development ideas and implemented all of them before the session ended:

Feature File Size
Sentiment Analysis advanced_analysis.py 17KB
Trend Detection advanced_analysis.py (Included)
Chart Generation chart_generator.py 14KB
Scheduled Posting scheduler.py 17KB
Performance Tracking performance_tracker.py 21KB
Follower Analytics follower_analytics.py 15KB

Lesson

If you ask AI, "Isn't there a better way?" there really is.


Pattern 2: Task State Management with TODO.md

Problem

The AI wrote down a bunch of ideas... but stopped implementing them halfway through.

λ°œμ „ 아이디어:
- 감성 뢄석 βœ…
- νŠΈλ Œλ“œ 감지 βœ…
- μžλ™ 차트 생성 (λ―Έκ΅¬ν˜„)  ← μ—¬κΈ°μ„œ 멈좀
- μ˜ˆμ•½ ν¬μŠ€νŒ… (λ―Έκ΅¬ν˜„)
...

Solution

Track task status with a TODO.md file:

# TODO.md - νƒœμŠ€ν¬ 좔적
 
## μƒνƒœ λ²”λ‘€
- ⬜ 아이디어 (λ―Έμ‹œμž‘)
- πŸ”„ 진행쀑
- βœ… μ™„λ£Œ
- ❌ μ·¨μ†Œ/보λ₯˜
 
## 뢄석 κΈ°λŠ₯
| μƒνƒœ | κΈ°λŠ₯ | μš°μ„ μˆœμœ„ |
|------|------|----------|
| βœ… | 감성 뢄석 | P1 |
| βœ… | νŠΈλ Œλ“œ 감지 | P1 |
| ⬜ | μžλ™ 차트 생성 | P2 |
 
## λ‹€μŒ μž‘μ—… (μš°μ„ μˆœμœ„μˆœ)
1. ⬜ μžλ™ 차트 생성
2. ⬜ μ˜ˆμ•½ ν¬μŠ€νŒ…
3. ⬜ μ„±κ³Ό νŠΈλž˜ν‚Ή

Recording Lessons in MEMORY.md

## ⚠️ μ€‘μš” κ΅ν›ˆ
 
### νƒœμŠ€ν¬/아이디어 μƒνƒœ 관리 (2026-02-01)
**문제**: λ°œμ „ 아이디어λ₯Ό 기둝해놓고 κ΅¬ν˜„ν•˜λ‹€ λ§μ•˜μŒ
**ν•΄κ²°μ±…**:
- λͺ¨λ“  ν”„λ‘œμ νŠΈμ— TODO.md 생성
- 아이디어 β†’ κ³„νš β†’ 진행쀑 β†’ μ™„λ£Œ μƒνƒœ 관리
- μ„Έμ…˜ μ‹œμž‘ μ‹œ λ―Έμ™„λ£Œ νƒœμŠ€ν¬ 확인
- **μ ˆλŒ€ μ•„μ΄λ””μ–΄λ§Œ μ“°κ³  λ°©μΉ˜ν•˜μ§€ 말 것**

Result

After introducing TODO.md, the AI completed all remaining tasks.


Pattern 3: Discord Emoji Approval Workflow

Problem

The AI created tweet candidates... but posted them directly without my approval.

Solution

Implemented an approval system with Discord emojis:

1. AIκ°€ νŠΈμœ— 후보 3개 생성
2. λ””μŠ€μ½”λ“œλ‘œ 전솑
3. 이λͺ¨μ§€ 5개 달기 (1️⃣ 2️⃣ 3️⃣ πŸ”₯ ❌)
4. λ‚΄κ°€ 이λͺ¨μ§€ 클릭
5. μ„ νƒν•œ κ²ƒλ§Œ ν¬μŠ€νŒ…

Actual Example

## πŸ¦… μ•ŒνŒŒν—Œν„° νŠΈμœ— 후보 (03:07 KST)
 
### 1️⃣ λ°”μ΄λ‚ΈμŠ€ SAFU β†’ BTC μ „ν™˜
> λ°”μ΄λ‚ΈμŠ€, SAFU νŽ€λ“œ $10얡을 30일 λ‚΄ μ „λŸ‰ BTC둜 μ „ν™˜ λ°œν‘œ.
> 리슀크 헷지인가, 확신인가?
 
### 2️⃣ OKX μ°½μ—…μž λ°œμ–Έ
> "1/29 μ—­λŒ€κΈ‰ 청산일 원인은 맀크둜 리슀크"
> 근데 κ²°κ΅­ ꡬ쑰적 문제 μ•„λ‹Œκ°€?
 
### 3️⃣ λ©”νƒ€ν”Œλž˜λ‹› $137M BTC 맀수
> 기관듀이 곡포μž₯μ—μ„œ λ§€μˆ˜ν•˜λŠ” 건 쒋은 μ§•μ‘°?
 
**μ•„λž˜ 이λͺ¨μ§€ 쀑 ν•˜λ‚˜ 선택:**
1️⃣ 2️⃣ 3️⃣ πŸ”₯ ❌

Multi-Selection & Queuing

If you press 1️⃣ + 2️⃣? β†’ Queue and post sequentially

def process_reactions(reactions: list):
    queue = []
    for emoji in reactions:
        if emoji == '1️⃣':
            queue.append(candidates[0])
        elif emoji == '2️⃣':
            queue.append(candidates[1])
        # ...
    
    for tweet in queue:
        post_tweet(tweet)
        time.sleep(60)  # rate limit λ°©μ§€

Overall Architecture

μ•ŒνŒŒν—Œν„° μ•„ν‚€ν…μ²˜

Conclusion

What I learned while working with AI agents:

1. You get better answers if you ask better questions

If you ask, "Isn't there a better way?" it really comes up with development ideas.

2. Memory should be in files

Don't trust the AI's memory. Write everything down in TODO.md, MEMORY.md, and ROADMAP.md.

3. Approval gates are essential

Humans must check irreversible actions. Emojis are the fastest way.

4. Self-evolution really works

If you tell the AI, "Do whatever you need to do to improve things," it really does it.


File Structure

The final AlphaHunter skill that was created:

skills/alphahunter/
β”œβ”€β”€ SKILL.md                  # μŠ€ν‚¬ λ¬Έμ„œ
β”œβ”€β”€ ROADMAP.md               # λ‘œλ“œλ§΅ & λ°œμ „ 아이디어
β”œβ”€β”€ TODO.md                  # νƒœμŠ€ν¬ 좔적
β”œβ”€β”€ config.json              # μ„€μ •
β”œβ”€β”€ scripts/
β”‚   β”œβ”€β”€ telegram_daemon.py   # ν…”λ ˆκ·Έλž¨ μƒμ‹œ μˆ˜μ§‘
β”‚   β”œβ”€β”€ twitter_direct.py    # νŠΈμœ„ν„° μ„Έμ…˜ API
β”‚   β”œβ”€β”€ news_collector.py    # λ‰΄μŠ€/μ§€ν‘œ/κ³΅μ‹œ
β”‚   β”œβ”€β”€ chart_generator.py   # 차트 생성
β”‚   β”œβ”€β”€ advanced_analysis.py # 감성/νŠΈλ Œλ“œ 뢄석
β”‚   β”œβ”€β”€ approval_workflow.py # 승인 μ›Œν¬ν”Œλ‘œμš°
β”‚   β”œβ”€β”€ scheduler.py         # μ˜ˆμ•½ ν¬μŠ€νŒ…
β”‚   β”œβ”€β”€ performance_tracker.py # μ„±κ³Ό νŠΈλž˜ν‚Ή
β”‚   └── follower_analytics.py  # νŒ”λ‘œμ›Œ 뢄석
└── state/
    β”œβ”€β”€ telegram_messages.json
    β”œβ”€β”€ posted.json
    └── charts/

If this post was helpful:


Related Posts:

Comments

Loading comments...
Creating a Self-Evolving AI Agent with OpenClaw - AlphaHunter Development Story | Arang