Feature Request
Please add azd ai routine commands to the agent extension that provide full CRUD, dispatch, and run-history access on Routines in a Foundry Project, following the design specifications in foundrysdk_specs PR #165. This issue is part of the umbrella consolidation effort tracked in #8135 and is a sibling to the toolbox work in #8143, the connection work in #8139, and the project-context work in #8124.
Design Highlights
- Command surface:
azd ai routine create | update | show | list | delete, azd ai routine enable | disable, azd ai routine dispatch, azd ai routine run list | show | delete.
- Trigger as a flag:
--trigger <schedule|timer|github-issue> plus per-trigger flags (--cron / --time-zone for schedule, --at / --time-zone for timer, --connection / --owner / --repository / --event-action for the stretch github-issue trigger). Same prompt / no-prompt behavior as connection create.
- Action as a flag:
--action <agent-response|agent-invoke> (defaults to agent-response), with --agent-id / --agent-endpoint-id / --conversation-id / --session-id as appropriate per action. CLI value names are short aliases for the API discriminators invoke_agent_responses_api and invoke_agent_invocations_api.
- State management:
enable / disable exposed as dedicated verbs; CLI hides whether the wire format is action routes (:enable / :disable) or a field on PUT.
- Dispatch:
azd ai routine dispatch <name> is synchronous by default; --async switches to the :dispatchAsync route. Supports --input "<text>" for the dispatch payload's user message and --conversation-id to continue an existing conversation thread.
- Run history:
azd ai routine run list <routine> with --top / --orderby / --filter matching the data-plane query parameters. Single-run show and delete are pending API support per the routines spec.
- Update is merge: GET-then-PUT internally so only named flags change; switching
--trigger or --action type after creation is out of scope (delete-and-recreate, mirroring the connection auth-type rule).
- Endpoint resolution: Inherits the standard 5-level resolution order (flag, azd env, global config, env var, structured error) from the umbrella surface.
- Standalone operation: Works outside an azd project given a resolvable project endpoint.
- Cross-cutting flags:
--output json, --no-prompt, --debug, -p / --project-endpoint, --force (delete confirmation skip), per the umbrella spec.
Open design questions (from the spec, Open Questions 4-6)
- Trigger / action enum values: ship CLI-friendly aliases (
agent-response, agent-invoke; schedule, timer, github-issue) that map to the API discriminators (invoke_agent_responses_api, invoke_agent_invocations_api; schedule, timer, github_issue), or use 1:1 API parity values? Default proposed: short CLI aliases.
- Multi-trigger routines via the CLI. The Routines TypeSpec models
Routine.triggers as a Record<RoutineTrigger> (a named dict). The flat-flag CLI shape implies a single trigger, keyed by the CLI as default. Add a routine trigger add | remove | list sub-collection now, or defer? Default proposed: defer.
--conversation-id on azd ai routine dispatch. The routines spec has conversation_id as a first-class field on DispatchRequest; the TypeSpec PR's DispatchRoutineRequest does not include it. Default proposed: ship the CLI flag now, document as preview-only until the routines spec resolves.
These need Routines-service alignment before implementation.
API dependencies
- Routines data plane:
PUT /routines/{name} (idempotent), GET /routines/{name}, GET /routines, DELETE /routines/{name} -- per Routines TypeSpec PR #42779.
- Routine dispatch:
POST /routines/{name}:dispatch (sync) and POST /routines/{name}:dispatchAsync (async).
- Routine runs:
GET /routines/{name}/runs (list, ready in TypeSpec). Single-run GET and DELETE are pending API work per the routines spec.
enable / disable wire format: routines spec defines them as action routes (:enable / :disable); the TypeSpec PR currently models enabled as a field on the PUT body. CLI verbs are stable either way.
Please refer to the full design spec (foundrysdk_specs PR #165) -- specifically the Routines sub-section under Requirements, the API Surface table (rows 12-14), and Open Questions 4-6 -- for implementation guidance. The matching service-side spec lives in foundrysdk_specs/specs/agents/routines/spec.md.
Additional Context
Feature Request
Please add
azd ai routinecommands to the agent extension that provide full CRUD, dispatch, and run-history access on Routines in a Foundry Project, following the design specifications in foundrysdk_specs PR #165. This issue is part of the umbrella consolidation effort tracked in #8135 and is a sibling to the toolbox work in #8143, the connection work in #8139, and the project-context work in #8124.Design Highlights
azd ai routine create | update | show | list | delete,azd ai routine enable | disable,azd ai routine dispatch,azd ai routine run list | show | delete.--trigger <schedule|timer|github-issue>plus per-trigger flags (--cron/--time-zoneforschedule,--at/--time-zonefortimer,--connection/--owner/--repository/--event-actionfor the stretchgithub-issuetrigger). Same prompt / no-prompt behavior asconnection create.--action <agent-response|agent-invoke>(defaults toagent-response), with--agent-id/--agent-endpoint-id/--conversation-id/--session-idas appropriate per action. CLI value names are short aliases for the API discriminatorsinvoke_agent_responses_apiandinvoke_agent_invocations_api.enable/disableexposed as dedicated verbs; CLI hides whether the wire format is action routes (:enable/:disable) or a field on PUT.azd ai routine dispatch <name>is synchronous by default;--asyncswitches to the:dispatchAsyncroute. Supports--input "<text>"for the dispatch payload's user message and--conversation-idto continue an existing conversation thread.azd ai routine run list <routine>with--top/--orderby/--filtermatching the data-plane query parameters. Single-runshowanddeleteare pending API support per the routines spec.--triggeror--actiontype after creation is out of scope (delete-and-recreate, mirroring the connection auth-type rule).--output json,--no-prompt,--debug,-p / --project-endpoint,--force(delete confirmation skip), per the umbrella spec.Open design questions (from the spec, Open Questions 4-6)
agent-response,agent-invoke;schedule,timer,github-issue) that map to the API discriminators (invoke_agent_responses_api,invoke_agent_invocations_api;schedule,timer,github_issue), or use 1:1 API parity values? Default proposed: short CLI aliases.Routine.triggersas aRecord<RoutineTrigger>(a named dict). The flat-flag CLI shape implies a single trigger, keyed by the CLI asdefault. Add aroutine trigger add | remove | listsub-collection now, or defer? Default proposed: defer.--conversation-idonazd ai routine dispatch. The routines spec hasconversation_idas a first-class field onDispatchRequest; the TypeSpec PR'sDispatchRoutineRequestdoes not include it. Default proposed: ship the CLI flag now, document as preview-only until the routines spec resolves.These need Routines-service alignment before implementation.
API dependencies
PUT /routines/{name}(idempotent),GET /routines/{name},GET /routines,DELETE /routines/{name}-- per Routines TypeSpec PR #42779.POST /routines/{name}:dispatch(sync) andPOST /routines/{name}:dispatchAsync(async).GET /routines/{name}/runs(list, ready in TypeSpec). Single-runGETandDELETEare pending API work per the routines spec.enable/disablewire format: routines spec defines them as action routes (:enable/:disable); the TypeSpec PR currently modelsenabledas a field on the PUT body. CLI verbs are stable either way.Please refer to the full design spec (foundrysdk_specs PR #165) -- specifically the Routines sub-section under Requirements, the API Surface table (rows 12-14), and Open Questions 4-6 -- for implementation guidance. The matching service-side spec lives in foundrysdk_specs/specs/agents/routines/spec.md.
Additional Context
azd aidirect-commands surface for Foundry. Sibling issues: Addazd ai project set/unset/showto share a default Foundry project endpoint acrossazd aicommands #8124 (project context), Addazd ai connection create/update/show/listto manage Foundry Connections #8139 (connections + agent run secrets), Addazd ai toolbox create/update/show/list/delete(plusconnectionandtagsubcommands) to manage Foundry Toolboxes from any directory #8143 (toolboxes). Umbrella: Add per-version namespace override on ExtensionVersion in the extension registry #8135.