Skip to content
ThirdLayer

Docs > Factory

Runs, dry runs, and self-improvement

Inspect automation runs, export transcripts, validate changes safely with dry runs, and track recurring failures with Agent Issues and self-improvement.

Reliable agents are built by inspecting real runs, capturing where humans edited or rejected proposed actions, and tightening instructions, skills, or policies in Factory. Dex gives you four tools to close that loop: run and card inspection, transcript export, dry runs, and Agent Issues with self-improvement.

flowchart TD
  Run["Automation / Agent Run"] --> Cards["Pending Actions &<br/>Human Feedback"]
  Run --> Trace["Transcripts, Tool Calls<br/>& Skill Attribution"]
  Cards --> Improver["Daily Improver<br/>(isolated dry-run sandbox)"]
  Trace --> Improver
  Improver --> Issues["Agent Issues<br/>(threads / open / resolved)"]
  Issues --> Edit["Update AGENT.md, SKILL.md,<br/>or autoMode in Factory"]
  Edit --> Preview["dex factory preview &<br/>dry-run validation"]
  Preview --> Run

Every personal, fan-out, and coordinator run is recorded in /nexus/automations/runs and inspectable via the CLI:

Terminal window
# List recent runs for an agent
dex agents runs <agent-id>
# Inspect a specific run (including nested member runs on a coordinator dispatch)
dex runs get <run-id>
# Review pending action cards and human rejection/edit feedback
dex agents cards <agent-id> --feedback

What to look for when tuning an agent:

  • Repeated card edits — If reviewers repeatedly rewrite the same section of a drafted email or CRM field, move that rubric into the agent’s SKILL.md or AGENT.md.
  • Repeated rejections with feedback — Check whether the automation’s condition is too broad or whether the agent is missing a context source or View.
  • Frequent skipped member runs — Inspect unmet requires on a shared agent so teammates know which app or Scope permission is missing.
  • Skill attribution — Every Skill invocation records structured OpenTelemetry attribution (skill hash, Factory commit SHA, and source reference) so you can verify which version of a skill actually ran.

You can inspect or export full conversation and run trajectories from the CLI—including Harbor’s ATIF trajectory format for offline evaluation and analysis:

Terminal window
dex chats list
dex chats messages <chat-id>
dex chats transcript <chat-id> --format json
dex chats transcript <chat-id> --format atif

Never test an unproven edit by triggering a live shared agent across your team—an Admin’s Run now dispatches to every active member (or starts the live coordinator).

Instead, validate changes safely:

  1. Always preview Factory edits first with dex factory preview to check schemas, permissions, and ontology/view impact before pushing.
  2. Use dry-run mode when validating agent behavior against live context without mutating external systems. Dry runs execute with dryRun: true, skip Factory commits, and record synthetic simulated actions instead of writing to external tools. On coordinated shared agents, dry-run mode propagates down to every called member run.
  3. Keep requireWriteApproval: true when rolling out new writes so the first live runs land as reviewable Pending Action cards before you add an autoMode policy.

Dex includes an optional self-improvement meta-agent (agent_improvers) paired with a structured issue tracker (agent_issues, viewed at /nexus/improve/issues when enabled for your workspace):

  • Daily isolated inspection — Each enabled agent gets one daily meta-agent that runs in an isolated dry-run sandbox with read-only tools. It inspects the agent’s last 60 runs and Pending Action cards (including edits, rejections, and failures).
  • Structured evidence-backed issues — Recurring failure patterns are tracked as deduplicated issues across three states (thread, open, resolved) with confidence scores, frequency counts, and direct links to supporting runs and Pending Actions (agent_issue_evidence).
  • File-based workflow (dex issues) — Issues sync as Markdown files under threads/, open/, and resolved/:
Terminal window
dex issues pull
dex issues push

The self-improvement loop surfaces grounded hypotheses and evidence for editors—it never silently rewrites your production AGENT.md or SKILL.md without review.