CLI commands for CRUD on agents#11286
Conversation
|
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 Powered by Oz |
There was a problem hiding this comment.
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
| fn print_agents_table(agents: &[AgentListItem]) { | ||
| fn print_agents_table(agents: &[AgentSkillItem]) { | ||
| if agents.is_empty() { | ||
| println!("No agents found."); |
There was a problem hiding this comment.
💡 [SUGGESTION] This command now lists skills, so the empty-state message should use "skills" instead of "agents".
| println!("No agents found."); | |
| println!("No skills found."); |
a7d35e9 to
9b4473c
Compare
|
|
||
| ## Goals | ||
| - Make `oz agent list` mean "list named agents". | ||
| - Preserve skill discovery by renaming the existing command to `oz agent skills`. |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
| pub secrets: Vec<String>, | ||
|
|
||
| /// Attach a skill to the agent. Repeat the flag for multiple skills. | ||
| #[arg(long = "skill", value_name = "SPEC")] |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Force of habit from places we refer to skill specs - will update!
9b4473c to
1c64df2
Compare
1c64df2 to
a88690b
Compare
Description
This adds a set of CLI commands for operating on named agents:
oz agent create [options]to define a new agentoz agent listandoz agent getto query agentsoz agent updateto patch agent configs (setting a base model, adding/removing skills, etc.)oz agent deleteto delete an agentTesting
./script/runScreenshots / Videos
https://www.loom.com/share/0f7f3f142ebe46f79582c22a6027b34e
Agent Mode
Changelog Entries for Stable
CHANGELOG-IMPROVEMENT: The Oz CLI now has commands for operating over reusable agents