Actors and evaluations
Shape who is in an environment with actors, limits and files, and choose the evals and tool-call judge that grade its calls
Use these commands to control who takes part in an environment’s simulated calls (actors), what they can do and read, and how the calls are graded (evals and the tool-call judge). For the same work in the dashboard, see Add evaluations.
- Signed in to the CLI with a personal key pair (see Sign in)
- An environment in a workspace with environment versioning (see Environments)
- A CLI with
fagi sim, which ships in a later CLI release
The actor commands and files add need platform v1.60.0 or later; on an older one they exit 1 with platform_too_old and change nothing.
evaluations add --run, evaluations remove, evaluations run and actors remove ask for confirmation on a terminal, because they remove data or spend credits. fagi sim flags covers --yes in scripts.
Read an environment’s actors
ENV_ID is the environment’s ID from fagi sim env list, and ACTOR_ID is the ID column of fagi sim env actors list ENV_ID.
fagi sim env actors list ENV_ID
fagi sim env actors show ENV_ID ACTOR_ID --scenario refund-flow
| Command | What it does |
|---|---|
fagi sim env actors list ENV_ID | List the actors, the caller’s side first, with ID, NAME, ROLE, SIDE, CHANNEL, PLAY, SCENARIOS and REMOVABLE columns |
fagi sim env actors show ENV_ID ACTOR_ID | Show one actor’s record, what it may do, what it sees and what it never sees |
show --scenario KEY shows the actor in the scenario with this key. If a key is not found, try the NAME that fagi sim scenarios list --env ENV_ID prints for that scenario.
list shows your unsaved changes when there are any, and says so on stderr; when those changes are stale, it shows the saved version. Runs always use the saved version. The SCENARIOS and REMOVABLE columns are judged against the unsaved suite when one is open. fagi sim env show ENV_ID --section actors lists the world’s personas, not these actors.
fagi sim env actors list ENV_ID --json prints the actors plus everything you need to edit them:
| Key | What it holds |
|---|---|
revision | The actors’ current revision, for --expected-revision |
limits, limit_fields | The current limits and their defaults |
unresolved | The policy points still to decide |
knowledge_sources | The uploaded files actors can read |
record_schemas, field_options, channel_options, actions | The allowed values for actor fields |
Review and save your changes
The actor, limit, policy and file commands on this page all write to the environment’s unsaved changes. Runs don’t use them until you save. Evals are different: they apply right away.
fagi sim env diff ENV_ID
fagi sim env save ENV_ID # or: fagi sim env discard ENV_ID
Environments covers diff, save and discard.
- A write is refused (exit 1,
draft_changed) if the actors changed after the CLI read them just before writing.--expected-revision N, therevisionfromfagi sim env actors list ENV_ID --json, checks against the revision you reviewed instead. It cannot be combined with--dry-run(exit 2) - When the unsaved changes are stale, a write discards them, warns and asks for confirmation
- Avoid editing actors while
fagi sim env chatis working - These writes are not safe to repeat blindly. After a network error or timeout (exit 6), run
fagi sim env actors list ENV_ID --jsonto check whether the change landed before you retry
Add, change or remove an actor
fagi sim env actors add ENV_ID --input-json '{"name":"Sam Ortiz","side":"world","role":"auditor"}'
fagi sim env actors update ENV_ID ACTOR_ID --input-json '{"goal":"Hold refunds over 500"}'
fagi sim env actors remove ENV_ID ACTOR_ID --dry-run --json
fagi sim env actors remove ENV_ID ACTOR_ID --yes --json
add takes a JSON object of the new actor’s fields and update takes only the fields to change. Allowed fields include name, role, side (caller or world), channel, goal, facts, files, records, permitted_actions, model, max_turns and max_lines; fagi sim env actors add --help lists them all. Any other key exits 2. list and show mask secrets as [REDACTED], so send only the fields you are changing, never a copied actor record; a "[REDACTED]" value exits 2.
| Flag | What it does |
|---|---|
--input-json JSON | The fields as a JSON object: inline, @FILE, or - for stdin |
--from-file FILE | Read the fields from a JSON file instead |
--id ID | On add, the new actor’s ID, 1-64 characters. By default the server makes one from the name |
--share-action ACTION | Confirm that an action held by exactly one other actor may be shared with this one, so both hold it. Repeatable. Without it, such an action is refused |
--dry-run | Check the edit on the server and write nothing. Exits 1 when it has problems or conflicts |
--expected-revision N | Check against revision N, the one you reviewed, instead of the CLI’s own read just before the write |
On update, each field you send replaces the stored value. Lists are replaced whole, so {"files": []} removes every file the actor reads. Sending files or records rebuilds both: several files entries become one, and record entries on the same collection all take the last one’s filter, which can change what the actor may read. For the other replacement rules, see fagi sim env actors update --help.
To change an actor’s prompt, identity or other persona fields, ask the builder with fagi sim env chat ENV_ID (see Environments).
remove is refused (exit 1) while a scenario uses the actor or another actor refers to it. removable and removal_blocked_by in list --json say why. They are judged against the unsaved suite, so an actor shown as removable can still be used by saved scenarios: review the suite with fagi sim suites diff --env ENV_ID before you save. An unknown ACTOR_ID exits 4.
A passing --dry-run does not guarantee the real write succeeds; the server checks again when you write.
Set actor limits
fagi sim env actors limits set ENV_ID --input-json '{"max_active":2}'
fagi sim env actors limits set ENV_ID --reset max_active --json
limits set takes a JSON object of limits to change, each a value or null for no limit. --reset KEY returns one limit to its default and can be repeated. A key not under limit_fields exits 2 and nothing is written. It also takes --from-file.
Limits you don’t name keep their values. If a stored limit is invalid, the write fails until you set or --reset that limit too.
Accept an open policy point
When the builder can’t turn a policy into an actor’s actions or knowledge, it lists the point under unresolved. To accept the actors as they are for that point:
fagi sim env actors unresolved accept ENV_ID --policy 'Refunds over $500 need two people'
Copy the text exactly from unresolved in fagi sim env actors list ENV_ID --json. A point longer than 500 characters, or stored with spaces around it, can’t be accepted here. Every point with that text leaves the list. To undo, run fagi sim env discard ENV_ID, which drops all unsaved changes.
Give actors a file to read
fagi sim env files add ENV_ID ./refund-policy.md
files add uploads one UTF-8 text file of at most 1 MiB, in a format listed under upload in fagi sim env actors list ENV_ID --json. A .json file must be valid JSON without a BOM. Stdin is not read. Nothing replaces an uploaded file: if the name is taken (exit 1), rename the file and add it again.
Uploading a file gives it to no actor. Add it to an actor’s files with fagi sim env actors update, which replaces that actor’s list; the uploaded file names are listed under knowledge_sources in fagi sim env actors list ENV_ID --json.
Warning
Actors can read these files, so never upload grader material or secrets. The CLI refuses (exit 2) symlinks, private keys and your fagi credentials, but cannot detect secrets inside ordinary text.
Attach and change evals
NAME is the NAME column of fagi sim env evaluations available ENV_ID, and EVAL_CONFIG_ID is the ID column of fagi sim env evaluations list ENV_ID.
fagi sim env evaluations available ENV_ID
fagi sim env evaluations add ENV_ID audio_quality
fagi sim env evaluations list ENV_ID
| Command | What it does |
|---|---|
fagi sim env evaluations list ENV_ID | List the evals that grade the environment’s runs, with ID, NAME, SOURCE, RUNNABLE, EDITABLE and CREDITS_PER_RUN columns. --json also includes enable_tool_evaluation. An environment still building lists none |
fagi sim env evaluations available ENV_ID | List the catalog evals for its modality that are not attached yet, with what each costs per graded call. Exits 1 while the environment is still building |
fagi sim env evaluations add ENV_ID NAME | Attach one eval by its exact name. It grades later runs’ calls; calls that already ran keep their verdicts. An environment holds at most eight evals |
fagi sim env evaluations update ENV_ID EVAL_CONFIG_ID --input-json JSON | Change name, config, mapping, model, filters, error_localizer or kb_id (null clears it). Nothing is graded again |
fagi sim env evaluations remove ENV_ID EVAL_CONFIG_ID | Stop grading later runs by this eval. Past verdicts are kept. Asks for confirmation |
add --run TEST_EXECUTION_ID also grades that finished run’s calls that have no verdict for the eval yet. This spends judge credits, so it asks for confirmation on a terminal. With --json it prints the run’s execution_id and the queued and skipped call counts (queued, skipped_existing, skipped_in_flight, skipped_pending, completed_calls). Adding a name the environment already has reuses it instead of adding it twice.
evaluations add, with or without --run, is not safe to repeat blindly. After a network error or timeout (exit 6), run fagi sim env evaluations list ENV_ID --json to check whether the change landed before you retry. evaluations update is safe to repeat.
fagi sim env evaluations add ENV_ID audio_quality --run TEST_EXECUTION_ID --yes --json
fagi sim env evaluations update ENV_ID EVAL_CONFIG_ID --input-json '{"model": "turing_large"}'
fagi sim env evaluations remove ENV_ID EVAL_CONFIG_ID --yes --json
Evals the environment reports itself (EDITABLE is false in list) can’t be updated; if you remove one, it comes back the next time it is graded.
Turn the tool-call judge on or off
fagi sim env evaluations tool-call ENV_ID --enable
fagi sim env evaluations tool-call ENV_ID --disable --json
When the judge is on, every later call is read once more by a judge that grades the tools the agent used, which spends judge credits. Past calls are untouched either way. The judge is not one of the eight evals and doesn’t appear in the list table; list --json shows the switch as enable_tool_evaluation. Turning it on is refused (exit 1) for a voice environment whose agent has no version yet. Repeating the command is harmless.
Grade a finished run again
TEST_EXECUTION_ID is the ID column of fagi sim runs list --env ENV_ID. --run also takes the Run ID (the job_id that fagi sim run prints).
fagi sim env evaluations run ENV_ID --run TEST_EXECUTION_ID --evaluation audio_quality --wait --yes --json
{"execution_id": "TEST_EXECUTION_ID", "call_execution_count": 12, "execution_status": "completed"}
evaluations run grades every call of a completed run again with the evals you name, without rerunning the calls. Each eval’s earlier score on those calls is replaced. It spends judge credits and overwrites scores, so it asks for confirmation on a terminal. A repeat while grading is still running is refused (exit 1). execution_status appears only with --wait.
| Flag | What it does |
|---|---|
--run TEST_EXECUTION_ID | The run to grade; a RUN_ID works too |
--evaluation EVAL | An eval ID or name from fagi sim env evaluations list. Repeatable |
--tool-evaluation=true or =false | Also save the tool-call judge switch on the environment first |
--wait | Poll until grading ends, for at most --wait-timeout (default 60m) |
--interval N | Seconds between polls with --wait (default 2) |
Exit codes (the others follow the shared exit codes):
0: grading finished (with--wait) or was queued (without)8: grading failed or was canceled; read the run before you rerun6: the wait ended (timeout or Ctrl-C), but grading continues; check later withfagi sim runs list --env ENV_ID
Dive deeper
Questions & Discussion