rpk ai agent create
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:
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.
Examples
This section provides examples of how to use rpk ai agent create.
Create an agent that can make runtime calls right away
rpk ai agent create invoice-triage --policy-template sandboxed
Flags
| Value | Type | Description |
|---|---|---|
|
string |
longer description of the agent’s purpose. |
|
string |
display name. |
|
string |
name of the LLM provider resource the agent uses. |
|
int32 |
maximum agent loop iterations per invocation. |
|
strings |
MCP server resource name the agent may call ( |
|
string |
model the agent runs (for example, claude-sonnet-4-6). |
|
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 |
|
bool |
register a metadata-only self-managed agent (the platform won’t run it). |
|
string |
path to a JSON/YAML ManagedAgentSpec; enables subagents/agent_card that scalar flags can’t express (mutually exclusive with |
|
string |
system prompt for the agent. |
|
stringToString |
metadata tag key=value ( |
Global flags
| Value | Type | Description |
|---|---|---|
|
string |
Redpanda or |
|
stringArray |
Override |
|
bool |
Ignore |
|
string |
|
|
bool |
Enable verbose logging. |