Use DX with agents

AI agents are used across the software development lifecycle - from taking administrative action to writing code. DX supports and integrates with agentic workflows in a number of ways to bring your organization’s data across all of your processes, such as:

  • Leveraging your DX catalog for context on your ecosystem architecture to write better code
  • Exporting data from your DX data lake to use in other applications
  • Creating reports in DX and importing data to the data lake from other parts of your workflow

How agents connect to DX

The best way to connect agents to DX is using the DX CLI. The CLI enables agents to:

  1. Take action in DX on your behalf using native APIs
  2. Write more effective code by leveraging context on your team’s ecosystem from the catalog and scorecards

You can also connect your agents to DX via the MCP server. The MCP server is read-only — it lets your agent extract data from DX but not make changes. The CLI allows you to both read and write data with DX, and provides your agent with structured skills that describe available APIs and how to use them. This means you can interact with your DX instance through natural language as well as explicit API calls.

A note on future support:

  • While the MCP server can be used for when your agent needs to look at DX data (reports, metrics, catalog lookups), the CLI is more feature-complete and also allows you to take action in DX based on that data.
  • DX intends for the CLI to become the primary interface for AI agents and is investing in it as the long-term direction, beyond the MCP server. Both interfaces remain supported, but only the CLI will be recieving all feature updates.

How agents take action in DX

In order for agents to properly take action in DX, they need to know what they can do and how to do it. The DX CLI provides out of the box agent skills that can be leveraged by the agent of your choosing. These skills serve as instruction manuals that tell agents how and when to use the DX APIs.

Once the agent skill and CLI are installed, you will prompt your agent with natural language, and it will take action in DX on your behalf. You can use the CLI to read data directly, i.e. “search my DX data lake for this information”, or you can ask it to take direct action.

For example - you can ask your agent to find all failing services for a specific scorecard, and apply a fix. The CLI will instruct the agent to:

  1. Query all scorecards to find entities that are failing, using the scorecard and catalog APIs
  2. Once failing entities are found, the agent is instructed to look into the individual scorecard checks to understand success criteria
  3. Once the success criteria are clear, the agent writes code (or tells you how to write code) to fix the failing checks.

Examples

Before you begin:

  1. First, install the CLI.
  2. Run the dx init command.
  3. Authenticate the CLI with a Personal Access Token or Organization Token and connect to your DX instance.
  4. When prompted, install the agent skill for your coding agent (i.e. Claude Code, Cursor, etc).

Example 1: Pull vulnerability scorecard data from DX into a weekly security summary

  • Define a scorecard in DX that measures vulnerabilities and security/compliance standards
  • Generate a DX API token with catalog:read and scorecards:read scopes and store it as a CI secret
  • Ask your agent (with the DX CLI installed) to query DX, for example:
    • “Get me all components owned by the Payments team that have a security scorecard score below 70%, including their open critical vulnerabilities and SLA status.”
  • The CLI queries DX Fabric and returns structured output — component names, scores, vulnerability counts, SLA breach status, and owners.
  • From there, you can:
    • Paste the output into a Google Sheet or Confluence table for your weekly security review
    • Prompt your agent to format it as a Slack summary and post it to #payments-security
    • Feed it into a Jira automation to create follow-up tickets for components breaching SLA

Example 2: Validate scorecard compliance before a PR merge (CI gate)

  • Define a scorecard in DX that represents your merge-readiness standards
  • Ensure your DX catalog is up to date with repository aliases in place
  • Generate a DX API token with catalog:read and scorecards:read scopes and store it as a CI secret
  • Ask your agent (with the DX CLI installed) to query DX, for example:
    • “Add a CI step to our pipeline that uses the DX CLI to check scorecard compliance before allowing a merge. Block the PR if any checks are failing.”
  • The agent knows (via the DX skill) which CLI commands are available and how to structure them, so it can:
    • Write the CI pipeline config for you (GitHub Actions YAML, Bitbucket Pipelines, etc.)
    • Use the correct DX APIs and commands to get scorecard criteria from your merge-readiness scorecard in DX, as well as entity information for the repository you are working with
    • Add the gating logic (fail the job if checks aren’t passing)

How agents leverage context from DX

Agents must understand your architecture — which services exist, how they interact, API contracts, and more — in order to write efficient, production-ready code. DX Fabric stores all of that architectural context across the Software Catalog and Scorecards. For example, agents will write better code if they understand:

  • API contracts and what interfaces exist between services
  • Dependencies and hierarchy to understand how systems integrate and which services talk to each other
  • Engineering standards to ensure their changes don’t regress any existing patterns or standards

DX Fabric delivers all of this context that your AI agents need through the DX CLI. At a high-level, it accesses this context by:

  1. Leveraging the DX CLI and the attached agent skill to know when DX is relevant to the code you’re writing or the changes you’re requesting.
  2. The DX skill tells your agent:
    • When to query the catalog (e.g., “before modifying a service, look up its dependencies”)
    • Which commands to run in the CLI
    • How to interpret the results
    • What safe actions to take next
  3. As your agent writes code, it will automatically query DX for the catalog as a system-of-record and write more effective and accurate code for your organization

Direct prompting

The agent skill lets your coding agent know when DX should be leveraged, but it might not cover all unique use cases. If you think DX context would be relevant in a change you’re making, you can prompt your agent directly to leverage the DX CLI.

Examples of when you may need to prompt your agent directly:

  • If you want the agent to validate its work against your scorecards
  • If you want the agent to use specific catalog data proactively, or catalog data from an unrelated service

Examples

Before you begin:

  1. Install the CLI.
  2. Run the dx init command.
  3. Authenticate the CLI with a Personal Access Token or Organization Token and connect to your DX instance.
  4. When prompted, install the agent skill for your coding agent (i.e. Claude Code, Cursor, etc).
  5. Ensure that you have set up your catalog in DX Fabric following these instructions.

Example 1: Ask your coding agent to fix the vulnerability in the Accounts service

  1. The DX skill recognizes “accounts-service” as a catalog entity in DX, and provides your agent with the relevant command to get more information.
  2. Your coding agent automatically runs the command: dx catalog entities info accounts-service --json via the CLI, and receieves data on ownership, dependencies, and scorecard status.
  3. Your coding agent uses the context from that request to write a more targeted fix as it knows what the service connects to and what standards apply.

Example 2: Ask your coding agent to build a new endpoint for the Payments API

  1. In a follow-up prompt, you add: “Check the DX catalog for the payments service’s dependencies and standards first”.
  2. The agent is then prompted by the DX CLI to query DX for information on the payment service entity and its associated scorecards.
  3. The agent completes the query, discovers downstream services and active scorecards, and implements the code for the endpoint so that its guaranteed to pass relevant scorecard checks and take downstream dependencies into account.