new·Earn with mozg — 20% of every monthSend somebody here and take a fifth of every plan payment they make, for as long as they keep paying — not a bounty on the first invoice. Your handle is the link, the window is thirty days, and the commission lands on your balance the second they pay. Free to join: if you have signed in, you already have the link. mozg.sh/earnall news →
mozg.beta
Sign in

LangChain · Deep Agents · all subjects

deep agents/code

9 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

Goal lifecycle and persistence

A goal has a lifecycle that persists across turns until one of four events occurs: the user pauses it, the agent marks it completed or blocked, or the user clears it. Goals stay active across multiple turns of work, allowing you to work toward a larger objective incrementally.

When to use a goal versus a rubric

Use a goal when you have one measurable objective and want Deep Agents Code to draft acceptance criteria before it starts work. Use a rubric when you already know the criteria you want the agent graded against. A goal is useful for open-ended work where the agent turns an objective into a concrete definition of done; a rubric serves as a quality gate for known acceptance criteria.

Goal command syntax examples

Basic goal creation uses /goal add <objective>. Example: /goal add OAuth refresh handling. You can amend an active goal with /goal amend <feedback>, pause it with /goal pause, resume with /goal resume, show details with /goal show, and clear it with /goal clear. Additional commands include /goal model [provider:model|clear] to set or clear the grading model, and /goal max-iterations <N|clear> to set or clear maximum grading iterations.

Rubric command syntax and persistence

Set a persistent rubric with /rubric set <criteria>. Example: /rubric set tests pass; no unrelated files changed; help text is updated. Load criteria from a file with /rubric file <path>. Example: /rubric file acceptance.md. Apply criteria to only the next turn with /rubric next <criteria>. Example: /rubric next only change the auth callback; do not refactor unrelated code. View active rubric with /rubric show, clear it with /rubric clear, and set the grading model with /rubric model <provider:model>.

Goal approval modes and auto-acceptance

Draft criteria handling depends on approval mode. In Manual mode, the inline review always opens. In Auto mode, the review opens by default but can be skipped by setting goals.auto_accept_criteria = true in ~/.deepagents/config.toml to apply generated criteria automatically. In YOLO mode, criteria are applied without review.

Goal amendment workflow

Use /goal amend <feedback> to propose coordinated updates to the objective and criteria without cancelling the current task. The amendment goes through the same inline review process (accept, edit, revise, or cancel) before finalizing, allowing you to steer an ongoing goal.

Rubric in non-interactive mode CLI usage

Non-interactive runs cannot pause for goal review. Use the --rubric flag for tasks where criteria are already known. Examples: dcode -n "implement OAuth refresh handling" --rubric "tests pass; no unrelated files changed" and dcode -n "implement OAuth refresh handling" --rubric @acceptance.md. You can also set the grader model with --rubric-model openai:gpt-5.5 and maximum grading iterations with --rubric-max-iterations 3.

Goal grading across turns

Each follow-up turn is graded against the goal's acceptance criteria until the work is done. When a goal's completion is approved, Deep Agents Code clears the goal.

Rubric persistence scope

A sticky rubric (set with /rubric set) applies to future turns until cleared. A next-turn rubric (set with /rubric next) applies only to the next submitted task.

Give your agent this brain