Skip to content

Tutorials

Tutorial: build a complete process from a document with the Agent

Give the Agent a written leave request procedure, review its build plan of tables, forms, admin forms, a decision table, a workflow and reports, package it, then build everything as drafts in one step.

Last updated 4 min read Edit this page on GitHub
On this page

Goal: a complete leave request solution, built by the Agent from a written procedure: a table of requests, a leave types configuration table with its admin form, a start form, approval task forms, a decision table, the workflow that links them, and a report, all in one package you can remove in one go.

You need: the Agent turned on in your workspace (see Setting up the Agent), and permission to create what the plan contains: Create tables, Edit forms, Create workflows and Edit workflows. Owner, Admin and Manager have them. Items you can't create are marked Skipped on the plan.

Time: about 15 minutes.

1. Have the process ready#

Any written or drawn process works: a Word or PDF procedure, a text file, a flowchart, or a photo of a whiteboard. For this tutorial, paste this text:

2. Ask the Agent to build it#

  1. On Home, select Build from a process with Agent. (Or open the Agent button on any screen; it is on every screen.)
  2. Paste the text above, or attach the document, and type "Build this process."
  3. If the Agent asks Just a form or A full solution, choose A full solution.
  4. The Agent asks Package the solution? Choose Package this solution. A package lets you remove everything in one go, keep versions and share it (see Package a solution).

3. Review the build plan#

The Agent answers with a build plan card, titled Build plan: …, grouped by section. For this example it lists something like:

SectionItemWhat it is
Data modelConfiguration table Leave typesAnnual, Sick, Unpaid (admins can add more)
Data modelMain table Leave requestsReference, employee, leave type (lookup to Leave types), start date, end date, days, reason, status
FormsApplication form Leave requestThe fields the employee fills in; leave type is a lookup
FormsTask formsManager approval and HR approval, showing the request (prefilled) with a comment box
FormsAdmin form Manage leave typesAn editable grid on Leave types; Save writes the changes back
RulesDecision table Leave approval policyDays over 10 → HR approval needed
WorkflowsLeave request approvalStarts from the form, saves the row, asks the manager, checks the policy, asks HR if needed, updates the status, emails the employee
ReportsLeave requestsCharts by status, by leave type and by month
PackageLeave requestsEvery item above, version 1.0.0

The plan also shows how the items link: which form starts the workflow, which table it writes to and which decision table it calls. Each task lists its assignee and redirect allowed. Anything you lack permission for is marked Skipped.

A process with lines (a purchase request with line items, an expense claim with receipts) also gets a child table linked to the main table. On the application form the lines are a List field: inputs for one line (Item, Quantity, Unit price), an Add item button and an Add row to list rule that moves the inputs into the list below, with a calculated line total and a total underneath (see List fields). The workflow saves the request, then loops over {{form.line_items}} and adds one child row per line with {{item.item}}, {{item.quantity}} and the request's id.

4. Adjust it in chat#

Ask for changes before anything is made, for example:

  • Add a "Cover arranged by" person field to the start form.
  • Make the HR threshold 15 days.
  • Skip the report for now.
  • Skip the admin forms.

The Agent shows an updated plan each time.

5. Build all#

Select Build all. The Agent creates the items in order (tables, forms, the decision table, the workflow, the report, then the package) and wires them together. The card shows each item's progress and a link to open it.

The summary links to the package. Under Packages → Installed, expand it to see every item it owns. Uninstall removes the whole solution, and shows exactly what it will remove first.

Everything is a draft. The workflow is saved inactive, so nothing runs yet.

If an item fails (for example a name already taken), the Agent stops and lists what it has already created. It offers to fix the failed item and continue; you confirm the remaining items again.

6. Check, test and publish#

  1. Open the workflow from its link. Ask the Agent "Explain what this workflow does" to check it matches the procedure.
  2. Open the decision table and select Test rules with 12 days and 20 days.
  3. In the workflow, select Save & test and run a test case for each path (see step 8 of the approval tutorial).
  4. When you are happy, select Publish. Then share the start form's link (see step 9 of the first form tutorial).

What you built#

  • A full leave request solution (table, forms, decision table, workflow and report) from one paragraph of text.
  • A plan you reviewed and changed before anything was created.
  • An admin form, so your admins maintain the leave types without editing the table.
  • One package that holds it all: remove it in one go, build new versions, or share it to the community gallery (the Agent can submit it for review).
  • Drafts that you tested and published yourself.

Next steps#

Was this page helpful?