Skip to content

feat(agent): add a default field to the request_input elicitation form #5190

Description

@mmabrouk

Context

The builder agent collects typed context with the request_input op, which renders an inline form from a JSON schema. The schema's default is typed away in the elicitation contract (default?: never in services/agent/src/…/elicitation.ts), so a playbook cannot prefill a proposed value. Today the agent-templates playbooks work around this with an enum whose first option is "Figure it out, use your best judgment" and by writing the proposed value into the field description. That reads worse than a prefilled form and costs the user a manual pick per field.

Decision context: agent-templates plan PR #5188, open question 2. Mahmoud approved shipping the workaround now and filing this as the follow-up.

What to build

  • Add a real default to the elicitation field schema (wire contract in elicitation.ts and the Python/SDK side if it mirrors the shape).
  • Render it in the frontend elicitation form as the prefilled value for string, number, integer, boolean, and enum fields, so the user can accept the whole form with one click when the proposals are right.
  • Keep backward compatibility: forms without defaults behave exactly as today.

Follow-up once this ships

Update the build-an-agent skill's template playbooks (references/agent-templates/ in sdks/python/agenta/sdk/agents/adapters/agenta_builtins.py) and the write-template-playbooks authoring skill to use real defaults instead of the enum-first "figure it out" workaround. The playbook spec at docs/design/agent-workflows/projects/agent-templates/playbook-spec.md marks the places that change.

https://claude.ai/code/session_016MYos6VaKu8AjhcLFkaMUk

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions