From f64bd662b9beed4c727c88904abd828da0e91d0c Mon Sep 17 00:00:00 2001 From: Emily Sun Date: Fri, 15 May 2026 21:55:35 -0700 Subject: [PATCH 1/2] feat: custom agents, time machine, and per-agent model selection This bundles the feature work that built up on this branch: - Custom agents: dashboard CRUD page and editor dialog (48px icon tile, chip-style guardrails, model selector). Each custom agent now carries a LiteLLM model_name (Opus 4.7 / Haiku 4.5) that is passed through to the agent-service so different agents can use different models. - Conversation history is scoped per (workflowId, agentId): switching agent or workflow yields a different conversation list. localStorage key: texera.workflowConversations.v1.{workflowId}.{agentId}. - Time machine: workflow snapshot list, revert, and agent-tagged checkpoints. New workflow-history-tool in agent-service backs the "undo my last change" flow; amber gains a WorkflowSnapshotResource; sql/updates/23.sql adds the snapshot table. - Operator-aware custom-agent prompts: the system prompt now injects the full operator catalog with a "prefer built-in operators over Python UDFs" rule, sourced from WorkflowSystemMetadata at request time. - LiteLLM: added the claude-opus-4.7 entry alongside claude-haiku-4.5 and gpt-5-mini in bin/litellm-config.yaml. - Agent panel rewritten around the (conversation list / chat) two-view model with subscription-managed list reloads and per-step persistence. Co-Authored-By: Claude Opus 4.7 (1M context) --- .run/AccessControlService.run.xml | 20 +- .run/ComputingUnitManagingService.run.xml | 20 +- .run/ComputingUnitMaster.run.xml | 22 +- .run/ComputingUnitWorker.run.xml | 22 +- .run/ConfigService.run.xml | 20 +- .run/FileService.run.xml | 20 +- .run/TexeraWebApplication.run.xml | 20 +- .run/WorkflowCompilingService.run.xml | 20 +- agent-service/src/agent/prompts.ts | 220 +++++++- agent-service/src/agent/texera-agent.ts | 21 +- agent-service/src/agent/tools/index.ts | 1 + .../src/agent/tools/workflow-history-tool.ts | 191 +++++++ agent-service/src/server.ts | 11 +- .../texera/web/TexeraWebApplication.scala | 2 + .../workflow/WorkflowSnapshotResource.scala | 488 +++++++++++++++++ bin/litellm-config.yaml | 4 + common/config/src/main/resources/gui.conf | 2 +- frontend/src/app/app-routing.constant.ts | 1 + frontend/src/app/app-routing.module.ts | 5 + .../component/dashboard.component.html | 11 + .../component/dashboard.component.ts | 2 + .../user-agent-editor.component.html | 130 +++++ .../user-agent-editor.component.scss | 187 +++++++ .../user-agent/user-agent-editor.component.ts | 191 +++++++ .../user/user-agent/user-agent.component.html | 46 ++ .../user/user-agent/user-agent.component.scss | 65 +++ .../user/user-agent/user-agent.component.ts | 128 +++++ .../user/custom-agent/custom-agent.service.ts | 136 +++++ .../dashboard/type/custom-agent.interface.ts | 141 +++++ .../agent-chat/agent-chat.component.html | 36 +- .../agent-chat/agent-chat.component.scss | 87 ++- .../agent-chat/agent-chat.component.ts | 130 ++++- .../agent-panel/agent-panel.component.html | 180 ++++--- .../agent-panel/agent-panel.component.scss | 218 +++++--- .../agent-panel/agent-panel.component.ts | 494 ++++++++++-------- .../left-panel/left-panel.component.ts | 7 + .../time-machine/time-machine.component.html | 137 +++++ .../time-machine/time-machine.component.scss | 200 +++++++ .../time-machine/time-machine.component.ts | 266 ++++++++++ .../workspace/service/agent/agent.service.ts | 13 +- .../service/agent/conversation.service.ts | 200 +++++++ .../time-machine/time-machine.service.ts | 251 +++++++++ sql/texera_ddl.sql | 22 + sql/updates/23.sql | 48 ++ 44 files changed, 3903 insertions(+), 533 deletions(-) create mode 100644 agent-service/src/agent/tools/workflow-history-tool.ts create mode 100644 amber/src/main/scala/org/apache/texera/web/resource/dashboard/user/workflow/WorkflowSnapshotResource.scala create mode 100644 frontend/src/app/dashboard/component/user/user-agent/user-agent-editor.component.html create mode 100644 frontend/src/app/dashboard/component/user/user-agent/user-agent-editor.component.scss create mode 100644 frontend/src/app/dashboard/component/user/user-agent/user-agent-editor.component.ts create mode 100644 frontend/src/app/dashboard/component/user/user-agent/user-agent.component.html create mode 100644 frontend/src/app/dashboard/component/user/user-agent/user-agent.component.scss create mode 100644 frontend/src/app/dashboard/component/user/user-agent/user-agent.component.ts create mode 100644 frontend/src/app/dashboard/service/user/custom-agent/custom-agent.service.ts create mode 100644 frontend/src/app/dashboard/type/custom-agent.interface.ts create mode 100644 frontend/src/app/workspace/component/left-panel/time-machine/time-machine.component.html create mode 100644 frontend/src/app/workspace/component/left-panel/time-machine/time-machine.component.scss create mode 100644 frontend/src/app/workspace/component/left-panel/time-machine/time-machine.component.ts create mode 100644 frontend/src/app/workspace/service/agent/conversation.service.ts create mode 100644 frontend/src/app/workspace/service/time-machine/time-machine.service.ts create mode 100644 sql/updates/23.sql diff --git a/.run/AccessControlService.run.xml b/.run/AccessControlService.run.xml index 56ffbc50fbb..b8f7db2f9ba 100644 --- a/.run/AccessControlService.run.xml +++ b/.run/AccessControlService.run.xml @@ -1,25 +1,7 @@ -