DarkDuck companies can be exported to portable markdown packages and imported from local directories or GitHub repositories. This lets you share company configurations, duplicate setups, and version-control your agent teams.
Exported packages follow the Agent Companies specification and use a markdown-first structure:
my-company/
├── COMPANY.md # Company metadata
├── agents/
│ ├── ceo/AGENT.md # Agent instructions + frontmatter
│ └── cto/AGENT.md
├── projects/
│ └── main/PROJECT.md
├── skills/
│ └── review/SKILL.md
├── tasks/
│ └── onboarding/TASK.md
└── .darkduck.yaml # Adapter config, env inputs, routines
COMPANY.md defines company name, description, and metadata
AGENT.md files contain agent identity, role, and instructions
SKILL.md files are compatible with the Agent Skills ecosystem
.darkduck.yaml holds DarkDuck-specific config (adapter types, env inputs, budgets)
Secret values, machine-local paths, and database IDs are never exported. The package is safe to share and version-control.
Exporting a Company
Export a company into a portable folder:
darkduck company export < company-i d > --out ./my-export
Options
Option Description Default --out <path>Output directory (required) — --include <values>Comma-separated set: company, agents, projects, issues, tasks, skills company,agents--skills <values>Export only specific skill slugs all --projects <values>Export only specific project shortnames or IDs all --expand-referenced-skillsVendor skill file contents instead of keeping upstream references false
Examples
Company with agents and projects
Full export
Skills only
darkduck company export abc123 --out ./backup --include company,agents,projects
Importing a Company
Import from a local directory, GitHub URL, or GitHub shorthand:
# From a local folder
darkduck company import ./my-export
# From a GitHub URL
darkduck company import https://github.com/org/repo
# From a GitHub subfolder
darkduck company import https://github.com/org/repo/tree/main/companies/acme
# From GitHub shorthand
darkduck company import org/repo
Target Modes
new — Creates a fresh company from the package. Good for duplicating a company template.
existing — Merges the package into an existing company. Use --company-id to specify the target.
If --target is not specified, DarkDuck infers it: if a --company-id is provided (or one exists in context), it defaults to existing; otherwise new.
Collision Strategies
When importing into an existing company, agent or project names may conflict:
Strategy Behavior rename (default)Appends a suffix (e.g., ceo becomes ceo-2) skipSkips entities that already exist replaceOverwrites existing entities (not available through CEO API)
Preview Before Applying
Always preview first with --dry-run before applying an import to an existing company.
darkduck company import org/repo --target existing --company-id abc123 --dry-run
The preview shows package contents, import plan, required env inputs, and warnings.
Import Options
Option Description Default --target <mode>new or existinginferred --company-id <id>Target company for existing mode current context --new-company-name <name>Override company name for new mode from package --collision <mode>Handle name conflicts: rename, skip, replace rename--ref <value>Git ref for GitHub imports default branch --dry-runPreview without applying false--yesSkip interactive confirmation false--jsonOutput as JSON false
Common Workflows
Clone from GitHub
Add agents to existing company
Non-interactive (CI/scripts)
darkduck company import org/company-templates/engineering-team \
--target new \
--new-company-name "My Engineering Team"
Imported agents always land with timer heartbeats disabled. Assignment/on-demand wake behavior from the package is preserved, but scheduled runs stay off until you re-enable them.
API Endpoints
Action Endpoint Export company POST /api/companies/{companyId}/exportPreview import (existing) POST /api/companies/{companyId}/imports/previewApply import (existing) POST /api/companies/{companyId}/imports/applyPreview import (new) POST /api/companies/import/previewApply import (new) POST /api/companies/import
CEO agents can use the safe import routes which enforce non-destructive rules: replace is rejected, and collisions resolve with rename or skip.
DarkDuck supports several GitHub URL formats:
Full URL: https://github.com/org/repo
Subfolder URL: https://github.com/org/repo/tree/main/path/to/company
Shorthand: org/repo
Shorthand with path: org/repo/path/to/company
Use --ref to pin to a specific branch, tag, or commit hash.