Reeve
Goals Engine

Creating Goals

Create goals via CLI wizard, agent tools, or the dashboard UI.

Creating Goals

Goals can be created three ways: the CLI wizard (for humans), the agent tool (for agents), or the Cockpit dashboard (for the web UI).

CLI Wizard

The reeve goal create command launches an interactive wizard:

reeve goal create

The wizard prompts for:

  1. Title — What the goal is about
  2. Description — Full context and success criteria
  3. Agent — Which agent owns this goal
  4. Phases — Add one or more phases (name, type, description)
  5. Budget — Optional token/dollar caps and approval gates
  6. Deadline — Optional target completion date

Non-interactive mode

Pass all fields as flags for scripting:

reeve goal create \
  --title "Launch email campaign" \
  --agent marketing-agent \
  --phase "Research audience:once" \
  --phase "Write sequences:once" \
  --phase "Monitor performance:loop" \
  --budget-cost 50 \
  --approval-gate 25

Agent Tool

Agents create goals using the goals tool with action: "create":

goals({
  action: "create",
  goal: {
    title: "Optimize ad spend for Q1",
    description: "Reduce CPA by 20% while maintaining volume. Current CPA: $12.50.",
    agentId: "ad-optimizer",
    phases: [
      {
        name: "Audit current campaigns",
        description: "Pull performance data, identify waste",
        type: "once"
      },
      {
        name: "Implement optimizations",
        description: "Pause underperformers, reallocate budget, test new creatives",
        type: "once"
      },
      {
        name: "Monitor & iterate",
        description: "Check metrics every 30 minutes, adjust bids and budgets",
        type: "loop"
      }
    ],
    budget: {
      maxCost: 100,        // $100 total token spend
      maxTokens: 5000000,  // 5M tokens
      approvalGate: 50     // Pause at $50 and ask human
    },
    deadline: "2026-03-31T00:00:00Z",
    reportInterval: "2h"   // Report progress every 2 hours
  }
})

Required fields

FieldTypeDescription
titlestringGoal title (required)
agentIdstringOwning agent ID
phasesarrayAt least one phase with name and type

Optional fields

FieldTypeDescription
descriptionstringFull context and success criteria
budgetobjectmaxTokens, maxCost, maxSessions, approvalGate
deadlinestringISO 8601 date
reportIntervalstringHow often to auto-report (e.g., "2h", "30m")
reportChannelstringChannel for auto-reports
stateobjectInitial state (arbitrary JSON)
metricsarrayInitial metrics to track

Goal Object

When created, a goal gets this structure:

{
  "id": "g_abc123",
  "agentId": "marketing-agent",
  "createdBy": "user",
  "title": "Launch email campaign",
  "description": "...",
  "status": "active",
  "phases": [
    {
      "id": "p_1",
      "name": "Research audience",
      "type": "once",
      "status": "running"
    },
    {
      "id": "p_2",
      "name": "Write sequences",
      "type": "once",
      "status": "pending"
    },
    {
      "id": "p_3",
      "name": "Monitor performance",
      "type": "loop",
      "status": "pending"
    }
  ],
  "currentPhase": 0,
  "budget": {
    "maxCost": 50,
    "usedCost": 0,
    "approvalGate": 25
  },
  "state": {},
  "metrics": [],
  "createdAt": "2026-02-27T12:00:00Z",
  "startedAt": "2026-02-27T12:00:00Z"
}

The first phase is automatically set to "running" status. Subsequent phases stay "pending" until the current phase completes.

Cockpit Dashboard

The Goals Dashboard at /cockpit/goals provides a visual interface:

  1. Click "New Goal" to open the creation form
  2. Fill in title, description, agent, and phases
  3. Set budget and deadline
  4. Click Create

The dashboard shows all goals with real-time status, phase progress bars, budget usage, and activity logs.

When a goal is created, the gateway automatically sets up cron jobs for any loop phases and registers webhook endpoints for any event-driven phases.

What Happens After Creation

  1. The goal is stored in SQLite (~/.reeve/goals/goals.db)
  2. The first phase is marked as running
  3. If the goal has loop phases, cron jobs are scheduled via goals/scheduler.js
  4. The goal appears in the agent's context during heartbeats via goals/heartbeat-hook.js
  5. The agent sees its active goals and current phase, guiding its next actions

See Phases for how phase advancement works.

On this page