[Hackathon] feat(agent-service): global AI agent with natural language navigation…#5087
Open
claire687 wants to merge 3 commits into
Open
[Hackathon] feat(agent-service): global AI agent with natural language navigation…#5087claire687 wants to merge 3 commits into
claire687 wants to merge 3 commits into
Conversation
… and file management Expands the Texera AI agent into a global chatbot available on every page, enabling end-to-end natural language interaction without manual navigation. Agent service changes: - Global agent with navigate, listWorkflows, listDatasets, listDatasets tools - Auto-discover and provision computing units for workflow execution - Lazy workflow creation on first operator add (no upfront workflow required) - navigateToWorkflow with auto-naming from uploaded filename - Loop detection for addOperator/modifyOperator repetition (max 3/5 per turn) - File context persistence across conversation turns (lastSeenFileContext) - Auto-inject fileName for file-scan operators from file context - Structured response formatting with markdown, clean next-step suggestions - Fix inputPorts/outputPorts stripping in execution requests (was causing 400) - Auto-discover running computing unit; provision new local unit if none exists - Dataset-specific navigation with dvid query param for version auto-selection - navigateToWorkflow abort on first call to prevent looping Frontend changes: - Global agent panel (AppComponent) visible on every page, Cursor-style sidebar - Agent panel pushes page content (paddingRight) instead of overlapping - Sidebar collapses dashboard nav when agent panel opens - File upload via chat with duplicate detection (Use Existing / Upload New) - Dataset version auto-selection on navigation via ?dvid= query param - Onboarding welcome screen for first-time users (agents.length === 0) - Agent auto-opens on login if no agents exist - Workflow auto-naming based on uploaded filename - Navigate to specific dataset page after file upload - Agent registration no longer forces workflow creation upfront
…ering - Fix checkExistingFile slow-path: tautological condition and over-broad includes() caused every agent_upload_* dataset to match any filename. Now uses only endsWith(_safeDatasetSuffix) + startsWith(agent_upload_). - Fix chat table rendering: add display:block + overflow-x:auto on tables so wide result tables scroll horizontally instead of squishing columns. Add white-space:nowrap to keep numbers on one line, right-align numeric cells, and style with light borders for readability.
…improvements
- Agent panel: resizable sidebar (nz-resizable), split isPanelOpen/width to
prevent panel hiding during resize; fixed _width private access error
- Navigation: agent can navigate any page (datasets, workflows, compute, quota,
home) via natural language; navigate("datasets") for file listing requests
- File switching: reset workflow when a different file is loaded into an existing
workflow; resolve fileName from fileContext before reset check fires
- Workflow creation: lazy workflow creation via ensureWorkflow(); navigateToWorkflow
always available (not gated on workflowId) — reads wid lazily at execution time
- Duplicate detection: fixed false positives; only endsWith(_safeDatasetSuffix)
- Fuzzy match: unknown operator types return "Did you mean: X?" instead of all 163
- Step logging: per-step tool call success/failure logged for easier debugging
- Duplicate broadcast fix: track broadcastedStepIds to prevent double messages
- Post-login redirect: home page instead of workflow page
- Prompts: content discovery rules distinguish "show files" vs "load file"
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Demo
▶ Full Demo Video
Overview
This PR expands the Texera AI agent into a global AI assistant that lets users perform any action — in any page — using natural language. Users no longer need to manually navigate the UI, configure computing units, or manage workflows. The agent handles everything from a persistent sidebar accessible throughout the entire application.
Key Features
Global Agent Panel
Natural Language Navigation
Smart File Management
fileContextauto-injection path so reset fires reliablyZero-Config Workflow Execution
navigateToWorkflowis always available once the user is logged in — readsworkflowIdlazily so a workflow created mid-turn is immediately navigableClean Response Formatting
Changed Files
agent-service/src/agent/texera-agent.tsagent-service/src/agent/tools/workflow-crud-tools.ts,workflow-execution-tools.tsagent-service/src/agent/prompts.tsagent-service/src/server.tsagent-panel.component.ts/html/scsslocal-login.component.tsTest Plan
reset workflowfires, new workflow created for the new file