# rpk ai agent create

> For the complete documentation index, see [llms.txt](https://docs.redpanda.com/llms.txt). Component-specific: [agentic-data-plane-full.txt](https://docs.redpanda.com/agentic-data-plane-full.txt)

---
title: rpk ai agent create
latest-operator-version: v26.2.5
latest-console-tag: v3.14.0
latest-connect-version: 4.117.0
latest-redpanda-tag: v26.2.6
docname: rpk/rpk-ai/rpk-ai-agent-create
page-component-name: agentic-data-plane
page-version: master
page-component-version: master
page-component-title: Agentic Data Plane
page-relative-src-path: rpk/rpk-ai/rpk-ai-agent-create.adoc
page-edit-url: https://github.com/redpanda-data/adp-docs/edit/main/modules/reference/pages/rpk/rpk-ai/rpk-ai-agent-create.adoc
description: Create an agent. Defaults to a managed agent populated from the spec flags; <code>--self-managed</code> registers the metadata-only variant.
page-git-created-date: "2026-06-25"
page-git-modified-date: "2026-09-22"
page-generated-sources:
  - include: streaming:reference:partial$rpk-ai/rpk-ai-agent-create.adoc
    generator: rpk-docs
    version: null
    source: the rpk command help in redpanda-data/streaming-enterprise
page-generated-content: partial
---

<!-- Source: https://docs.redpanda.com/agentic-data-plane/reference/rpk/rpk-ai/rpk-ai-agent-create.md -->

Create an agent. Defaults to a managed agent populated from the spec flags; `--self-managed` registers the metadata-only variant.

A new agent has no access until a policy names it as principal. Pass `--policy-template` to bind a template in the same command, or bind one after create:

```text
rpk ai policy create --agent <name> --template sandboxed
rpk ai policy create --agent <name> --cedar-file policy.cedar
```

`--policy-template` checks the template before creating the agent. If binding it then fails, the agent still exists. The command prints the agent on stdout and exits non-zero, so a script running under `set -e` stops with the agent already created.

## [](#usage)Usage

```bash
rpk ai agent create <name> [flags]
```

## [](#examples)Examples

This section provides examples of how to use `rpk ai agent create`.

Create an agent that can make runtime calls right away

```bash
rpk ai agent create invoice-triage --policy-template sandboxed
```

## [](#flags)Flags

| Value | Type | Description |
| --- | --- | --- |
| --description | string | longer description of the agent’s purpose. |
| --display-name | string | display name. |
| --llm-provider | string | name of the LLM provider resource the agent uses. |
| --max-iterations | int32 | maximum agent loop iterations per invocation. |
| --mcp-server | strings | MCP server resource name the agent may call (repeatable). |
| --model | string | model the agent runs (for example, claude-sonnet-4-6). |
| --policy-template | string | policy template to bind to the new agent: readonly, sandboxed, standard, full (least to most access), or policyTemplates/<id>. Creates the policy <name>-access, as rpk ai policy create --agent <name> --template <template> does. (New in 0.2.110) |
| --self-managed | bool | register a metadata-only self-managed agent (the platform won’t run it). |
| --spec-file | string | path to a JSON/YAML ManagedAgentSpec; enables subagents/agent_card that scalar flags can’t express (mutually exclusive with --self-managed and the spec flags). |
| --system-prompt | string | system prompt for the agent. |
| --tag | stringToString | metadata tag key=value (repeatable). |

## [](#global-flags)Global flags

| Value | Type | Description |
| --- | --- | --- |
| --config | string | Redpanda or rpk config file; default search paths are ~/.config/rpk/rpk.yaml, $PWD/redpanda.yaml, and /etc/redpanda/redpanda.yaml. |
| -X, --config-opt | stringArray | Override rpk configuration settings; -X help for detail or -X list for terser detail. |
| --ignore-profile | bool | Ignore rpk.yaml and redpanda.yaml; use default settings. |
| --profile | string | rpk profile to use. |
| -v, --verbose | bool | Enable verbose logging. |