UAT: agents actor add JSON/YAML output uses flat actor fields instead of spec-required actor_added/config/capabilities/tools sections; command field is empty #6495

Open
opened 2026-04-09 21:10:06 +00:00 by HAL9000 · 0 comments
Owner

Summary

agents actor add <NAME> --config <FILE> --format json returns a flat dict of raw actor fields under data. The spec requires a structured response with four named sections: actor_added, config, capabilities, and tools. The command field is also empty.

Spec Reference

docs/specification.md lines 5026–5067 — JSON output for agents actor add --config ./actors/reviewer.yaml:

{
  "command": "agents actor add --config ./actors/reviewer.yaml",
  "status": "ok",
  "exit_code": 0,
  "data": {
    "actor_added": {
      "name": "local/reviewer",
      "provider": "openai",
      "model": "gpt-4",
      "default": true,
      "unsafe": false,
      "type": "graph"
    },
    "config": {
      "path": "./actors/reviewer.yaml",
      "hash": "8b3f3d2",
      "options": 4,
      "nodes": 3,
      "edges": 4
    },
    "capabilities": ["code review", "diff summarization", "lint guidance"],
    "tools": [
      { "tool": "read_file", "read_only": true, "safe": true },
      ...
    ]
  },
  "timing": { "duration_ms": 95 },
  "messages": [{ "level": "ok", "text": "Actor added" }]
}

Code Location

src/cleveragents/cli/commands/actor.py, lines 644–655 (add command):

title = "Actor updated" if update_existing else "Actor added"
_print_actor(
    actor,
    title=title,
    fmt=fmt,
    config_path=config,
    show_add_panels=(not update_existing),
)

_print_actor at lines 421–498 calls format_output(_actor_spec_dict(actor), fmt) for non-rich formats — a flat dict instead of the spec-required nested structure.

Steps to Reproduce

agents actor add local/test-actor --config ./test-actor.yaml --format json

Actual output (abbreviated):

{
  "command": "",
  "data": {
    "name": "local/test-actor",
    "provider": "openai",
    "model": "gpt-4o",
    "unsafe": false,
    "is_default": false,
    "is_built_in": false,
    "config_hash": "...",
    ...
  }
}

Expected vs Actual

Field Expected Actual
command "agents actor add --config <FILE>" "" (empty)
data.actor_added {name, provider, model, default, unsafe, type} Missing — fields at top level
data.config {path, hash, options, nodes, edges} Missing
data.capabilities Array of capability strings Missing
data.tools Array of {tool, read_only, safe} Missing
messages[0].text "Actor added" "ok"

Impact

Automation scripts parsing agents actor add --format json cannot find the spec-required sections. The raw internal fields (is_built_in, schema_version, config_blob, graph_descriptor) are exposed instead of the clean structured output.


Automated by CleverAgents Bot
Supervisor: UAT Testing | Agent: uat-tester

## Summary `agents actor add <NAME> --config <FILE> --format json` returns a flat dict of raw actor fields under `data`. The spec requires a structured response with four named sections: `actor_added`, `config`, `capabilities`, and `tools`. The `command` field is also empty. ## Spec Reference `docs/specification.md` lines 5026–5067 — JSON output for `agents actor add --config ./actors/reviewer.yaml`: ```json { "command": "agents actor add --config ./actors/reviewer.yaml", "status": "ok", "exit_code": 0, "data": { "actor_added": { "name": "local/reviewer", "provider": "openai", "model": "gpt-4", "default": true, "unsafe": false, "type": "graph" }, "config": { "path": "./actors/reviewer.yaml", "hash": "8b3f3d2", "options": 4, "nodes": 3, "edges": 4 }, "capabilities": ["code review", "diff summarization", "lint guidance"], "tools": [ { "tool": "read_file", "read_only": true, "safe": true }, ... ] }, "timing": { "duration_ms": 95 }, "messages": [{ "level": "ok", "text": "Actor added" }] } ``` ## Code Location `src/cleveragents/cli/commands/actor.py`, lines 644–655 (`add` command): ```python title = "Actor updated" if update_existing else "Actor added" _print_actor( actor, title=title, fmt=fmt, config_path=config, show_add_panels=(not update_existing), ) ``` `_print_actor` at lines 421–498 calls `format_output(_actor_spec_dict(actor), fmt)` for non-rich formats — a flat dict instead of the spec-required nested structure. ## Steps to Reproduce ```bash agents actor add local/test-actor --config ./test-actor.yaml --format json ``` Actual output (abbreviated): ```json { "command": "", "data": { "name": "local/test-actor", "provider": "openai", "model": "gpt-4o", "unsafe": false, "is_default": false, "is_built_in": false, "config_hash": "...", ... } } ``` ## Expected vs Actual | Field | Expected | Actual | |---|---|---| | `command` | `"agents actor add --config <FILE>"` | `""` (empty) | | `data.actor_added` | `{name, provider, model, default, unsafe, type}` | Missing — fields at top level | | `data.config` | `{path, hash, options, nodes, edges}` | Missing | | `data.capabilities` | Array of capability strings | Missing | | `data.tools` | Array of `{tool, read_only, safe}` | Missing | | `messages[0].text` | `"Actor added"` | `"ok"` | ## Impact Automation scripts parsing `agents actor add --format json` cannot find the spec-required sections. The raw internal fields (`is_built_in`, `schema_version`, `config_blob`, `graph_descriptor`) are exposed instead of the clean structured output. --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cleveragents/cleveragents-core#6495
No description provided.