Estimate and run a single-choice survey
The agent obtains a credit estimate for a survey question, posts the question to the 50heads platform, waits for 50 real people to answer, and returns the aggregated results and summary note to the user.
How it works
The agent first constructs a question draft with type, text, options, and parameters like n=50. It calls the estimate endpoint to check the credit cost without spending any. Upon user confirmation, it posts the question using an idempotency key to ensure safety on retries. The agent then polls the wait endpoint every 25 seconds until the question is complete. Finally, it retrieves and presents the result summary. The agent should verify the question text is clear and options are mutually exclusive before posting.
Prompt
Paste this into an agent that has the servers below connected. Adjust the names and dates to your own.
Create a survey asking 'Which menu would you order from tonight?' with options 'Menu A' and 'Menu B'. Get 50 answers. First, estimate the cost. If the cost is acceptable, post the question and wait for the results. Return the final summary note.MCP servers it needs
Source
The vendor page this playbook is drawn from, and the passage that supports it.
The API is small enough to call directly. These examples estimate, ask and wait for one question.SDKs and examples — 50heads