Examples / Fill in forms
An agent helps you fill out a form
The form fills in while the AI works: choices such as topic and urgency appear in a fraction of a second, and details such as name and email a few seconds later.
The UAG sends its answers back in batches, each as soon as it is ready. Choice fields (here topic, urgency and tone) are picked in milliseconds by a decision engine, an AI built to choose between options. Value fields (name, email, date) are written a few seconds later by a larger AI model. Agent Input fills each batch into the form as it arrives, so the choices are in place while the details are still being read.
There is nothing to set up for this: every form the UAG can fill (one with the uag tag) works this way. A field's uagEngine property can choose which AI answers it.
Try it: pick a sample and watch the What the UAG did panel. Under the agent/extract request, the choices and the values are listed in the order they arrived, with the time each took.
Turn it on
{
"title": "Example: An agent helps you fill out a form",
"name": "exampleAgentHelpsYouFill",
"path": "example-agent-helps-you-fill",
"type": "form",
"display": "form",
"tags": [
"uag"
],
"properties": {
"description": "A general request: its topic, urgency and tone, and who sent it."
},
"components": [
{
"type": "textarea",
"key": "description",
"label": "Describe your request",
"input": true,
"placeholder": "Tell us what you need, in your own words.",
"rows": 4,
"validate": {
"required": true
},
"properties": {
"uag": "triage",
"uagField": "input"
}
},
{
"type": "select",
"key": "topic",
"label": "Topic",
"input": true,
"dataSrc": "values",
"data": {
"values": [
{
"label": "Question",
"value": "question"
},
{
"label": "Problem",
"value": "problem"
},
{
"label": "Request",
"value": "request"
},
{
"label": "Feedback",
"value": "feedback"
}
]
},
"properties": {
"uag": "triage"
}
},
{
"type": "radio",
"key": "urgency",
"label": "Urgency",
"input": true,
"values": [
{
"label": "Low",
"value": "low"
},
{
"label": "Normal",
"value": "normal"
},
{
"label": "Urgent",
"value": "urgent"
}
],
"properties": {
"uag": "triage"
}
},
{
"type": "radio",
"key": "sentiment",
"label": "Tone",
"input": true,
"values": [
{
"label": "Positive",
"value": "positive"
},
{
"label": "Neutral",
"value": "neutral"
},
{
"label": "Negative",
"value": "negative"
}
],
"properties": {
"uag": "triage"
}
},
{
"type": "textfield",
"key": "name",
"label": "Name",
"input": true,
"properties": {
"uag": "triage"
}
},
{
"type": "email",
"key": "email",
"label": "Email",
"input": true,
"properties": {
"uag": "triage"
}
},
{
"type": "day",
"key": "date",
"label": "Date it started",
"input": true,
"properties": {
"uag": "triage"
}
},
{
"type": "button",
"key": "submit",
"label": "Submit",
"action": "submit",
"input": true
}
]
}<link rel="stylesheet" href="https://ai.form.io/uag-js/uag-js.css">
<script src="https://cdn.jsdelivr.net/npm/@formio/js@5.6.1/dist/formio.full.min.js"></script>
<!-- Registers @formio/uag-js with this UAG: forms tagged uag save through it, and get Agent Input and the chat. -->
<script src="https://ai.form.io/uag-js/uag.use.js"></script>
<div id="form"></div>
<script>
Formio.createForm(document.getElementById('form'), 'https://uag.form.io/example-agent-helps-you-fill');
</script>Try it
Start the live examples
The examples call real models. Starting them signs you in as a temporary guest of the examples' project, for every example; what you enter is deleted after a day.
Not supported without a license
This demo needs a license (LICENSE_KEY) that includes the UAG, or a 30-day free trial project on portal.form.io. This deployment has neither: it serves an Open Source project, or its UAG is unlicensed.
The chat widget examples work everywhere, with no license.