Skip to content
ThirdLayer

Docs > Factory

Factory

Manage Dex agents, shared agents, skills, automations, ontology documents, views, and knowledge as versioned files in a Git-backed workspace repository.

Factory is Dex’s Git-backed configuration repository for your organization. Every durable definition—agents, shared agents, automations, skills, knowledge files, ontology documents, saved views, and source descriptors—lives as readable Markdown or YAML files in one versioned repository, then projects into live runtime state on publish.

Factory owns definitions and version history, never runtime credentials or execution state. OAuth tokens, Access Scopes, run transcripts, coordinator assignments, admin member pauses, and Pending Action cards always stay in Postgres.

Factory uses a single canonical main branch per organization backed by Code Storage, with optimistic concurrency and a two-phase publish pipeline:

flowchart LR
  Edit["Edit files<br/>(Web editor, Chat agent,<br/>or dex factory CLI)"] --> Preview["dex factory preview<br/>(schema, ACL & ontology<br/>impact diagnostics)"]
  Preview --> Commit["Phase 1: Commit<br/>(atomic Git commit on main<br/>with assigned resourceIds)"]
  Commit --> Apply["Phase 2: Apply<br/>(project into Postgres:<br/>agents, skills, automations,<br/>views, ontology)"]
  Apply --> Live["Live runtime state<br/>(schedules, Nexus views,<br/>agent runs)"]
  1. Preview (dex factory preview) — Validates schemas, permissions, and file moves without publishing. For ontology or view edits, preview also lists changed Object types, affected Views, and connected source output bindings (counting inaccessible views/outputs without leaking their names).
  2. Commit (dex factory push) — Verifies the caller’s write permissions, assigns stable res_<uuid> identities to new resources, records publish metadata trailers, and writes an atomic commit to main under a per-workspace mutation lock.
  3. Apply — Projects the committed Git tree into runtime tables (factory_resources, agents, agent_members, skills, skill_members, automations, views, and ontology revisions). Commit success and Apply success are distinct: if Apply fails, Dex surfaces the apply error and lets you retry Apply without losing your commit.
Stored in Factory (Git)Stored in Postgres (runtime only)
AGENT.md, TEAM.md, team/ notesagents.coordinator_user_id & coordinator_scope_id
automations/*.md triggers & tasksautomation_runs, leases, transcripts, and shared_result
SKILL.md bundles & supporting filesPer-user OAuth tokens, MCP tokens, and Access Scopes
Member link files (shared-agents/, shared-skills/)agent_members.access_scope_id and Admin pause (status: inactive)
workspace/ontology/objects/*.yaml & views/*.mdLive Object records, cell edits, observations, and pending_actions
knowledge/ & users/<you>/memory/approval_slack_channel and self-improvement agent_issues

Repository limits are 50 MiB total per organization Factory and 5 MiB per file.

  • Web app (/nexus/settings/factory) — Workspace admins can browse the full tree, inspect diffs, edit files, view commit history, and manage path-level sharing. (In user-facing settings, this view is labeled Workspace files.)
  • Chat & sandboxed agents — Sandboxed sessions mount your readable subset of Factory as a real Git checkout at /workspace/factory.
  • Local CLI (dex factory) — Pull, diff, commit, preview, push, and manage sharing from your terminal (dex factory pull, preview, push, tree, access, share).