Files
cleveragents-core/docs/reference/actor_cli.md
T
freemo f7993d7309
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 16s
CI / build (pull_request) Successful in 21s
CI / quality (pull_request) Successful in 32s
CI / security (pull_request) Successful in 33s
CI / typecheck (pull_request) Successful in 54s
CI / integration_tests (pull_request) Successful in 4m48s
CI / unit_tests (pull_request) Successful in 15m53s
CI / docker (pull_request) Successful in 14s
CI / benchmark-regression (pull_request) Successful in 17m19s
CI / coverage (pull_request) Successful in 26m43s
CI / lint (push) Successful in 13s
CI / build (push) Successful in 15s
CI / quality (push) Successful in 16s
CI / security (push) Successful in 28s
CI / typecheck (push) Successful in 44s
CI / benchmark-regression (push) Has been skipped
CI / integration_tests (push) Successful in 4m0s
CI / benchmark-publish (push) Successful in 12m5s
CI / unit_tests (push) Successful in 13m42s
CI / docker (push) Successful in 1m9s
CI / coverage (push) Has been cancelled
feat(cli): align actor commands to YAML
Align actor add/remove/list/show commands to YAML-first configs,
namespaced names, and --format json|yaml|plain output support.

Changes:
- Add --format option to list, show, add, and update commands
- Add --update flag to add command for updating existing actors
- Add _actor_spec_dict helper for structured output serialization
- Update _print_actor to support format_output rendering
- Add Behave feature tests for CLI format scenarios (11 scenarios)
- Add Robot Framework integration test for show output fields
- Add ASV benchmark for actor CLI parsing overhead
- Add CLI reference documentation for actor commands

ISSUES CLOSED: #288
2026-02-24 19:12:01 +00:00

4.1 KiB

Actor CLI Reference

The agents actor command group manages actor configurations for the CleverAgents v3 actor system.

Commands

Command Description
agents actor add Add actor from YAML/JSON config file
agents actor update Update an existing actor
agents actor remove Remove a custom actor by namespaced name
agents actor list List all registered actors
agents actor show Show actor details
agents actor set-default Set the default actor
agents actor run Run the reactive network with actor configs

Namespaced Names

Actor names follow the [[server:]namespace/]name format. When no namespace is provided, the name defaults to local/. Built-in actors use <provider>/<model> (e.g. openai/gpt-4).

agents actor add

Add a new actor from a YAML or JSON configuration file.

Synopsis

agents actor add <NAME> --config <FILE> [--update] [--unsafe] [--set-default] [--option key=value] [--format FORMAT]

YAML Configuration File

provider: openai
model: gpt-4
temperature: 0.7
max_tokens: 1024
options:
  stream: true

Examples

# Add an actor from YAML config
agents actor add local/my-actor --config ./actors/my-actor.yaml

# Add or update an existing actor
agents actor add local/my-actor --config ./actors/my-actor.yaml --update

# Add with option overrides
agents actor add local/my-actor --config actor.yaml --option temperature=0.9

# Add with JSON output
agents actor add local/my-actor --config actor.yaml --format json

agents actor update

Update an existing actor configuration.

Synopsis

agents actor update <NAME> [--config <FILE>] [--unsafe|--safe] [--set-default] [--option key=value] [--format FORMAT]

Examples

# Update actor with new config
agents actor update local/my-actor --config ./actors/updated.yaml

# Mark actor as safe
agents actor update local/my-actor --safe

# Update with JSON output
agents actor update local/my-actor --format json

agents actor remove

Remove a custom actor by its namespaced name.

Synopsis

agents actor remove <NAME>

Examples

agents actor remove local/my-actor

agents actor list

List all registered actors.

Synopsis

agents actor list [--format FORMAT]

Output Formats

Format Description
rich Rich table with colours (default)
json JSON array of actor objects
yaml YAML list of actor objects
plain Plain text key-value pairs
table ASCII table without Rich styling

Examples

# Default rich table
agents actor list

# JSON output for scripting
agents actor list --format json

# YAML output
agents actor list --format yaml

agents actor show

Show details for a specific actor.

Synopsis

agents actor show <NAME> [--format FORMAT]

Examples

# Rich panel (default)
agents actor show local/my-actor

# JSON output
agents actor show local/my-actor --format json

# YAML output
agents actor show openai/gpt-4 --format yaml

agents actor set-default

Set the default actor used when no actor is specified.

Synopsis

agents actor set-default <NAME>

Examples

agents actor set-default openai/gpt-4

Error Handling

Error Cause
Config file not found Specified config file doesn't exist
Config must be a JSON/YAML object Config file is not a valid object
Config file is required No --config flag provided for add
Actor config is marked unsafe Unsafe config without --unsafe flag
Actor not found Named actor doesn't exist