Skip to main content
A goal is the goal field you send with a run: a plain-English description of what you want TinyAgent to accomplish on a page. You describe the outcome — TinyAgent works out which clicks, typing, and scrolling get there, not the other way around.

The mental model

Think of TinyAgent as a capable assistant sitting in front of a browser: it can see what’s on the screen, click, type, scroll, and navigate, remember information across steps, and return structured data. What it can’t do is read your mind about what you meant or know your business context unless the goal says so. Your job is to remove ambiguity — the more explicit the goal, the fewer steps TinyAgent spends guessing.

What a goal controls, and what TinyAgent decides on its own

A goal states the outcome, not the sequence of actions. On each step of a run, TinyAgent reads the current page and picks the action that moves the goal forward, then reads the page again once that action lands — nothing in the goal has to spell out “navigate first, then extract.” See How TinyAgent Works for that loop. Three things follow from that:
  • The shape of the answer is a judgment call, unless you pin it down. Without an output schema, TinyAgent structures result from the goal’s wording and whatever the page shows — so the same goal can come back with different field names on different sites, or even on the same site over time. Add a schema when your code needs the same shape every run.
  • “Done” is also a judgment call. If TinyAgent can’t fully satisfy the goal — a login wall, a bot check, a step limit — it still ends the run normally and writes what happened into result, rather than retrying forever or failing the run outright. See Runs for what a COMPLETED status does and doesn’t mean.
  • Explicit beats implicit. “Fill in my info” doesn’t tell TinyAgent what your info is, so it fills the gap with its own reading of the page. Spell out the values, the condition you’re checking, or the format you expect — whichever part is ambiguous — instead of leaving it to be inferred. The Goal Prompting Guide has task-specific patterns for this.
Ambiguity in the goal is cheap to fix and expensive to leave in: an unclear instruction doesn’t fail the run, it just means TinyAgent decided something you didn’t actually specify.

Quick examples

Data extraction:
Form filling:
Multi-step workflow:

How TinyAgent Works

What happens between sending a goal and getting a result back

Why Use an Output Schema

Pin down the shape of the answer instead of leaving it to the goal

Runs

What happens after you send a goal, and what COMPLETED means

Goal Prompting Guide

The anatomy of a great goal, task-specific patterns, and production-ready examples