Skip to content

chore(frontend): filter out agent workflows from legacy flows#4876

Draft
ardaerzin wants to merge 2 commits into
big-agentsfrom
fe-chore/filter-out-agent-workflows-from-legacy-flows
Draft

chore(frontend): filter out agent workflows from legacy flows#4876
ardaerzin wants to merge 2 commits into
big-agentsfrom
fe-chore/filter-out-agent-workflows-from-legacy-flows

Conversation

@ardaerzin

Copy link
Copy Markdown
Contributor

Context

big-agents introduces the agent workflow type (flags.is_agent / URI agenta:builtin:agent:v0). Agent workflows have their own playground and aren't runnable as legacy evaluation subjects, so they should not be selectable in the older flows. This PR hides them from those pickers.

What changed

A shared pure predicate isAgentWorkflow(entity) is added to @agenta/entities/workflow (detects via flags.is_agent or the builtin agent URI) and applied at four selection points:

  • New evaluation — app picker + counts, via filterInvokableWorkflows in appWorkflowStore.ts. This narrowing only runs when workflowInvokableOnlyAtom=true, which only the new-evaluation flow sets — the app-management page leaves it false, so agents are still listed/managed there.
  • Playground add-variant browseSelectVariant default browse adapter.
  • Playground variant-swap browsePlaygroundVariantConfigHeader app-only adapter.
  • Evaluator-playground app connectuseEvaluatorRunControls app adapter.

The agent's own playground picker is intentionally left untouched.

Why filterWorkflows and not the adapter flags option

The adapter's flags filter matches flags[key] === val exactly, so is_agent: false would wrongly drop every workflow whose is_agent key is undefined. A filterWorkflows: (w) => !isAgentWorkflow(w) predicate avoids that.

Testing

  • @agenta/entities, @agenta/entity-ui, @agenta/playground build clean (tsc).
  • No new tsc errors in the changed OSS files (verified the two pre-existing SelectVariant errors against the base via stash).
  • prettier + eslint clean; pre-commit hooks passed.

Agent workflows are not valid subjects for the legacy evaluation and
playground-connect flows, so they should not be selectable there.

Add a shared isAgentWorkflow predicate (flags.is_agent or the builtin
agent URI) in @agenta/entities/workflow and apply it at four pickers:
- new-evaluation app picker + counts (filterInvokableWorkflows)
- playground add-variant browse (SelectVariant)
- playground variant-swap browse (PlaygroundVariantConfigHeader)
- evaluator-playground app connect (useEvaluatorRunControls)

Use filterWorkflows rather than the adapter flags filter, which would
wrongly drop workflows whose is_agent key is undefined.
@vercel

vercel Bot commented Jun 26, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agenta-documentation Ready Ready Preview, Comment Jun 28, 2026 8:31pm

Request Review

@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: f3176ecd-4f01-4e70-8e65-9cf78f892a47

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fe-chore/filter-out-agent-workflows-from-legacy-flows

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

1 participant