Skip to content

Explore mediated Agent Spec Resource binding mutations #231

Description

@schickling-assistant

Problem

Changing one declared Resource binding on an existing Agent Spec currently requires callers to perform the full exact-byte publication protocol: render a complete candidate agent.kdl, validate it, compute its digest, publish it with compare-and-swap, then read it back. st2 resource add|remove manages linked-reference records instead, and st2 agent publish --bundle is oriented toward creating a complete declaration rather than making a small binding change.

This ceremony is safe but makes simple operations such as attaching one existing resource disproportionately difficult. Coordinating creation of resource material with the binding also lacks one mediated operation.

Design direction to explore

Provide a binding-specific command or API for one exact Agent Spec, for example:

st2 agent resource add|update|remove|rename \
  --host <host> --identity <identity> ...

The surface should:

  • preserve full-catalog validation, exact-target selection, CAS, and fail-closed concurrent-change behavior;
  • define who may mutate each binding and avoid treating URI possession as authority;
  • modify only the intended binding while preserving unrelated Agent Spec bytes where possible;
  • remain non-disruptive: a binding-only change must not relaunch a healthy agent;
  • support add, update, remove, and rename with explicit idempotent outcomes;
  • define crash and retry recovery, including an optional bundled resource-material operation without claiming cross-filesystem ACID; and
  • return machine-readable publication and readback evidence.

A generic motivating flow should be one command that creates or verifies resource material and binds its URI to an existing agent, while retaining the same safety properties as manual Agent Spec publication.

Relationship to existing work

This issue is specifically about reducing authoring ceremony for small declared-binding mutations; it should not collapse bindings into linked records or weaken publication fencing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:agent-specAgent Spec format, parsing, and the agent-spec crate · Set: manualarea:catalogCatalog structure, declarations, transactions, and admission · Set: manualarea:resourceTyped Resource bindings and linked records · Set: manualorigin:agentFiled or primarily produced by an AI agent · Set: manualstate:open-design-questionUnresolved design choice requiring explicit alignment before implementation · Set: manualtype:featureNew user-visible or system capability · Set: manual

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions