Import and Export
Import and export are complementary extensions that bridge Directory and external systems. Import brings agent records into Directory from heterogeneous external sources — remote registries as well as local files (JSON A2A Cards, MCP server definitions, Agent Skills directories) — while export transforms stored records out into formats consumed by external tools and agentic CLIs.
Import
Import extends Directory's synchronization capabilities beyond Directory-to-Directory sync to support heterogeneous external sources. It aggregates agent records into the local Directory instance from remote registries as well as local files such as A2A AgentCards, MCP server definitions, and Agent Skills.
How import works
The import system uses source-specific adapters to fetch records from external sources — remote registries or local files — and transform them into OASF-compliant records. Each source kind has its own import logic that handles authentication, pagination, filtering, and data transformation. Records are automatically deduplicated and can be enriched with LLM-powered skill and domain mapping to ensure consistency with the OASF schema.
Translation and enrichment
Records are transformed from external registry data into OASF-compliant format, which directly impacts how records are indexed and discovered across the network. Four methods are available:
- Basic translation uses OASF-SDK basic translation with rule-based mapping. It is fast and deterministic but produces a record without any skills or domains, requiring manual or LLM-based enrichment afterwards.
- Static enrichment assigns fixed skills and domains to every record by listing the
taxonomy entries explicitly in the
--configfile. No LLM or API credentials are required. - Extractor enrichment uses the local OASF sentence-transformer model provisioned by
dirctl initto classify each record into OASF skills and domains automatically — no LLM, no API key, no external service. This is the fastest and most accessible enrichment path for users who have already rundirctl init. Enable it by settingenricher.extractor: {}in the--configfile. - LLM enrichment uses an LLM with tool-calling support (local via Ollama or remote via
Azure OpenAI and compatible providers) for intelligent skill and domain mapping. This is the
default when no
--configfile is provided (azure:gpt-4o, 2 RPM). Requires API credentials or a running local LLM runtime.
The enrichment pipeline is built into dirctl — LLM enrichment runs the OASF schema tools
exposed by dirctl mcp serve against the model, while extractor enrichment runs the
provisioned model in-process with no external dependencies.
See CLI Reference — Enrichment
for configuration details and YAML examples for each method.
Supported import kinds
| Kind | Description | Required flag |
|---|---|---|
mcp-registry |
Model Context Protocol registry v0.1 | --url |
mcp |
Local MCP server JSON | --file-path |
a2a |
Local A2A AgentCard JSON | --file-path |
agent-skill |
Local Agent Skills directory with SKILL.md |
--file-path |
Export
Export is the inverse of import: it pulls stored OASF records and transforms them into
formats that external tools and agentic CLIs can consume directly, such as A2A AgentCards,
SKILL.md artifacts, or MCP configuration. This lets records published to Directory feed
back into the broader agent ecosystem without manual conversion.
How export works
Export retrieves a record by CID or name and runs it through a format-specific transformer.
Records can be exported one at a time, or in batches driven by the same search filters used
for discovery (--name, --version, --module, --skill,
--author, and so on). By default only the latest semver version per name is exported;
--all-versions exports every version.
Supported export formats
| Format | Output | Description |
|---|---|---|
oasf |
.json |
Raw OASF record JSON (default) |
a2a |
.json |
A2A AgentCard JSON for Agent-to-Agent protocol interop |
agent-skill |
.md |
SKILL.md artifact for agentic CLIs (Cursor, Claude Code, etc.) |
mcp-ghcopilot |
.json |
GitHub Copilot MCP configuration JSON |
mcp-claudecode |
.json |
Claude Code MCP configuration JSON (.mcp.json mcpServers shape) |
mcp-cursor |
.json |
Cursor IDE MCP configuration JSON (.cursor/mcp.json mcpServers shape) |
Batch behaviour varies by format: a2a and oasf produce one file per record,
agent-skill produces one subdirectory per skill, and mcp-ghcopilot / mcp-claudecode / mcp-cursor
merge all matched MCP servers into a single configuration file.
Related documentation
- Sync — Directory-to-Directory replication
- Records — the OASF record model that import and export target
- Usage Guide — Import — import CLI walkthroughs
- Usage Guide — Export — export CLI walkthroughs
- CLI Reference — Import Operations —
dirctl importflags - CLI Reference — Export Operations —
dirctl exportflags