Autogoal

Automation

Automates ongoing progress on user-defined long-term goals with periodic check-ins, adaptive strategies, and progress reporting.

Install

openclaw skills install autogoal

Goal-Achiever

Turn user goals into self-improving automated pursuit loops.

How it works

User states goal
  ↓
1. INTAKE: Record goal + determine strategy
2. SCHEDULE: Create cron job for periodic check-ins
3. EXECUTE: Each cron run evaluates, acts, logs, adapts
4. CLOSE: Goal achieved or abandoned → clean up
5. REPORT: Surface progress to user periodically

Step-by-step workflow

1. Intake

When a user states a goal, immediately:

a) Run the goal engine to create a record:

python3 scripts/goal_engine.py create "<goal statement>" --channel "<channel-id>"

b) Determine the initial strategy. Consider:

  • What available skills/tools can act toward this goal?
  • What metrics track progress? (profit, uptime, completion %)
  • What's the right check-in cadence? (See references/goal-lifecycle.md for pattern guidance)
  • Are there milestones to define?

c) Write the strategy to the goal:

python3 scripts/goal_engine.py adapt "<goal-id>" --strategy "<strategy description>"

2. Schedule

Generate and create a cron job for the periodic check-in loop:

python3 scripts/goal_engine.py cron "<goal-id>"

This prints JSON. Use the output to create an OpenClaw cron job (cron tool → add action).

Default cadence: every 1 hour (3,600,000 ms). Adjust based on goal type — see references/goal-lifecycle.md.

The cron job's payload includes: goal statement, current strategy, and step-by-step instructions for the check-in agent turn.

3. Execute (cron check-in)

Each cron-run agent turn should:

  1. Evaluate — What's the current state? Has anything changed since the last check?
  2. Take action — Do one concrete thing that moves toward the goal. Use whatever tools/skills make sense.
  3. Log — Write what you did and the outcome:
    python3 scripts/goal_engine.py log-action "<goal-id>" --action "<what you did>" --result "<outcome>"
    
  4. Adapt — If the current approach isn't working, change strategy:
    python3 scripts/goal_engine.py adapt "<goal-id>" --strategy "<new approach>"
    
  5. Report — Tell the user what happened. Concise. Include metric movement if measurable.
  6. Close check — If the goal is achieved, close it:
    python3 scripts/goal_engine.py close "<goal-id>" --status completed
    
    Then disable or remove the cron job.

4. Strategy Adaptation

If after 3 check-ins there's no measurable progress:

  • Switch tactics (different tools, different approach)
  • Read references/goal-lifecycle.md for adaptation heuristics
  • Escalate to user: "I've tried X and Y but Z isn't improving. Ideas?"

5. Reporting

Check-ins report to the channel where the goal was stated. Key reporting patterns:

  • Progress summary: "Goal X: metric improved from A to B (strategy: C is working)"
  • Strategy change: "Switching approach from X to Y because Z wasn't improving"
  • Stuck signal: "Need input on how to proceed with goal X"
  • Completion: "Goal X achieved! 🎉"

Goal Engine Script

scripts/goal_engine.py manages the goal registry (goals_registry.json).

Core Commands

CommandUsage
createcreate "<statement>" --channel "<id>"
planplan "<statement>" --depth L0-L4 [--strategy <type>] — create with planning depth
listlist [--status active|paused|completed|abandoned]
statusstatus <goal-id> — full JSON dump
updateupdate <goal-id> --key <path> --value <json>
log-actionlog-action <goal-id> --action "<text>" --result "<text>"
adaptadapt <goal-id> --strategy "<new strategy>"
advanceadvance <goal-id> --milestone "<desc>"
closeclose <goal-id> --status completed|abandoned
set-metricsset-metrics <goal-id> --json '{"key": "value"}'
set-session-stateset-session-state <goal-id> --objective "..." --blocker "..." --next "..."
set-risk-rulesset-risk-rules <goal-id> --json '{"max_position_size": 100}'
log-outcomelog-outcome <goal-id> --action "..." --result "..." --lessons "..."
learnlearn <goal-id> --lesson "..."
reportreport [--status active|paused|completed|abandoned] [--stalled]
croncron <goal-id> — print cron job JSON

Merged Features

This skill combines the best patterns from three OpenClaw skills:

From Self-Improving Proactive Agent:

  • Session state tracking (objective, blocker, decision, next move)
  • Self-improvement learning loop (lessons promote to HOT after 3 repetitions)
  • Stalled goal detection

From Plan:

  • Planning depth levels (L0-L4) with quick decision framework
  • Strategy templates (sequential, parallel, iterative, spike, checkpoint)
  • Outcome tracking for strategy self-improvement

From Auto-Trading Strategy:

  • Risk rules for financial goals (position sizing, drawdown caps, trade limits)
  • Metrics tracking integrated into check-in context

Check-In Prompt Context

Each cron check-in automatically includes:

  • Goal statement + status
  • Plan depth and strategy
  • Current session state (objective, blocker, next move)
  • Risk rules (if set)
  • Recent metrics
  • Last 3 actions with results
  • ⚠️ Stalled warning if applicable
  • Step-by-step instructions with exact CLI commands

Lifecycle Patterns

Read references/goal-lifecycle.md for detailed guidance on:

  • Periodic-review vs one-shot vs parameter-tuning goals
  • Suggested check-in cadences by goal type
  • Strategy adaptation heuristics
  • Progress signals

Read references/planning-depth.md for:

  • Planning depth decision matrix
  • Strategy template descriptions
  • Outcome tracking workflow
  • Risk rule configuration guide

Cleanup

When a goal is completed or abandoned:

  1. python3 scripts/goal_engine.py close "<goal-id>" --status completed
  2. Disable/remove the associated cron job
  3. Optionally archive the goal registry entry (status handles this)

Safety

  • Goals with financial stakes should start in paper/simulation mode (see ~/self-improving/ project notes for Kalshi/Alpaca)
  • If a goal requires irreversible external actions, ask before acting the first time
  • Abandoned goals remain in the registry but are skipped by cron — clean them up when the user is ready