You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a schema-driven agr workflow capability that executes multiple AGR commands from YAML or JSON files.
The workflow format should reuse the widely familiar GitHub Actions vocabulary and expression style to reduce the learning cost for users and make workflows easier for AI systems to generate. It must remain an AGR-specific local workflow format rather than claim compatibility with GitHub Actions.
Problem
Multi-step AGR tasks currently require shell glue to:
execute multiple AGR commands in order;
extract resource IDs with jq;
pass outputs into later commands;
wait for asynchronous resource transitions;
clean up resources after success, failure, or cancellation;
keep human-readable and machine-readable output separate.
The existing temporary-instance overlay already supports a focused create -> execute -> cleanup flow for instance code run and instance exec, but there is no reusable format for longer workflows such as:
create a Tool;
wait for it to become active;
create an Instance;
upload files;
run code or a remote command;
download results;
delete the Instance and Tool even when an earlier step fails.
Goals
Keep the format familiar to users of GitHub Actions.
Make workflows straightforward for AI systems to generate from agr schema.
Use the existing AGR command IDs, validation, structured results, effects, errors, and cleanup behavior as the source of truth.
Support both human-authored YAML and machine-authored JSON without defining two different semantics.
Provide deterministic validation, output propagation, cancellation, and cleanup.
Proposed format
Use JSON as the canonical data model and support YAML 1.2 as an equivalent serialization.
Validate both formats with a published JSON Schema 2020-12 document.
Validate the entire workflow before executing the first remote mutation.
Redact secret values from diagnostics and structured output.
Do not allow credentials or secret values to be embedded as a first-class workflow secret store; use existing AGR configuration, environment variables, or a future credential-provider interface.
--dry-run should report the ordered steps and known effects without invoking remote mutations.
Validation failures must use deterministic AGR structured errors and exit codes.
Non-goals for MVP
Full GitHub Actions compatibility.
Event triggers such as on.
Hosted runners or runs-on.
Marketplace actions.
Arbitrary local run: shell commands.
Multiple jobs, DAG scheduling, implicit parallelism, or matrices.
Loops, dynamic fan-out, or reusable remote workflow services.
General-purpose CI/CD orchestration.
Workflow persistence, remote run history, or resume from checkpoints.
These can be evaluated later only when supported by demonstrated AGR use cases.
Relationship to existing capabilities
Reuse agr schema for command discovery and validation.
Reuse AGR JSON/NDJSON envelopes, effects, failures, hints, and exit codes.
Generalize the existing temporary-instance overlay and cleanup policy instead of building a second cleanup model.
Summary
Add a schema-driven
agr workflowcapability that executes multiple AGR commands from YAML or JSON files.The workflow format should reuse the widely familiar GitHub Actions vocabulary and expression style to reduce the learning cost for users and make workflows easier for AI systems to generate. It must remain an AGR-specific local workflow format rather than claim compatibility with GitHub Actions.
Problem
Multi-step AGR tasks currently require shell glue to:
jq;The existing temporary-instance overlay already supports a focused create -> execute -> cleanup flow for
instance code runandinstance exec, but there is no reusable format for longer workflows such as:Goals
agr schema.Proposed format
Use JSON as the canonical data model and support YAML 1.2 as an equivalent serialization.
Validate both formats with a published JSON Schema 2020-12 document.
Suggested file names:
agr-workflow.yaml*.agr.yaml*.agr.jsonExample:
agr://<command-id>clearly identifies an AGR command and avoids implying that the file can be executed directly by GitHub Actions.Familiar vocabulary
Reuse these GitHub Actions concepts where their semantics match:
nameinputsenvstepsiduseswithif${{ inputs.* }}${{ env.* }}${{ steps.<id>.outputs.* }}success(),failure(), andalways()timeout-minutescontinue-on-errorThe documentation must describe this as:
CLI surface
Workflow execution should continue to support AGR's normal output contract:
MVP execution semantics
stepssequentially in declaration order.usesagainst public command IDs exposed byagr schema.withagainst the selected command schema before performing remote mutations.with, including inputs represented as positional arguments in the interactive CLI.always()after success, failure, or cancellation when sufficient inputs are available.agrsubprocesses and parse their text output.Outputs
Expose stable command outputs through the familiar step output context:
${{ steps.create.outputs.instance_id }}Do not require workflow authors to depend directly on internal envelope paths such as:
${{ steps.create.result.Data.InstanceId }}Command output names should be declared or derived from the AGR command schema and covered by compatibility tests.
Expression subset
The MVP should implement only a small, deterministic subset:
inputs,env, andsteps;&&,||, and!;success(),failure(), andalways().Do not evaluate JavaScript, shell expressions, or arbitrary functions.
Validation and safety
--dry-runshould report the ordered steps and known effects without invoking remote mutations.Non-goals for MVP
on.runs-on.run:shell commands.These can be evaluated later only when supported by demonstrated AGR use cases.
Relationship to existing capabilities
agr schemafor command discovery and validation.Acceptance criteria
agr workflow validateperforms complete local validation and makes no remote calls.agr workflow runexecutes sequential AGR command steps and passes structured outputs to later steps.always()runs after both successful and failed preceding steps.