Skip to content
ThirdLayer

Docs > Integrations and CLI

CLI and SDK

Manage Factory files, personal and shared agents, Access Scopes, Zeta ontology and SQL queries, saved Views, and multi-member workflows with the dex CLI and @dex/sdk.

The dex CLI (@dex/cli) and @dex/sdk TypeScript SDK talk to Dex’s /api/v1 REST API. Both workspace builders working locally and sandboxed agents running inside claude or codex harnesses use the exact same commands.

Pass --help on any command for exact options, and --json for machine-readable output.

Version, validate, publish, and share Factory definitions (defaults to /workspace/factory inside sandboxes):

Terminal window
dex factory pull # Sync readable Factory tree from server
dex factory tree # List readable Factory paths
dex factory status # Inspect local edits
dex factory diff # Review unstaged changes
dex factory add <path> # Stage explicit paths (never add -A)
dex factory commit -m "Update agent policy" # Commit locally
dex factory preview # Validate schemas, ACLs, and ontology/view impact
dex factory push # Publish commits and run server Apply
dex factory access <path> # Inspect current grants on a workspace path
dex factory share <path> <recipient> --role read # Grant read | write | none to email, Space, or workspace

There is no separate dex skills command—skills are authored, validated, and shared directly as Factory files via dex factory.

Agents, runs, and cards (dex agents, dex runs)

Section titled “Agents, runs, and cards (dex agents, dex runs)”

Manage shared agents, membership, coordinator runners, runs, and Pending Action feedback:

Terminal window
dex agents list
dex agents get <agent-id>
dex agents create --title "Weekly brief" --schedule "0 9 * * 1" --timezone "UTC" --task "Summarize open items."
dex agents share <agent-id> sam@acme.com --role read
dex agents join <agent-id>
dex agents on <agent-id>
dex agents off <agent-id>
dex agents leave <agent-id>
dex agents coordinator <agent-id> --scope <scope-id> # Assign coordinator runner (--clear to remove)
dex agents runs <agent-id>
dex agents cards <agent-id> --feedback
dex runs get <run-id>

Inspect available integrations and manage per-user tool allowlists:

Terminal window
dex scopes catalog # Canonical app names for AGENT.md `requires`
dex scopes list
dex scopes get <scope-id>
dex scopes update <scope-id> ...

Ontology, Knowledge Graph, and SQL (dex zeta)

Section titled “Ontology, Knowledge Graph, and SQL (dex zeta)”

Query Objects, Datasets, Observations, sharing settings, and read-only SQL views:

Terminal window
dex zeta status
dex zeta sources list
dex zeta sources sharing set --account <account-id> --workspace
dex zeta sources outputs bind ...
dex zeta objects list
dex zeta objects get --object person
dex zeta objects create --data '{"name":"commitment","label":"Commitment","titleField":"title","fields":[...]}'
dex zeta objects fields add --object commitment --data '{"field":{...}}'
dex zeta operations get --id <operation-id>
dex zeta records list --object person --filter '{"email":{"contains":"acme.com"}}' --limit 100
dex zeta records aggregate --object deal --group-by stage
dex zeta records context --object person --id <record-id>
dex zeta records create --object commitment --data '{"properties":{"title":"Send SOC 2"}}' --typecast
dex zeta records update --object person --id <record-id> --data '{"properties":{...},"expectedVersion":"..."}'
dex zeta records merge ...
dex zeta observations list --object person --record-id <record-id> --search "renewal"
dex zeta observations get --id <obs-id> --object person --record-id <record-id> --before 5 --after 5
dex zeta observations create --text "Note text" --object person:<record-id>
dex zeta sharing set --target type:person
dex zeta sql schema
dex zeta sql query "SELECT COUNT(*) FROM o_person"
Terminal window
# Saved Views
dex views list
dex views get <view-id>
dex views query <view-id>
# Multi-member coordinator workflows
dex workflows run <workflow-file.ts>
# Self-improvement Agent Issues
dex issues pull
dex issues push
# Chat transcripts and ATIF exports
dex chats list
dex chats messages <chat-id>
dex chats transcript <chat-id> --format atif

Coordinated shared agents use @dex/sdk/workflows to invoke individual member runs from a workflow script executed via dex workflows run:

workflows/team-renewal-rollup.ts
import { agent } from "@dex/sdk/workflows";
export async function run(members: Array<{ userId: string; email: string }>, agentId: string) {
const results = await Promise.all(
members.map(async (member) => {
const result = await agent(
"Check renewals closing within 60 days across your accounts and return open risks.",
{ agent: agentId, user: member.userId },
);
return { email: member.email, ...result };
}),
);
return results;
}

Each agent(prompt, { agent, user }) call dispatches a normal child run executing as that member with their own OAuth accounts, Access Scope, personal working files, and Pending Action rules, and returns { runId, status, text }.