Dynatrace Inc.

03/23/2026 | Press release | Distributed by Public on 03/23/2026 13:57

dtctl: The Dynatrace observability CLI that’s built for AI agents and humans

As AI agents take on more operational tasks, the tools they use to interact with platforms matter. MCP (Model Context Protocol) is emerging as the standard for structured agent-tool interaction, but it adds an abstraction layer that not every workflow needs. Sometimes you just need to run a command, get a result, and act.

What is dtctl?

dtctl (short for "Dynatrace control") is the open-source CLI for the Dynatrace platform; it's kubectl-inspired, terminal-native, and designed for both AI agents and humans. Platform engineers, SREs, and developers use it to manage workflows, dashboards, queries, and settings from the command line.

With dtctl, AI agents use the same command line interface and commands that your platform engineers, SREs, and developers use to autonomously manage workflows, dashboards, queries, and settings.

Three ways to connect agents to Dynatrace

Dynatrace offers three access patterns for AI agents and automation, all secured through the same role-based access controls. Regardless of which path you choose, an agent can access only the data and operations permitted by its authentication scopes. The right choice depends on your use case; in practice, most teams use more than one approach.

  • MCP (Model Context Protocol): A standardized, schema-driven interface in which every tool call is declared upfront and validated automatically. Agents get structured, predictable interactions while platform teams get strict control over which tools are exposed and a full audit trail of every call.
  • API: Access to the full platform surface with maximum flexibility. The API is ideal when you need endpoints that higher-level tools can't cover. The tradeoff: you build and maintain everything yourself, from endpoint selection to token lifecycle, pagination, and rate-limit retries.
  • dtctl (CLI): A terminal-native and composable command line interface that's built for execution speed, with minimal setup: Just run a command, inspect the result, adjust, and repeat. This offers a natural fit for tight iteration loops, scripting, and agents that need to get things done without overhead.

Why is CLI gaining traction for agent workflows?

CLIs have been the primary interface for automation since the early days of Unix, and for good reason. Output is structured, syntax is predictable, and there's no protocol overhead. MCP mirrors how humans interact with tools and includes discovery, negotiation, and structured handshakes. This is valuable when you need it; however, every schema negotiation round-trip adds tokens and latency to the agent's context window. CLI skips that entirely and cuts straight to execution.

Figure 1. (video) Examples of dtctl capabilities

Use the same CLI tool and commands for human engineers, scripts, and AI agents

Whether you're a platform engineer or an AI agent, dtctl gives you the same powerful Dynatrace interface. Like kubectl or git, dtctl follows a simple verb-noun syntax: Just state what it is you want to do, then state what you want to act on. What makes dtctl stand out is that it's designed to support human engineers and AI agents equally.

  • A single interface for everything. Workflows, dashboards, notebooks, queries, SLOs, Dynatrace Intelligence, and more, all accessible through the same consistent set of commands. There's no need to stitch together multiple API endpoints or learn different tools for different resources.
  • Built for AI agents. dtctl lets agents discover all available commands at runtime, no documentation needed, no upfront configuration. When running inside an AI agent, dtctl automatically switches to structured output that agents can parse and act on, including follow-up suggestions and error context.
  • Built for humans, too. Use tab-autocomplete resource shortcuts like db for dashboards and wf for workflows, -mine to filter your own resources, and an edit command that opens YAML in your $EDITOR and uploads on save. Because dtctl follows familiar command-line patterns, experienced users move fast from day one.
  • Managing multiple environments is simple. Switch contexts between dev, staging, and production with a single command. Authenticate via SSO or API token, run dtctl doctor to verify the setup, and you're ready to go.

For all technical details and the full command reference, visit the dtctl repository on GitHub.

An AI agent modifies a Dynatrace workflow end-to-end

What makes AI agents truly useful is their ability to close the loop: They can discover data, make changes, verify results, and fix what's broken all without handing control back to a human operator.

Here's what such a scenario looks like using dtctl. In this example, a Dynatrace workflow queries the number of Kubernetes pods and sends an email report. The goal is to enhance the query so that it lists every pod with its respective node tolerations, making it a cross-entity query that explores the data model, identifies the correct relationships, and iterates until the output is correct.

Using GitHub Copilot in VS Code, the agent works through the full cycle autonomously:

  • Discover: Explores the Dynatrace data model to find the right entities and relationships: how pods connect to nodes and where tolerations are stored.
  • Iterate: Refines the query step by step until the output matches the goal, then updates the workflow and rebuilds the email report.
  • Apply and run: Pushes the updated workflow to Dynatrace and executes it.
  • Verify: Checks whether the workflow ran successfully and produced the expected results.
  • Fix: If something fails, it reads the error, adjusts the query, and tries again.

The human operator defines only the intent, and the agent handles the rest. Watch this full video walkthrough to see it in action.

Create and modify dashboards without leaving your code editor

One concrete example of what dtctl enables is dashboard creation and management directly from the terminal. Because Dynatrace dashboards are structured data, they can be version-controlled, templated, and automated just like any other code artifact.

To illustrate this, the OpenClaw Gateway Monitoring dashboard shown below was created end-to-end in just a few minutes. A developer used GitHub Copilot in VS Code to create an AI observability dashboard similar to others, tailored specifically for monitoring OpenClaw. The agent then pulled existing Dynatrace AI observability dashboards as templates, adapted the layouts and queries to OpenClaw's monitoring needs, and deployed the results using dtctl; all this was managed by the developer without leaving their IDE.

Figure 2. A custom AI Observability dashboard, created using dtctl.

For day-to-day management, the workflow remains the same, whether executed by an agent or a human: just pull a dashboard, adjust queries or filters, preview the changes, and save the dashbaord. Coding agents can be instructed to update queries across multiple dashboards with a single prompt. And it takes just a single command to promote dashboards from dev to production, or to roll them back instantly if something breaks.

You can take dtctl even further: wire dashboard definitions into your CI/CD pipeline so that, as a service evolves, its dashboards evolve automatically.

Try out dtctl today

dtctl is fully open source and available at dynatrace-oss/dtctl on GitHub, with documentation, skills, and examples to get you started.

Our dtctl Quick Start Guide walks you through the complete setup in under five minutes:

  1. Connect dtctl to your environment.
  2. Run your first query.
  3. Pull a dashboard.
  4. Modify the dashboard queries.
  5. Save your dashboard.

From there, install the agent skill to teach GitHub Copilot, Claude Code, or Cursor how to operate your Dynatrace environment.

The project is in active development. If you hit a bug or have a use case to share, open a GitHub issue or start a discussion, and help us shape the roadmap.

Dynatrace Inc. published this content on March 23, 2026, and is solely responsible for the information contained herein. Distributed via Public Technologies (PUBT), unedited and unaltered, on March 23, 2026 at 19:57 UTC. If you believe the information included in the content is inaccurate or outdated and requires editing or removal, please contact us at [email protected]