A2A agent
Infinite Audience accepts standard A2A 1.0 JSON-RPC, with A2A 0.3 JSON-RPC compatibility at the same endpoint. It supports text requests, asynchronous tasks, status polling, cancellation, and server-sent streaming. Push notifications and an authenticated extended card are not advertised.
| Action | Endpoint |
|---|---|
| Read the public Agent Card | GET https://a2a.infiniteaudience.ai/.well-known/agent-card.json |
| Send a JSON-RPC request | POST https://a2a.infiniteaudience.ai/a2a |
The card lists the supported interface versions, skills, OAuth flows, and required scopes. Interactive clients should use authorization code with PKCE or device authorization. API-key exchange is an unattended server-to-server fallback. Every task request needs a bearer token; delegated OAuth tokens must be bound to the A2A resource.
For an interactive client, choose Sign in with Infinite Audience. The client opens a browser for approval or shows a device code when it cannot receive a browser callback. It then keeps the OAuth connection current using refresh tokens. Users do not need to handle an API key.
For an unattended service you control, store an API key in its secret manager and exchange it at POST /v1/auth/token. Supply the resulting bearer on every A2A request, including status polls. The bearer lasts about one hour and has no refresh token, so check its expiry and exchange the key again shortly before it expires. The TypeScript and Python examples show one task submission and bounded status polling. The key never goes in a chat prompt or Agent Card.
Connect from an AI chat
Section titled “Connect from an AI chat”Paste this into a client that can actually initiate A2A:
Read the Infinite Audience Agent Card athttps://a2a.infiniteaudience.ai/.well-known/agent-card.json. Connect over itsA2A 1.0 JSON-RPC interface; use its 0.3 interface only if your client does notsupport 1.0. Start the advertised OAuth flow for the A2A resource, using PKCEor device authorization as your client supports. Show me the sign-in link andone-time code if needed, then pause while I approve access. Start with thediscovery scope. Select a skill from the card and send its id asparams.metadata.skill; set configuration.returnImmediately=true for long workand poll GetTask or tasks/get. Do not run a billable or mutating task withoutasking me first. If this client has no A2A support, tell me and recommend MCP.Never ask me to paste an API key or silently switch protocols.The discovery scope can run backend queries or refresh cached counts; it does not purchase records. Select creator only for audience, matching, or delivery work. Request account-read for the read-only account-info skill. Existing server-to-server callers with account retain access. Neither scope authorizes purchases through this skill. Credit purchases and subscription/portal transactions are not A2A skills.
See OAuth for partners and agents for the browser and device flows.
Describe a complete task
Section titled “Describe a complete task”The same object model and filter guide applies to A2A. State whether you want to explore a population, save a segment, compose an audience, organize a campaign, or purchase a delivery. Include returned object IDs when continuing work. The public Agent Card lists supported skills and their required scopes.
Ask the agent to discover allowed fields and coded values before building filters. Catalog responses are paginated and pricing is opt-in. Audience detail includes campaign membership and the filters of its constituent segments. For capped segments, provide State, City, or ZIP Code geography. External mutations address one object at a time. Archival is reversible; bulk and destructive deletion are not external-agent operations.
For a matched upload, follow the returned upload URL, upload the file, request column analysis, review the mappings, and then confirm them. A created upload alone is not a running matching job. Long-running similarity and propensity work returns a workflow ID. At a human review gate, read the returned choices and respond to that gate; do not invent a gate ID or repeat a completed decision.
Send a task
Section titled “Send a task”The following is a non-purchasing example. The standard A2A request carries the selected skill in params.metadata.skill; clients that omit a skill are limited to general discovery access. The server independently checks the token scope and the public skill allowlist.
const response = await fetch('https://a2a.infiniteaudience.ai/a2a', { method: 'POST', headers: { Authorization: `Bearer ${accessToken}`, 'Content-Type': 'application/json', 'A2A-Version': '1.0', }, body: JSON.stringify({ jsonrpc: '2.0', id: crypto.randomUUID(), method: 'SendMessage', params: { message: { messageId: crypto.randomUUID(), role: 'ROLE_USER', parts: [{ text: 'Count customers in California ages 25–34.' }], }, metadata: { skill: 'discovery-count' }, configuration: { returnImmediately: true }, }, }),});const envelope = await response.json();const taskId = envelope.result?.task?.id;// Poll GetTask with { id: taskId } or use SendStreamingMessage for SSE.A2A 0.3 clients use the same /a2a URL with 0.3 JSON-RPC methods such as message/send and tasks/get. The old proprietary /tasks and /a2a/tasks REST routes are not A2A 0.3 and have been retired.
Skills
Section titled “Skills”The public card supplies the list below at docs build time.
discovery-count — Discovery Count discovery
Count matching records in the audience graph given geo, demographic, behavioral, or custom filter criteria. Accepts saved segment IDs, audience IDs, multi-segment composition, filter_groups, or flat filters. Returns total record count without purchasing records; backend compute usage is recorded as non-commercial telemetry. Requires 'discovery' scope.
discovery-lookup — Discovery Lookup discovery
Return masked sample rows and field metadata for a defined audience without purchasing records. Accepts saved segment IDs, audience IDs, multi-segment composition, filter_groups, or flat filters. Useful for validating filter criteria before committing to a delivery; backend compute usage is non-commercial telemetry. Requires 'discovery' scope.
discovery-crosstab — Discovery Crosstab discovery
Cross-tabulate a population by two categorical dimensions (e.g. state x gender) and return a pivot table of counts. Accepts saved segment IDs, audience IDs, multi-segment composition, filter_groups, or flat filters. Backend compute usage is non-commercial telemetry. Requires 'discovery' scope.
discovery-overlap — Discovery Overlap discovery
Calculate how many records appear in both of two populations (audiences, segments, or ad-hoc filter sets) and return overlap count, overlap_pct, and demographic deltas. Backend compute usage is non-commercial telemetry. Requires 'discovery' scope.
audience-management — Audience Management creator
Create and manage audiences: composition wrappers that group one or more segments for delivery. Audiences have no subtype — use segment-management to create typed cohorts. Duplicate an existing audience via the duplicate_audience tool — the duplicate carries the source composition with lineage tracking (parent and root ancestor recorded, segment versions pinned) and starts with a null record count until recounted. Refresh a stale or expired audience via the refresh_audience tool — since an audience is a composition of one or more member segments (possibly mixed subtypes) with no single 'primary' segment, refresh_audience requires a segment_id naming which member to refresh; it refreshes that segment and bumps the audience's own version/expiry, but never any other audience referencing the same segment. Operate on one audience per action. Archival is reversible via archive_audience with restore=true; external agents do not delete audiences. Requires 'creator' scope.
segment-management — Segment Management creator
Create and manage segments of all types: filter (criteria-based), matched (uploaded CSV/JSON/JSONL/Avro lists, optionally gzip-compressed and split into same-format shards), similarity (lookalike), and propensity (model-scored). Matched segments accept residential, work, or auto spatial matching; auto expands commercial workplace inputs. Segments are reusable cohort definitions that can be composed into audiences for delivery. Duplicate any segment via the duplicate_segment tool — the duplicate preserves the subtype and all subtype-specific data (referenced, never recomputed) with lineage tracking; filter duplicates start with a null count while other subtypes carry the source counts, and duplicating a matched segment whose match data is unavailable is rejected with a 409 conflict. Refresh a stale segment against the current identity graph via the refresh_segment tool — referencing audiences are never touched; archived segments and matched duplicates that share another segment's data are rejected with a 409. Use patch_segment to rename or replace a filter definition. Operate on one segment per action; archive_segment supports reversible archival and restoration. Requires 'creator' scope. For get_segment_demographics, get_segment_audiences, and count_segment (which require only 'discovery' scope but can meter compute or update cached state), submit under the segment-lookup skill instead.
segment-lookup — Segment Lookup discovery
Segment inspection: get a demographic breakdown via get_segment_demographics (any subtype — non-filter segments resolve via the same ID-set composition audiences use), list the audiences that reference a segment (with campaign linkage) via get_segment_audiences, or recount via count_segment (runs a fresh BigQuery count for any subtype). Demographics and recount operations record non-commercial compute telemetry. Requires 'discovery' scope.
catalog — Data Catalog discovery
Browse the enrichment field catalog (available data attributes, coverage rates, and pricing structure: base rate, field surcharges, destination surcharges). Call before building enrichment audiences to discover valid options. Requires 'discovery' scope.
identity-resolution — Identity Resolution & Match History creator
Synchronous or file-based identity resolution, plus full match history access. Synchronous inline resolution for up to 100 contact records (email, phone, name, address) supports residential, work, or auto spatial matching; auto expands commercial workplace inputs. It returns match statistics via a MATCH_REPORT (matchCount, matchRatePct, recordCount) and emits usage per matched record when the records leave in the response. For larger datasets, use the segment-management skill (subtype=matched) to start an unbilled file-processing job; its one-time match usage is emitted only on the first successful delivery. Match history: list or retrieve past micro-batch runs (run_id, match_rate, amount_charged, created_at) and file-based match jobs (match_id, matching_status, segment_id, audience_id). amount_charged is a conservative pending-usage estimate for micro-batches and remains null for a file job until its first delivery. Supports cursor pagination for unlimited history depth. Requires 'creator' scope; for history-only reads use the match-history skill, which requires only 'discovery' scope.
match-history — Match History discovery
Retrieve and paginate through the organization's identity resolution history. Covers both micro-batch runs (POST /v1/match) and file-based jobs (POST /v1/match/file). Returns run_id or match_id, match_count, match_rate, amount_charged, input_record_count, status, created_at, and expires_at. Micro-batch amount_charged is a conservative pending-usage estimate; file-job amount_charged remains null until the first successful delivery emits its one-time match usage. File jobs also expose segment_id, audience_id, and matching_status. Use to audit recent activity, compare estimated usage costs, or find a specific job by date range. Requires 'discovery' scope — no creator scope needed.
integration-result-history — Integration Result History discovery
List or retrieve safe, retained integration activity without exposing private workflow artifacts. Results include provenance, counts, selected fields, billing rail, promotion deadline, and durable Library links. Requires 'discovery' scope.
integration-result-promotion — Save Integration Result creator
Preview saved integration matches, then create or extend a matched Segment using already-settled identities. Confirm the preview and target with the user. A stable request_id makes retries idempotent; this does not re-run enrichment or create a second usage charge. It does not create an Audience automatically; compose one separately when needed. Requires 'creator' scope.
delivery-history — Delivery History discovery
List past deliveries for a given audience or file-based match job, or org-wide across all audiences with optional status/destination/audience filters and cursor pagination. Each entry includes destination, status, record count, cost, output format, explicit output compression, stored byte size, and timestamps. Useful for auditing prior purchases or resuming a workflow. Requires 'discovery' scope.
pricing — Pricing & Quoting discovery
Get an expected usage estimate and maximum estimate for an audience download. Present the expected price and maximum separately; these are estimates, not a binding quote. Returns cost_estimate (total, base, one-time deferred file-match cost when applicable, field, and destination surcharges), billing_count, sufficient_balance, shortfall, and already_delivered (true when this exact delivery has been made before and re-delivery is free). LiveRamp and Narrative remain unavailable until their partner pushes can confirm data egress. Requires 'discovery' scope.
data-purchase — Audience Delivery creator
Initiate a direct download for a saved audience (CSV/JSON/JSONL with optional gzip, or Avro with native DEFLATE). The first successful delivery of completed file-match data also emits that run's one-time match usage. Output compression is explicit and never inherited from input uploads. A different format/compression after an already-paid delivery is re-exported without another delivery or match charge. LiveRamp and Narrative remain unavailable until their partner pushes can confirm data egress. Use the pricing skill first to confirm pricing. Requires 'creator' scope.
delivery-status — Delivery Status discovery
Check the status and download URLs for a specific delivery. Poll after initiating a delivery to determine when records are ready. Note: download_urls are short-lived presigned GCS URLs regenerated fresh on every GET — do not cache them. Requires 'discovery' scope.
account-info — Account & Balance
Retrieve the org's source-routed billing state: active contract and rated current-period usage, effective prepaid balance after reservations/pending usage, automatic-recharge state, postpay ceiling, payment readiness, and projection staleness. A parent-billed child sees only its own attributed usage and never the agency's pooled balance or invoices. Requires 'account-read' scope (or account scope for existing API keys). Reads billing status only; cannot purchase credits or change account settings.
campaign-management — Campaign Management creator
Create, update, and archive campaign workspaces, including their campaign brief and goals. Link or unlink audiences from campaigns — a campaign holds many audiences, an audience belongs to at most one. Pass metadata.campaign_id to supply an active campaign context for the turn; audiences created in that turn join it, and segments record it as their origin_campaign_id. Requires 'creator' scope. For read-only campaign list and detail requests, submit under the campaign-lookup skill instead — it only requires 'discovery' scope.
campaign-lookup — Campaign Lookup discovery
Read-only campaign inspection: list campaigns or get a single campaign's brief and linked audiences. Pass metadata.campaign_id to supply an active campaign context for the turn. Requires 'discovery' scope.
Account-status results include money_display: currency amounts keyed by the original _cents field path. Use these strings directly when explaining balances; do not divide them again. The original cents fields remain authoritative, and missing/null amounts remain unknown. Preserve any projection-staleness caveat.
