Agentic Data Plane
beta

Use the ADP CLI

The ADP command-line interface, rpk ai, manages Agentic Data Plane (ADP) resources from your terminal. It drives the same control surface as the ADP UI: large language model (LLM) providers, Model Context Protocol (MCP) servers, OAuth providers and clients, and agents. Because every action is a command, you can script it and run it in continuous integration.

The ADP CLI, also called the Redpanda AI CLI, runs as an rpk plugin, so you install and run it through your existing rpk setup.

After reading this page, you will be able to:

  • Install the ADP CLI and connect it to an AI Gateway

  • Manage ADP resources from the terminal: LLM providers, MCP servers, OAuth providers and clients, and agents

  • Format command output for scripts and pipelines

Install the CLI

The ADP CLI is an rpk managed plugin. Install rpk first (see Install or Update rpk), then install the plugin:

rpk ai install

Update the plugin later with rpk ai upgrade, and remove it with rpk ai uninstall.

Connect to an AI Gateway

The rpk ai command is self-contained: it has its own login and its own environment selection, independent of any rpk cloud session. You sign in once, choose an ADP environment, and rpk ai targets that environment’s AI Gateway for every command.

  1. Sign in to Redpanda Cloud. This runs an OAuth device-authorization flow in your browser, caches credentials in ~/.rpai/credentials (readable only by you), then lists the ADP environments in your organization so you can pick one:

    rpk ai auth login
  2. List the environments available to you, and switch the active one by name or ID:

    rpk ai env list
    rpk ai env use <environment>

    In these commands, <environment> is the name or ID of an ADP environment. rpk ai env use repoints the active profile at that environment’s AI Gateway in place. Inspect the resolved environment and token state at any time with rpk ai env show and rpk ai auth status.

  3. Verify the connection:

    rpk ai llm list

For the full setup walkthrough, including token expiry behavior and the supported environment variables, see Use rpk ai for local development.

To target a different AI Gateway URL for a single command without switching environments, pass --rpai-endpoint:

rpk ai --rpai-endpoint https://aigw.<cluster-id>.clusters.cloud.redpanda.com llm list

This overrides the selected environment’s AI Gateway URL for that one command; the flag is not bound to an environment variable. For a local or manual gateway you use repeatedly, define it once as an environment with rpk ai env add:

rpk ai env add local --ai-gateway-url http://localhost:8090 --auth-mode none
rpk ai env use local

Manage resources

Each ADP resource has its own command group, and each group supports the standard create, get, list, update, and delete actions. The model catalog is read-only.

Command Manages Reference

rpk ai llm

LLM providers (OpenAI, Anthropic, Google, AWS Bedrock, and OpenAI-compatible endpoints)

rpk ai mcp

MCP servers and their tools

rpk ai oauth

OAuth providers for user-delegated MCP connections

rpk ai oauth-client

OAuth clients that external tools use to reach an MCP server

rpk ai agent

Agents in the agent registry

rpk ai model

The model catalog (read-only discovery)

For example, to create and inspect an LLM provider:

rpk ai llm create --name openai --type openai --api-key-ref OPENAI_API_KEY
rpk ai llm get openai

In this command, --api-key-ref names a secret already stored in ADP. The CLI never takes a raw API key, so secrets stay out of your shell history and out of any file you commit.

To create, update, and delete resources declaratively from YAML manifests instead of imperative flags, see Manage Resources with GitOps.

Format command output

Every list and get command honors -o (--format):

Format Use

table

Default. Human-readable columns.

wide

Table with extra columns.

json

Machine-readable JSON for scripts and jq.

yaml

YAML. A get -o yaml dump is a complete manifest you can edit and reapply.

markdown

Pipe-friendly tables for documents.

Set a default for the session with the RPAI_FORMAT environment variable. The -o flag always wins when both are set.