Skip to content

CLI commands for CRUD on agents#11286

Merged
bnavetta merged 3 commits into
masterfrom
ben/remote-1696-add-oz-cli-crud-commands-for-named-agents
May 22, 2026
Merged

CLI commands for CRUD on agents#11286
bnavetta merged 3 commits into
masterfrom
ben/remote-1696-add-oz-cli-crud-commands-for-named-agents

Conversation

@bnavetta
Copy link
Copy Markdown
Contributor

Description

This adds a set of CLI commands for operating on named agents:

  • oz agent create [options] to define a new agent
  • oz agent list and oz agent get to query agents
  • oz agent update to patch agent configs (setting a base model, adding/removing skills, etc.)
  • oz agent delete to delete an agent

Testing

  • Added CLI validation tests
  • I have manually tested my changes locally with ./script/run

Screenshots / Videos

https://www.loom.com/share/0f7f3f142ebe46f79582c22a6027b34e

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI Agent Mode

Changelog Entries for Stable

CHANGELOG-IMPROVEMENT: The Oz CLI now has commands for operating over reusable agents

@cla-bot cla-bot Bot added the cla-signed label May 19, 2026
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 19, 2026

@bnavetta

I'm starting a first review of this pull request.

You can view the conversation on Warp.

I completed the review and no human review was requested for this pull request.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

This PR adds named-agent CRUD commands to the Oz CLI, moves the previous skill-discovery behavior to oz agent skills, and wires the client-side API/output support for list/get/create/update/delete.

Concerns

  • The renamed skill-discovery command still has one empty-state message that says agents instead of skills.

Verdict

Found: 0 critical, 0 important, 1 suggestions

Approve with nits

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Comment thread app/src/ai/agent_sdk/agent_config.rs Outdated
fn print_agents_table(agents: &[AgentListItem]) {
fn print_agents_table(agents: &[AgentSkillItem]) {
if agents.is_empty() {
println!("No agents found.");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 [SUGGESTION] This command now lists skills, so the empty-state message should use "skills" instead of "agents".

Suggested change
println!("No agents found.");
println!("No skills found.");

@bnavetta bnavetta force-pushed the ben/remote-1696-add-oz-cli-crud-commands-for-named-agents branch from a7d35e9 to 9b4473c Compare May 20, 2026 11:10
@bnavetta bnavetta requested a review from a team May 20, 2026 11:11

## Goals
- Make `oz agent list` mean "list named agents".
- Preserve skill discovery by renaming the existing command to `oz agent skills`.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dunno if we have established guidance around breaking changes for CLI commands given usage but do we want to do something more mindful here around ensuring that oz agent list retains the skills-focused behavior for existing users?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't really have existing guidance, no - this is the first breaking change I can think of

The oz agent list command does print out a message that if you're looking for skills, they're now in oz agent skills! It won't help with programmatic usage, but the skill-based version of this command wasn't really set up for scripting anyways.

4. `oz agent list` supports `--sort-order asc` and `--sort-order desc`. If omitted, name sorting defaults to ascending, and timestamp sorting defaults to descending.
5. Sorting is performed client-side after the API response is fetched and before rendering pretty, text, or ndjson output.
6. `oz agent get <uid>` retrieves a single named agent by UID.
7. `oz agent create` creates a named agent. `--name` is required. Optional fields are accepted for the fields supported by the API: description, secrets, skills, base model, and default environment.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Totally optional: I wonder if it would be good for programmability if these create/update commands also accepted a file (or JSON payload via stdin) as the input?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, completely agree! I'm hesitant to do it in this PR though, since I think we'll need to be really intentional about what the file format is. It'd also be useful to think through how this could work for combined definitions of an agent and skills/scripts it should have access to.

Comment thread crates/warp_cli/src/agent.rs Outdated
pub secrets: Vec<String>,

/// Attach a skill to the agent. Repeat the flag for multiple skills.
#[arg(long = "skill", value_name = "SPEC")]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is thee a reason we refer to it as SPEC and not SKILL here or elsewhere? I can see this being potentially confusing since it surfaces in help docs.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Force of habit from places we refer to skill specs - will update!

@bnavetta bnavetta force-pushed the ben/remote-1696-add-oz-cli-crud-commands-for-named-agents branch from 9b4473c to 1c64df2 Compare May 22, 2026 18:00
@bnavetta bnavetta force-pushed the ben/remote-1696-add-oz-cli-crud-commands-for-named-agents branch from 1c64df2 to a88690b Compare May 22, 2026 20:34
@bnavetta bnavetta enabled auto-merge (squash) May 22, 2026 20:35
@bnavetta bnavetta merged commit b385a14 into master May 22, 2026
25 checks passed
@bnavetta bnavetta deleted the ben/remote-1696-add-oz-cli-crud-commands-for-named-agents branch May 22, 2026 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants