Skip to content

Parameters Design

Dimitri Glazkov edited this page Mar 13, 2025 · 8 revisions

New type of a template part: param. The path value is the name of the parameter. The title is a friendly title.

{{"type":"param","path":"city","title":"City"}}

How users create parameters

Using "@" menu, a user can pick an existing parameter from the list or create a new parameter by typing the name into the "@" Search box until it's unique, then hit Enter.

A chiclet with a question mark (or maybe "input" icon?) will be inserted.

How it works

When a step encounters a parameter, it asks the user to enter it. If the parameter was already asked for during the graph run, the previously entered value will be used.

Effectively, the user no longer needs to create special "Ask User" or "Input" steps: just put a parameter into the step's prompt.

If the step contains multiple parameters, all of them will be asked for at the same time, which allows user to build a simple "entry form" if they choose to do so.

Parameter titles, types and other metadata

Users can find all currently used parameters in the asset organizer. They can see where each parameter is currently used and also specify various metadata around the parameter:

  • title
  • description
  • type -- the user is able to restrict expected type of the parameter in the same way as "Ask User" does
  • sample value -- the user can provide a sample value (like a "Birmingham" for the "City" parameter or an image for the parameter that is "Image" typed).

Default type of a param is text (technically, LLMContent[0].parts[0].text).

The sample value will be placed as a placeholder for when the step asks for the parameter value during the run.

This information is stored in GraphDescriptor.metadata.parameters.

Parameters and subgraphs (custom steps)

When used in a subgraph (aka "custom tool"), the parameters are scoped to the subgraph.

They also become part of the subgraph type declaration, so that when the subgraph is used in a function call, the parameters will be declared as part of the function call declaration. This enables more interesting interactions when using "Plan and Execute" step.