Create forms with an agent
Review exact agent-authored questions, submit definition JSON, and continue automatically after authorization.
Recommended: let the agent write the questions
Ask a terminal-capable agent:
Create a library feedback form using Pollaris. Install the CLI if needed.
Write the questions yourself and show me the exact text, types, options,
required fields, and branches first. After my review, submit definition JSON
and publish it. Open the specific authorization link if needed and continue
the saved operation after I approve access.The agent checks pollaris --version, installs with uv tool install pollaris-cli or pipx install pollaris-cli if needed, and writes the reviewed definition JSON. It then runs:
pollaris forms create \
--definition definition.json \
--title "Library feedback" \
--publish --open-browser --wait --timeout 45 --jsonCheck the installed command's --help for --open-browser; older versions can return the authorization link for the agent to open using its host tool instead. Prefer --draft-only when the user has not authorized publication. The CLI always uses https://api.pollaris.cc; no endpoint environment variable is needed.
Authorization and continuation
The CLI opens the exact device-authorization URL when --open-browser is used, including from an agent environment. The user signs in or creates an account, selects a workspace if needed, and approves access on that page. The command continues while waiting. Stored credentials are reused later.
If approval is still pending when the wait ends, exit code 10 returns JSON with status: "requires_authorization", authorization.url, and next_action.command. The agent opens that exact URL if it has not already been opened, then runs the returned command after approval. Browser navigation to the homepage or dashboard and manual API-key creation are unnecessary.
If status is pending (exit 11), run next_action.command again for the same saved operation. Do not create a second form to retry. A wait timeout does not cancel a submitted job.
pollaris operations resume OPERATION_ID --wait --timeout 45 --jsonThe final result has status: "completed" and form. A published form includes form.public_url; a draft includes its ID and revision but no public URL. Report any warnings.
Choose a workspace
Authorization grants one workspace. Select it on the authorization page or pass --workspace WORKSPACE_UUID. A separate --profile NAME keeps a separate login session for another account or workspace.
Publish an existing draft
Inspect with pollaris forms get FORM_ID --json, review the current definition, then publish its inspected draft_revision:
pollaris forms publish FORM_ID --expected-revision REVISION --wait --jsonOptional: ask Pollaris AI to generate questions
--prompt and --prompt-file send an instruction to Pollaris's generation service. The agent has not authored or verified the resulting question text beforehand. Use this mode when the user specifically wants Pollaris AI to generate the form; create a draft and inspect it before publishing:
pollaris forms create --prompt "Create a short library feedback form" --draft-only --wait --jsonFor exact questions written and reviewed in the agent conversation, use --definition. Provide exactly one input source.
See AI-agent workflow and MCP connections.