Skip to main content
This example gives the agent a set of values in plain English. The agent finds the matching fields, fills them in, submits the form, and returns what the server received.
  • The form is httpbin.org/forms/post, a public test form that echoes the submission back.
  • output_schema makes the task return JSON in a fixed shape, and the code validates it.
Before you run it, set ANCHORBROWSER_API_KEY and install the SDK. The Node.js version also needs zod 4, and the Python version needs pydantic.

Output

Both scripts on this page were run against the live API on November 27, 2026. This is the output of one of those runs. Your values will differ.

Notes

  • The agent picked the radio button and the checkboxes from the labels. The returned values are the form’s own field values (medium, bacon, cheese), not the words in the prompt.
  • The task result is checked: a status other than success raises an error instead of printing a failure as if it worked.
  • The session is ended in a finally block. A task does not end the session it runs in.