Goal Management
Goals transform Myrm from a chat assistant into an autonomous worker. Define an objective, set constraints, and let the agent work independently across multiple turns.Creating a Goal
From the GUI
- Toggle Goal Mode in the message input area (bottom-right toggle button)
- The configuration panel expands with sections:
- Budget — Set any combination of
max_tokens,max_usd,max_time_seconds, andmax_turns - Acceptance Criteria — Define shell commands and semantic checks the agent must pass
- Constraints — Rules the agent must follow during execution
- Protected Paths — Glob patterns for files the agent must not modify (e.g.,
*.env,migrations/**) - Advanced —
loop_on_pause,convergence_window, Pause after each step (per-todo checkpoint)
- Budget — Set any combination of
- Type your objective in the message box and send — the agent begins planning and executing
From Chat
Simply describe a complex task in natural language. The agent will detect it requires sustained effort and offer to create a goal.Goal Lifecycle
Budget Control
Every goal has 4 budget dimensions:
Budget exhaustion pauses the goal with a structured summary of progress. You can resume the goal with additional budget at any time.
Acceptance Criteria
Define what “done” looks like:- Shell verification — Runs test commands (e.g.,
pytest,npm test) and checks results - Semantic verification — LLM-based assessment against your acceptance criteria
Advanced: Logical Consistency Verification
For long document tasks, semantic verification ensures the entire output is logically consistent:Constraints
Hard rules the agent must follow:14-Layer Dead-Loop Shield
At the end of every turn, a 14-layer guard chain determines whether the agent should continue — preventing runaway execution, cost overruns, token waste, goal drift, and sandbox probing:
Additionally, progressive budget degradation (WARNING → FINALIZATION) with dynamic remaining USD injection and 4-layer context-window overflow protection operate at the middleware level to catch edge cases before they reach the guard chain.
Judge Feedback Loop
When the semantic judge determines the goal is not yet complete, it provides a specific reason (e.g., “only 3 of 5 charts produced”). This reason is automatically injected into the next turn’s prompt so the agent knows exactly what gap to address — eliminating redundant re-analysis and reducing unnecessary turns.Per-Todo Checkpoint
Enable “Pause after each step” in Advanced settings to activate per-todo checkpoint mode. When enabled, the agent automatically pauses after completing each todo item and waits for your confirmation before continuing. How it works:- Agent reports a todo item as completed via
todo_write - Guard chain detects the new completion and pauses the goal
- GoalStatusCard shows which step(s) just finished with a Continue button
- You review the results, then click Continue to proceed to the next step
- Production deployments — Confirm each migration step before proceeding
- Data pipelines — Verify data integrity at each stage
- Complex refactors — Review code changes step by step
- Learning — Understand what the agent does at each stage
Priority Queue
When you create multiple goals, they’re automatically queued:- The first goal runs immediately
- Subsequent goals enter
QUEUEDstate - When the active goal finishes, the next queued goal auto-starts
- Drag-and-drop reordering in the GUI
auto_approve: true to skip the approval step for queued goals, enabling fully unattended execution of goal chains.
Adaptive Convergence & Loop-on-Pause
Goals can automatically detect when the agent has finished its work and handle continuous execution without human intervention.Convergence Detection
When the agent goesconvergence_window consecutive turns without making any tool calls, the goal is automatically marked as converged (completed). This prevents the agent from idling and wasting tokens when it has nothing left to do.
Loop-on-Pause
When enabled, a goal that pauses due to convergence will automatically restart with a fresh context, up to a configurable maximum number of restarts. This is ideal for long-running monitoring or iterative refinement tasks.Resume Safety
When you manually resume a paused goal, all runtime counters (no_progress_streak, loop_restarts, consecutive_judge_parse_failures) are automatically reset to zero. This ensures the agent gets a fresh opportunity without triggering immediate re-convergence or false auto-pauses.
Judge Failure Circuit Breaker
If the semantic judge model returns unparseable output (not valid JSON) 3 consecutive times, the goal is automatically paused to prevent burning tokens on a misconfigured judge. This protects against:- Using a weak model that can’t follow the JSON reply contract
- Temporary model degradation producing garbage output
- Token budget waste from infinite retry loops
Server Restart Recovery
If the server restarts (upgrade, crash, or container reschedule) while a goal is active, the orphaned goal is automatically detected and paused with a clear reason:- On startup, the server scans for goals still marked ACTIVE with no execution engine driving them
- Each orphaned goal transitions to PAUSED with the reason “Server restarted — resume when ready”
- A system notification alerts you that goals were paused
- Open the affected chat to see the paused status and one-click Resume when ready
Frontend Status
The Goal Status Card displays differentiated states:- Converged — Goal completed via convergence detection
- Restarting (#N) — Goal is restarting via loop-on-pause (showing restart count)
Global Goal Tracking
Monitor all active goals from any page without switching contexts:- NavBar Badge — A real-time badge shows the number of active goals. Updates instantly via Server-Sent Events when a goal completes or dequeues.
- Background Tasks Popover — Click the badge to see all active goals across all sessions: objective, status, tokens consumed, and elapsed time.
- Quick Actions — Pause, resume, or cancel any goal directly from the popover. A toast confirms the action.
- Navigate — “Go to session” button jumps directly to the goal’s chat for full detail.
- OS Notifications — When a goal finishes (completes, fails, or gets paused), you receive a system notification even if the browser tab is in the background.
Dynamic Subgoals
During execution, you can add new objectives without interrupting the agent:- Open the active goal’s detail panel
- Add a subgoal (e.g., “Also add unit tests for the new module”)
- The subgoal is injected into the agent’s context with highest priority
IM Slash Commands
Manage goals entirely from any IM channel (Slack, Feishu, Telegram, WhatsApp, etc.):
Constraints added via IM are injected into the agent’s prompt as “CONSTRAINTS (MUST NOT VIOLATE)” and enforced by the semantic judge during completion verification — identical behavior to GUI-defined constraints.
Objective Hot-Edit
Change the goal’s direction mid-execution:- Open the active goal’s detail panel
- Edit the objective text
- The change is injected as a steering message — the agent adjusts course without losing progress
Execution Summary
After completion, every goal produces aGoalExecutionSummary with:
- Files modified (with diff links)
- Token usage breakdown
- Cost breakdown by model
- Time elapsed
- Turn count
- Completion reason
Deliverable Bundle
When a goal completes and has produced 2 or more artifacts (documents, spreadsheets, presentations, etc.), Myrm automatically aggregates them into a Deliverable Bundle card:- Auto-Collection — All artifacts generated during the goal’s session are collected without any manual action
- One-Click ZIP Download — Download the entire bundle as a single ZIP archive
- Per-File Preview — Click any individual deliverable to open it in the Artifact Portal with format-aware rendering
- Filename Deduplication — If multiple artifacts share the same name, unique identifiers are appended automatically
Use Case: Full-Chain Office Delivery
Use the pre-built “Office Full-Chain Delivery” agent template to generate complete document suites in one conversation:- Select the “Office Full-Chain Delivery” agent from the agent selector
- Describe your deliverables (e.g., “Prepare quarterly report: Excel data + PPT presentation + Word summary”)
- The agent executes with Goal mode, maintaining data consistency across all documents
- On completion, the Deliverable Bundle card appears with all files ready for download
API Access
Deliverables are also available via REST API:GET /api/goals/{goal_id}/status— Returnsdeliverablesarray with artifact IDs and filenamesPOST /api/files/download-bundle— Downloads multiple artifacts as a ZIP archive
Example Workflow
Project Milestones (Cross-Session Goals)
While Goals operate within a single session, Project Milestones span across sessions. They let you define strategic objectives for an entire project, and the agent automatically stays aware of them in every conversation.How It Works
- Create milestones in the sidebar panel (within a Project)
- Agent auto-injects —
ProjectRoadmapMiddlewareinjects a compact roadmap context (~100 tokens) into every conversation in that project - Track progress — Milestones link to Kanban boards for automatic progress calculation
Creating Milestones
In the sidebar, navigate to your project and find the Milestones section:- Click the
+button to add a new milestone - Each milestone has a title, optional description, and acceptance criteria
- Mark milestones as completed when objectives are met