Skip to content

Add Ask AI to the agent and action editors - #1694

Merged
Paul Lizer (paullizer) merged 10 commits into
paullizer-react-v2-uifrom
paullizer-ai-assist-agents-actions
Oct 7, 2026
Merged

Paul Lizer (paullizer) merged 10 commits into
paullizer-react-v2-uifrom
paullizer-ai-assist-agents-actions

Conversation

@paullizer

Copy link
Copy Markdown
Contributor

Summary

Building an agent and wiring up its actions takes a lot of manual form work. This adds the Ask AI side panel, which the workflow editor already has, to the V2 agent and action editors.

  • Works in the agent and action editors for personal, group and global scopes. Proposed changes go into the unsaved draft, are highlighted, and can be undone one turn at a time. It never saves and never handles credentials.
  • The agent assistant can draft up to 3 new actions inline. They are created only when the agent is saved. A drafted action that still needs input (for example an endpoint) blocks the save until it is finished in the action editor, and the saved action then replaces the draft in the agent.
  • New admin toggles enable_agent_ai_assistant and enable_action_ai_assistant, both on by default. They only apply while Enable Agents is on.
  • Built as a shared editor-assist framework (functions_editor_assist.py, editorAssist.ts plus the components/editorAssist/* components) with per-editor adapters, so other editors can reuse it.

Review note: an in-memory store (workspaceEditorDrafts.ts) now passes the drafted action to the action editor and back to the agent. The first version stored this handoff in a React state update that never ran, because the agent editor closed when it navigated to the action editor. It is now recorded immediately and in a separate area for each workspace.

Linked issue

Refs #

Release Notes & Latest Features

  • New Feature
  • Bug Fix
  • UI Enhancement
  • Breaking Change
  • Internal only

Is this visible to end users?

  • Yes
  • No

Is this admin-facing (Admin Settings, governance, deployment, config)?

  • Yes
  • No

Should this become a Latest Feature card?

  • Yes
  • No
  • Already added

Screenshot needed for the card?

  • Yes
  • No
  • Attached

Version bump

  • application/single_app/config.py VERSION third segment bumped (0.261.277 -> 0.261.282, one bump per phase)
  • deployers/version.txt bumped, or not needed because deployers/ was not changed

Testing / validation

  • python functional_tests/test_editor_assist_core.py: passed (26 passed under pytest).
  • The .mjs logic tests for the editor-assist adapters: passed.
  • python -m pytest ui_tests/test_v2_agent_action_ask_ai.py: 5 passed.
  • Related UI suites (agent and action Ask AI, group actions and agents, draft navigation, workspace authoring, workflow Ask AI): 161 of 164 passed.
  • The 3 failures, in ui_tests/test_v2_workspace_authoring.py, were already failing before this change. They expect raw action names that Hide GUIDs and internal IDs in the shared agent editor #1684 now shows as "Unavailable action N".
  • test_v2_workspace_action_authoring_logic.mjs has one failure (m365_calendar_plugin) that was also there before this change.
  • python functional_tests/test_docs_app_surface_coverage.py: 7/7 passed.
  • python functional_tests/test_docs_site_quality.py: 6/6 passed.
  • npx tsc -b --noEmit and npm run build in application/v2_ui: clean.

Documentation

  • Release notes updated, or not needed
  • Feature documentation updated, or not needed (docs/explanation/features/AGENT_ACTION_AI_ASSISTANT.md, plus the admin page and the create-an-agent and create-an-action guides)
  • Fix documentation updated, or not needed

Security checklist

  • New Flask routes include @swagger_route(security=get_auth_security()) (POST /api/agents/assist and POST /api/actions/assist, each checked per workspace and rate-limited)
  • Settings sent to non-admin frontends use sanitize_settings_for_user()
  • Browser JavaScript is served from local SimpleChat static assets only; no CDN-hosted JS
  • No secrets, keys, connection strings, or local-only artifacts are included

Paul Lizer (paullizer) and others added 7 commits October 7, 2026 10:06
Adds a descriptor-driven editor assist core shared by the agent and action
editors, POST /api/agents/assist and /api/actions/assist with scope
authorization, admin toggles enable_agent_ai_assistant and
enable_action_ai_assistant, and a separate limiter document type.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Describe the agent draft to Ask AI (identity, model, actions, assigned
knowledge, limits) and apply its answers through the editor's own helpers.
Foundry agents expose only identity and description. Shares the reasoning
level lookup with the Advanced panel.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Adds the action editor's Ask AI view and patch rules (per-type fields keyed on the action type,
secrets excluded, type changes and their undo going through the editor's own helpers) and wires
the shared side panel into ActionEditorPage behind enable_action_ai_assistant.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Ask AI in the agent editor can draft up to three new actions when no existing action fits. Drafts stay in the unsaved agent, appear under New actions from Ask AI, can be finished in the action editor, and are created just before the agent is saved. Undo and Remove drop a draft and a later undo restores it.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
- Fix the drafted-action hand-off: record the placeholder in the draft store so finishing
  a drafted action in the action editor replaces it on return
- Add UI tests for agent/action Ask AI and handoff scope checks
- Document admin toggles, guides, feature doc and release notes; bump to 0.261.282

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Comment thread functional_tests/test_v2_action_editor_assist_logic.mjs Fixed
Paul Lizer (paullizer) and others added 3 commits October 7, 2026 12:06
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@paullizer
Paul Lizer (paullizer) merged commit a55f676 into paullizer-react-v2-ui Oct 7, 2026
1 check passed
Paul Lizer (paullizer) added a commit to paullizer/simplechat that referenced this pull request Oct 7, 2026
Brings in V2 at d4cfde7 (microsoft#1694, microsoft#1696, VERSION 0.261.289).

Conflicts:
- application/single_app/config.py: only the VERSION line. Took V2's
  file (0.261.289).
- docs/explanation/release_notes.md: V2's file byte-for-byte, with this
  branch's own (v0.261.288) section inserted at the very top, above V2's
  first section, its own (v0.261.288). Every V2 section is unchanged.

docs/admin/orchestration.md merged cleanly: V2's edits and this branch's
two lines don't touch each other.

The next commit renumbers this branch's section and VERSION to
0.261.290, above V2's 0.261.289.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Paul Lizer (paullizer) added a commit to paullizer/simplechat that referenced this pull request Oct 7, 2026
V2 now uses 0.261.289 (microsoft#1694, microsoft#1696) and has its own 0.261.288 release
notes section, so this branch's version moves above both. Renumbers the
same 20 lines in 15 files as the previous bump: config.py, this branch's
release-notes section, the documentation version notes and the new
tests' headers. V2's own (v0.261.288) release-notes section is
untouched. The tests' version floor stays 0.261.253.

Refs microsoft#1549

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants