Skip to content

[Feature request] New Agent (beta): composer UI to declare app variables so webapp URL pre-fill works like Chatflow's Hidden & Pre-Filled fields #41995

Description

@xiongyidxx

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report, otherwise it will be closed.
  • Please do not modify this template :) and fill in all the required fields.

1. Is this request related to a challenge you're experiencing? Tell me about your story.

We publish an internal assistant as a standalone new Agent app (mode agent, beta) on self-hosted 1.17.0, and external systems (intranet portals) need to hand off context (e.g. expense report id, user identity) into the published webapp URL.

On Chatflow apps this is a first-class flow: mark User Input fields as Hidden & Pre-Filled, then share {WEBAPP_URL}?{VAR}={VALUE} — the official docs even describe generating such links in bulk from a third-party system.

On a standalone Agent app I could not find any way to declare input variables. I was trying to pre-fill variables via /agent/<token>?var=value, and nothing happened: GET /parameters returns an empty user_input_form, the opening form never renders, and the URL params are silently dropped by the backend whitelist filter (api/core/app/apps/base_app_generator.py:124-137). It's frustrating because everything downstream of the config already works — only the declaration UI is missing.

2. Additional context or comments

Source findings on 1.17.0 (the plumbing is already in place):

  • Contract exists: AppVariableConfig { name, type, required, default }packages/contracts/generated/api/console/agent/types.gen.ts:1016-1021, referenced as app_variables on the Agent Soul config (:584).
  • Runtime projection exists: Agent Soul app_variablesuser_input_formapi/core/app/apps/agent_app/app_config_manager.py:113 (served by GET /parameters).
  • Webapp rendering exists, with no agent-specific gating: plain-text URL query params are consumed at web/app/components/base/chat/chat-with-history/hooks.tsx:331-339 (getRawInputsFromUrlParams); the opening form renders whenever user_input_form is non-empty (chat-wrapper.tsx:349-358); values are submitted as inputs with POST /chat-messages.
  • The console preview adapter already maps app_variables to input-form types — web/features/agent-v2/agent-detail/configure/components/preview/chat-config.ts:100-107,123-124,206-215.
  • The missing piece: web/features/agent-v2/agent-composer/store-modules/ has no app-variables module (only app-features/env/files/knowledge/model/prompt/skills/tools), so app_variables can currently only be set via DSL import / console API.

Suggested solution: add an "App variables" section to the Agent composer — types text-input / paragraph / select / number / json (same mapping the preview adapter already uses), plus a per-field "hidden & pre-filled" toggle — persisted to Agent Soul app_variables. That alone unlocks URL query pre-fill on /agent/[token] webapps with no further changes.

Related: #41779 (binding declared variables to tool parameters).

3. Can you help us with this feature?

  • I am interested in contributing to this feature.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions