Skip to content

dhawalc/Curiosity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

14 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ULTRON - Autonomous AI Agent

Built: 2026-03-05 in ~2 hours
Status: Live and grinding
Cost: $0 (local Ollama)

An autonomous AI agent with persistent memory, goal pursuit, strategic intelligence, and event-driven activation. Unlike AutoGPT/BabyAGI, this one actually works.


Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                           ULTRON                                β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                                 β”‚
β”‚  INTELLIGENCE      LEARNING        GOALS         COMMUNICATION β”‚
β”‚  ────────────      ────────        ─────         ───────────── β”‚
β”‚  intel.py          curiosity.py   goal_engine   daily_briefing β”‚
β”‚  (4 sources)       session_watcher verify.py    telegram       β”‚
β”‚  (84 signals/day)  surface.py     learnings.py  proactive      β”‚
β”‚                                   actions.py                    β”‚
β”‚                                                                 β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  MEMORY: AOMS (63k+ entries, 4 tiers, always-on service)        β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  ACTIVATION: trigger.py (event-driven, always-on service)      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Components

Core Engines

File Lines Purpose
curiosity.py 219 Explores questions, extracts facts β†’ AOMS
session_watcher.py 260 Learns from OpenClaw conversations β†’ AOMS
surface.py 175 Updates BOOTSTRAP.md + MEMORY.md with learnings
daily_briefing.py 249 Morning summary β†’ Telegram
goal_engine.py 392 Autonomous task execution with verification
intel.py 282 Crawls arXiv/GitHub/HN/RSS β†’ intelligence brief
trigger.py 281 Event-driven self-activation (always-on)

Support Modules

File Lines Purpose
verify.py 176 Ground truth checking (8 verification methods)
learnings.py 110 Failure tracking, anti-pattern generation
actions.py 233 External actions (tweet, write file, github)
status.py 158 CLI status dashboard

Source Crawlers

File Source Data
sources/arxiv.py arXiv API cs.AI, cs.LG, cs.CL, cs.NE papers
sources/github_trending.py GitHub Trending repos (Python/TS/Rust/Go)
sources/hackernews.py HN API Top 30 stories
sources/rss_feeds.py RSS OpenAI, Anthropic, Google, Meta, HF blogs

Timers & Services

# Check status
systemctl --user list-timers
systemctl --user status trigger.service
Unit Schedule Purpose
session-watcher.timer Every 15 min Learn from conversations
curiosity.timer Every 30 min Explore questions
goal-engine.timer Every 30 min Execute goal tasks
curiosity-surface.timer Every 1 hour Update workspace files
intel.timer 6:00 AM daily Intelligence crawl
daily-briefing.timer 7:00 AM daily Morning Telegram summary
trigger.service Always-on Event-driven activation

CLI Usage

cd ~/curiosity
source .venv/bin/activate

# Status dashboard
python3.12 status.py

# Curiosity
python3.12 curiosity.py --dry-run      # Preview next exploration
python3.12 curiosity.py                 # Run one cycle

# Goals
python3.12 goal_engine.py --list        # Show all goals with progress
python3.12 goal_engine.py --dry-run     # Preview next task
python3.12 goal_engine.py               # Execute next task
python3.12 goal_engine.py --learnings   # Show failures/successes

# Intelligence
python3.12 intel.py --sources           # List configured sources
python3.12 intel.py --crawl-only        # Crawl without synthesis
python3.12 intel.py --dry-run           # Full run, print to stdout
python3.12 intel.py                     # Full run + Telegram delivery

# Surface
python3.12 surface.py --dry-run         # Preview workspace updates
python3.12 surface.py                   # Update BOOTSTRAP.md + MEMORY.md

# Session watcher
python3.12 session_watcher.py --dry-run # Preview session analysis
python3.12 session_watcher.py           # Process new sessions

# Daily briefing
python3.12 daily_briefing.py --dry-run  # Preview briefing
python3.12 daily_briefing.py            # Send to Telegram

Configuration

config.yaml

ollama:
  url: "http://localhost:11434/api/generate"
  model: "deepseek-r1:7b"
  fallback_model: "qwen2.5:7b"

aoms:
  url: "http://localhost:9100"

workspace:
  bootstrap_path: "~/.openclaw/workspace/BOOTSTRAP.md"
  memory_path: "~/.openclaw/workspace/MEMORY.md"

Telegram credentials

# ~/.config/curiosity/telegram.env
TELEGRAM_BOT_TOKEN=your_bot_token
TELEGRAM_CHAT_ID=your_chat_id

Goals System

Goals are defined in goals.yaml:

goals:
  - id: my-goal
    name: "Do something awesome"
    priority: high  # high, medium, low
    deadline: "2026-03-10"
    status: active  # active, completed, paused
    progress: 0
    tasks:
      - id: task-1
        name: "First step"
        status: pending  # pending, in_progress, completed, failed
        requires: []
      - id: task-2
        name: "Second step"
        status: pending
        requires: [task-1]  # Dependencies

Verification System

Every task gets verified against reality:

Task Type Verification Method Confidence
write/readme/save File exists + size check 1.0
tweet/post xurl lookup by tweet ID 0.8-1.0
github/repo GitHub API check 1.0
research/analyze AOMS search 0.8-1.0
Default Content length > 200 chars 0.7

Anti-pattern Learning

  • 3 failures on same task β†’ auto-creates anti-pattern
  • Anti-patterns stored in AOMS + local learnings.json
  • Future prompts include "AVOID THESE APPROACHES"

Trigger Events

The trigger service (trigger.py) watches for:

  1. New session file β†’ Runs session_watcher.py immediately
  2. Memory milestone (every 1000) β†’ Sends celebration notification
  3. Goal deadline < 24h β†’ Escalates via Telegram
  4. New Ollama model β†’ Runs curiosity with new model

Memory (AOMS)

Always-On Memory Service running on port 9100.

# Health check
curl http://localhost:9100/health

# Stats
curl http://localhost:9100/stats

# Search
curl -X POST http://localhost:9100/memory/search \
  -H "Content-Type: application/json" \
  -d '{"query": "your search", "limit": 10}'

Tiers

  • Episodic β€” Experiences, sessions, events
  • Semantic β€” Facts, knowledge, signals
  • Procedural β€” Skills, patterns, anti-patterns
  • Working β€” Active context (not persisted)

What Makes This Different

AutoGPT/BabyAGI ULTRON
Infinite loops Verified task completion
No memory 63k+ AOMS memories
Burned $$$ Free local Ollama
No learning Anti-patterns from failures
Just planned Actually executes
No external data Crawls 4 knowledge sources
No human handoff Asks when uncertain
Clock-driven only Event-driven activation

Directory Structure

~/curiosity/
β”œβ”€β”€ curiosity.py          # Question exploration
β”œβ”€β”€ session_watcher.py    # Learn from conversations
β”œβ”€β”€ surface.py            # Update workspace files
β”œβ”€β”€ daily_briefing.py     # Morning Telegram summary
β”œβ”€β”€ goal_engine.py        # Autonomous task execution
β”œβ”€β”€ intel.py              # Intelligence crawler
β”œβ”€β”€ trigger.py            # Event-driven activation
β”œβ”€β”€ verify.py             # Ground truth checking
β”œβ”€β”€ learnings.py          # Failure/success tracking
β”œβ”€β”€ actions.py            # External actions
β”œβ”€β”€ status.py             # CLI dashboard
β”œβ”€β”€ sources/              # Intel source crawlers
β”‚   β”œβ”€β”€ __init__.py
β”‚   β”œβ”€β”€ arxiv.py
β”‚   β”œβ”€β”€ github_trending.py
β”‚   β”œβ”€β”€ hackernews.py
β”‚   └── rss_feeds.py
β”œβ”€β”€ config.yaml           # Configuration
β”œβ”€β”€ goals.yaml            # Goal definitions
β”œβ”€β”€ queue.json            # Curiosity question queue
β”œβ”€β”€ learnings.json        # Failure/success history
β”œβ”€β”€ results/              # Goal task outputs
β”œβ”€β”€ logs/                 # Execution logs
└── .venv/                # Python virtual environment

Setup (Fresh Install)

# Clone
cd ~
mkdir curiosity && cd curiosity

# Python environment
python3.12 -m venv .venv
source .venv/bin/activate
pip install requests pyyaml feedparser beautifulsoup4

# Create config
cp config.yaml.example config.yaml
# Edit config.yaml with your settings

# Telegram credentials
mkdir -p ~/.config/curiosity
echo "TELEGRAM_BOT_TOKEN=your_token" > ~/.config/curiosity/telegram.env
echo "TELEGRAM_CHAT_ID=your_chat_id" >> ~/.config/curiosity/telegram.env

# Enable systemd units
systemctl --user daemon-reload
systemctl --user enable --now curiosity.timer
systemctl --user enable --now session-watcher.timer
systemctl --user enable --now curiosity-surface.timer
systemctl --user enable --now daily-briefing.timer
systemctl --user enable --now goal-engine.timer
systemctl --user enable --now intel.timer
systemctl --user enable --now trigger.service

# Verify
systemctl --user list-timers
systemctl --user status trigger.service

Troubleshooting

# Check all services
python3.12 status.py

# Check specific timer
systemctl --user status curiosity.timer
journalctl --user -u curiosity -f

# Check trigger service
journalctl --user -u trigger -f

# Test Telegram
curl -X POST "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage" \
  -d "chat_id=${TELEGRAM_CHAT_ID}" \
  -d "text=Test"

# Check AOMS
curl http://localhost:9100/health

License

MIT


Author

Built by Dhawal + ULTRON (Claude Opus 4.5) on 2026-03-05.

"This isn't Daemon 2.0. This is something that actually works."

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages