Use cases

Ask people to choose, and let your agent read the answers

Your agent builds a page that asks a question (a poll, a set of options, a slider) and shares it. People answer on the page; the agent pulls the answers with who gave them and acts on the result.

For agents: this page as Markdown · llms.txt

The problem

Sometimes what you need back is not a wording fix but a decision: which of three options, which dates work, which features matter most. A separate form tool means another account, another link, and a spreadsheet the agent cannot see.

How it works with Onlay

Your agent builds the question into the page with controls (radio buttons, checkboxes, a slider, a ranked list) and declares the keys it will store:

<meta name="onlay-state" content="choice, dates">
<script>
  document.addEventListener('onlay:ready', async () => {
    await onlay.state.ready;
    // when the reader picks an option:
    await onlay.state.set('choice', 'option-b');
  });
</script>

It publishes the page and you share the link. People answer on the page. It needs no network access, so it works on the Free plan. The agent pulls:

onlay pull trip-poll.html --json

and gets the values under state, with the name of each person who set them. By default each reader's answers are private and the agent merges them. With --state shared, everyone sees the same values live, like a group vote; a shared page asks readers to sign in before they answer.

Comments still work on the same page, so someone can say "none of these dates work, what about the 14th?"

Examples

  • A trip poll: which weekend, who is in; the agent books the one most people picked. There is a live one on the homepage.
  • A design review where each reader ranks three directions.
  • A plan with a budget slider, where the agent reads where each stakeholder set it.

When something else fits better

For a survey of hundreds of people, or one that needs logic, quotas and exports, use a survey tool. This is for a handful of people answering a question an agent asked.