GetABrain

v0.3.1
io.github.Guitarmaniac24/getabrain Checked 4 days ago Published 3 days ago

Real human judgment as agent tools — ask a question, get a structured human answer back.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

get_balance

Check the prepaid balance (in cents) available to fund submit_query calls, plus account mode. Call before submit_query if unsure funds suffice, or whenever a query fails/stalls for balance reasons. Read-only, no side effects, free to call. Response includes mode ("test" = sandbox key: SIMULATED answers from an AI stand-in, not real people; "live" = real key, real people, real spend), sandbox_credit_cents (promotional credit, simulated answers only, no cash value), and when relevant whether auto_reload is on, plus an auto_reload_setup_url + hint to enable it so a live account does not stall at…

submit_query

Submit a structured question to real human workers, returning a query_id -- the entry point for any human-in-the-loop (HITL) step: judgment calls, subjective evaluation, approval/review, or "ask a real person" tasks a model should not answer itself. "type" selects the question format (one of: text, multiple_choice, rating_scale, image_comparison, ranking, yes_no, sentiment, image_selection, free_form_text, video_review, audio_review, image_analysis, ab_test, voice_capture, video_capture, photo_capture); "content_data" is the matching type-specific payload (e.g. ab_test: {question, variant_a:{d…

ParameterTypeDescription
content_data *objectType-specific payload whose required fields depend on "type" (e.g. {question, variant_a, variant_b} for ab_test; {question} for yes_no; {question, scale_type, scale_min, scale_max} for rating_scale).…
required_responses *integerNumber of distinct human worker responses to collect before the query is considered complete (1-1000).
title *stringShort human-readable title for the query, shown to workers as the task headline (5-255 characters).
type *stringQuestion format/template. One of: text, multiple_choice, rating_scale, image_comparison, ranking, yes_no, sentiment, image_selection, free_form_text, video_review, audio_review, image_analysis, ab_tes…
bid_amount_centsintegerOptional. Omit to use the balanced suggested bid (1.5x the minimum). Set higher for faster answers. Cents paid to EACH worker per accepted response (absolute floor 5 = $0.05, max 10000000 = $100,000.0…
bonus_amount_centsintegerOptional extra cents paid to EACH worker on top of bid_amount_cents per accepted response (default 0). Included in the total cost calculation.
descriptionstringOptional longer explanation/context shown to workers alongside the title, for extra instructions or background.
expires_in_hoursintegerOptional auto-expiry in hours (1-168, default 72). If required_responses have not arrived by then the query expires and the unspent escrow is refunded to your balance automatically.
min_worker_qualitynumberOptional minimum worker quality score (0-5) required to accept this query; higher restricts to more experienced/reliable workers.
quote_onlybooleantrue = return the exact price (quote.total_cost_cents) and speed options WITHOUT sending or charging anything.
required_answer_devicesarrayOptional: only answers SUBMITTED from these devices (phone/tablet/desktop) count. Empty = any.
speedstringOptional pay level used when bid_amount_cents is omitted: relaxed/standard/fast/rush = 1x/1.5x/2.5x/4x the type minimum bid. Faster pays workers more so they pick it up first; no answer time is promis…
webhook_urlstringOptional public https URL to receive signed response.submitted / query.completed events for THIS query (overrides the account-level webhook). Lets an agent stop polling. Signature: HMAC-SHA256 in X-GA…

get_responses

One-shot read: fetch a query's current status and whatever human responses have been submitted so far, without waiting. Use this to check progress on demand, or after wait_for_responses reports "pending" if you want an immediate snapshot instead of polling again. Read-only, no cost, returns instantly (does not block or retry). Disambiguation: unlike wait_for_responses, this never delays or blocks waiting for more answers to arrive -- it just reports what exists right now, which may be fewer than required_responses.

ParameterTypeDescription
query_id *stringThe id returned by submit_query, identifying which query to read.

wait_for_responses

Poll for human responses to a query, blocking for up to max_wait_seconds (default 50, max 50) before returning. Use right after submit_query to wait for real answers in one call instead of manually re-checking with get_responses. DOES NOT GUARANTEE COMPLETION -- if min_responses have not arrived within the time budget it returns status "pending" rather than erroring. Human answers can take minutes to hours, so a "pending" result is normal; get_responses returns later answers. Returns status "ready" with the responses array once enough have arrived (or the query otherwise completed). Read-only…

ParameterTypeDescription
query_id *stringThe id returned by submit_query, identifying which query to wait on.
max_wait_secondsintegerMaximum seconds to poll before giving up and returning status "pending" if not enough responses arrived yet (default 50, max 50).
min_responsesintegerHow many responses must arrive before returning status "ready" (default: the query's required_responses).

list_queries

List your recent GetABrain queries, most recent first. Use this to get an overview of past/active queries, recover a query_id you lost track of, or filter by status (e.g. find everything still "active" or "pending"). Read-only, no cost. Disambiguation: this lists MANY queries at a summary level; it does not return the individual worker responses for any one query -- use get_responses or wait_for_responses with a specific query_id for that.

ParameterTypeDescription
limitintegerMaximum number of queries to return, most recent first (1-100, default server-side).
statusstringOptional filter to only return queries in this status (e.g. "active", "pending", "completed", "cancelled", "failed", "expired"). Omit to return all statuses.

rate_response

Rate a single worker's response 1-5 to feed the worker quality/reputation system, optionally with free-text feedback. Use after reviewing a response from get_responses/wait_for_responses, to reward good answers and flag poor ones -- this affects the worker's quality score and future eligibility (e.g. queries with min_worker_quality set) and can trigger rewards/suspension server-side. Side effect: writes a rating record and returns the updated worker quality score; does not resubmit or modify the original response. Disambiguation: rates a response you already have -- does not fetch new response…

ParameterTypeDescription
query_id *stringThe id of the query the response belongs to (from submit_query).
response_id *stringThe id of the specific response to rate (from get_responses/wait_for_responses output).
score *integerQuality rating for the response, 1 (worst) to 5 (best). Feeds the worker's ongoing quality score.
feedback_textstringOptional free-text comment explaining the rating, visible to the worker.