UAT: agents actor show JSON/YAML output uses flat actor fields instead of spec-required structured actor_details/options/graph_structure/tools/access/usage sections #6487

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

Summary

agents actor show <NAME> --format json returns a flat dict of raw actor fields under data. The spec requires a structured response with six named sections: actor_details, options, graph_structure, tools, access, and usage. The command field is also empty.

Spec Reference

docs/specification.md lines 5655–5711 — JSON output for agents actor show local/reviewer:

{
  "command": "agents actor show local/reviewer",
  "status": "ok",
  "exit_code": 0,
  "data": {
    "actor_details": {
      "name": "local/reviewer",
      "provider": "openai",
      "model": "gpt-4",
      "default": true,
      "builtin": false,
      "unsafe": false,
      "type": "graph",
      "created": "2026-02-08T12:35:00Z",
      "updated": "2026-02-08T12:40:00Z",
      "config": "./actors/reviewer.yaml",
      "config_hash": "9c4e2a1"
    },
    "options": { "temperature": 0.2, "max_tokens": 2048, "top_p": 1.0 },
    "graph_structure": { "nodes": 3, "edges": 4, "entry": "analyze", "exit": "report" },
    "tools": [...],
    "access": { "unsafe": false, "filesystem": "allowed", "network": "restricted" },
    "usage": { "referenced_by_actions": "1 (local/code-coverage)", "active_in_sessions": 0, "total_runs": 14, "avg_cost_per_run": "$0.0032" }
  },
  "timing": { "duration_ms": 78 },
  "messages": [{ "level": "ok", "text": "Actor loaded" }]
}

Code Location

src/cleveragents/cli/commands/actor.py, lines 397–418 (_actor_spec_dict) and 934–941 (show command):

def _actor_spec_dict(actor: Actor) -> dict[str, object]:
    """Return actor data using spec field names for format_output."""
    result: dict[str, object] = {
        "name": actor.name,
        "provider": actor.provider,
        "model": actor.model,
        "unsafe": actor.unsafe,
        "is_default": actor.is_default,
        "is_built_in": actor.is_built_in,
        "config_hash": actor.config_hash,
        "schema_version": actor.schema_version,
        "updated_at": actor.updated_at.isoformat(),
    }
    ...
    return result  # ← flat dict, not structured per spec

The show command calls _print_actor(actor, ..., fmt=fmt) which calls format_output(_actor_spec_dict(actor), fmt) — a flat dict instead of the spec-required nested structure.

Steps to Reproduce

agents actor show openai/gpt-4o --format json

Actual output (abbreviated):

{
  "command": "",
  "data": {
    "name": "openai/gpt-4o",
    "provider": "Openai",
    "model": "gpt-4o",
    "unsafe": false,
    "is_default": true,
    "is_built_in": true,
    "config_hash": "...",
    "schema_version": "1.0",
    "updated_at": "...",
    "graph_descriptor": {...},
    "config_blob": {...}
  }
}

Expected vs Actual

Field Expected Actual
command "agents actor show <NAME>" "" (empty)
data.actor_details Structured section with name/provider/model/default/builtin/unsafe/type/created/updated/config/config_hash Missing — fields at top level
data.options {temperature, max_tokens, top_p} Missing
data.graph_structure {nodes, edges, entry, exit} Missing (raw graph_descriptor blob instead)
data.tools Array of {tool, read_only, safe} Missing
data.access {unsafe, filesystem, network} Missing
data.usage {referenced_by_actions, active_in_sessions, total_runs, avg_cost_per_run} Missing
messages[0].text "Actor loaded" "ok"

Impact

Tooling parsing agents actor show JSON output cannot find any of the spec-required sections. The raw config_blob and graph_descriptor are exposed instead of the structured, human-readable sections.


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

## Summary `agents actor show <NAME> --format json` returns a flat dict of raw actor fields under `data`. The spec requires a structured response with six named sections: `actor_details`, `options`, `graph_structure`, `tools`, `access`, and `usage`. The `command` field is also empty. ## Spec Reference `docs/specification.md` lines 5655–5711 — JSON output for `agents actor show local/reviewer`: ```json { "command": "agents actor show local/reviewer", "status": "ok", "exit_code": 0, "data": { "actor_details": { "name": "local/reviewer", "provider": "openai", "model": "gpt-4", "default": true, "builtin": false, "unsafe": false, "type": "graph", "created": "2026-02-08T12:35:00Z", "updated": "2026-02-08T12:40:00Z", "config": "./actors/reviewer.yaml", "config_hash": "9c4e2a1" }, "options": { "temperature": 0.2, "max_tokens": 2048, "top_p": 1.0 }, "graph_structure": { "nodes": 3, "edges": 4, "entry": "analyze", "exit": "report" }, "tools": [...], "access": { "unsafe": false, "filesystem": "allowed", "network": "restricted" }, "usage": { "referenced_by_actions": "1 (local/code-coverage)", "active_in_sessions": 0, "total_runs": 14, "avg_cost_per_run": "$0.0032" } }, "timing": { "duration_ms": 78 }, "messages": [{ "level": "ok", "text": "Actor loaded" }] } ``` ## Code Location `src/cleveragents/cli/commands/actor.py`, lines 397–418 (`_actor_spec_dict`) and 934–941 (`show` command): ```python def _actor_spec_dict(actor: Actor) -> dict[str, object]: """Return actor data using spec field names for format_output.""" result: dict[str, object] = { "name": actor.name, "provider": actor.provider, "model": actor.model, "unsafe": actor.unsafe, "is_default": actor.is_default, "is_built_in": actor.is_built_in, "config_hash": actor.config_hash, "schema_version": actor.schema_version, "updated_at": actor.updated_at.isoformat(), } ... return result # ← flat dict, not structured per spec ``` The `show` command calls `_print_actor(actor, ..., fmt=fmt)` which calls `format_output(_actor_spec_dict(actor), fmt)` — a flat dict instead of the spec-required nested structure. ## Steps to Reproduce ```bash agents actor show openai/gpt-4o --format json ``` Actual output (abbreviated): ```json { "command": "", "data": { "name": "openai/gpt-4o", "provider": "Openai", "model": "gpt-4o", "unsafe": false, "is_default": true, "is_built_in": true, "config_hash": "...", "schema_version": "1.0", "updated_at": "...", "graph_descriptor": {...}, "config_blob": {...} } } ``` ## Expected vs Actual | Field | Expected | Actual | |---|---|---| | `command` | `"agents actor show <NAME>"` | `""` (empty) | | `data.actor_details` | Structured section with name/provider/model/default/builtin/unsafe/type/created/updated/config/config_hash | Missing — fields at top level | | `data.options` | `{temperature, max_tokens, top_p}` | Missing | | `data.graph_structure` | `{nodes, edges, entry, exit}` | Missing (raw `graph_descriptor` blob instead) | | `data.tools` | Array of `{tool, read_only, safe}` | Missing | | `data.access` | `{unsafe, filesystem, network}` | Missing | | `data.usage` | `{referenced_by_actions, active_in_sessions, total_runs, avg_cost_per_run}` | Missing | | `messages[0].text` | `"Actor loaded"` | `"ok"` | ## Impact Tooling parsing `agents actor show` JSON output cannot find any of the spec-required sections. The raw `config_blob` and `graph_descriptor` are exposed instead of the structured, human-readable sections. --- **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#6487
No description provided.