Gradial’s Agent2Agent (A2A) server exposes Grady through an authenticated JSON-RPC API based on A2A, the open protocol originally introduced by Google. Customer systems can create Gradial tasks, attach source files, monitor progress, answer follow-up questions, request cancellation, and retrieve generated artifacts without opening the Gradial UI for every handoff. Use A2A when your organization has an approval agent, workflow orchestrator, case-management system, or internal automation layer that needs to delegate marketing execution work to Grady and receive structured results back.

Protocol And API Surface

A2A provides the interoperability model for agent collaboration and handoffs. Gradial implements that model as authenticated API endpoints that customers can call from trusted server-side systems. This means you can use the same surface in two ways:
  • Agent collaboration - Another A2A-capable agent can discover Grady, create a task, continue it, and retrieve artifacts through the protocol.
  • Programmatic work handoff - A customer-owned service can create Gradial work from an approval workflow, ticketing flow, batch process, or internal application, then poll status and sync the result back to the system of record.
In both cases, Gradial treats the request as a governed task in the customer’s Gradial organization, scoped by the API credential, workspace ID, and environment ID.

What A2A Unlocks

  • Programmatic task creation - Create Grady work from an authenticated backend service instead of relying on manual UI entry.
  • External approval workflows - Route an approved brief, copy doc, legal markup, or campaign request into Gradial as a governed task.
  • Agent-to-agent delegation - Let your internal agent hand work to Grady, then poll until the task is ready for review or needs more input.
  • File-based review - Send PDFs, Word documents, spreadsheets, presentations, images, CSVs, Markdown, JSON, XML, or DITA files as task context.
  • Artifact retrieval - Download documents and other generated file outputs from the task’s A2A artifacts array.
  • Operational tracking - Keep your system of record synchronized with Gradial task IDs, status states, messages, and artifact metadata.

How The Integration Works

  1. Discover Grady’s public agent card.
  2. Authenticate your server-side integration with an external API key or OAuth bearer token.
  3. Discover the Gradial workspace and environment IDs for the customer organization.
  4. Send message/send to create a non-blocking Gradial task.
  5. Poll tasks/get for status, history, pending input, and artifacts.
  6. Send follow-up message/send calls when Grady asks for input or when your system needs to add context.
  7. Download generated file artifacts from signed URLs returned in artifacts.
Gradial maps one A2A task to one Gradial task thread. The A2A taskId returned by Gradial is the thread ID you should store and reuse for polling and follow-up messages.

Endpoints

Use the Gradial app host unless your Gradial team gives you a tenant-specific host.
The agent card is public so A2A clients can discover Grady before they have credentials. Task operations are authenticated customer API calls.

Authentication

Most customer integrations call the A2A API from a trusted backend service using a Gradial external API key in the X-API-Key header:
Organization owners or admins can create external API keys from Developer Settings when external API access is enabled for the organization. If Developer Settings is not available for your rollout, your Gradial representative will provision credentials and exchange them through your approved secure channel.
API keys are scoped to a single Gradial organization for A2A. Store them in your server-side secret manager, rotate them on your normal credential schedule, and do not embed them in browser code or distributed clients.
Gradial can also support OAuth bearer tokens for organizations that have an external OAuth application configured. Your Gradial representative will confirm whether OAuth is part of your onboarding path.

Workspace And Environment IDs

Task creation requires a Gradial workspace ID and environment ID. Discover them before creating the first task:
Use the returned workspaces[].id as metadata.gradial.workspaceId and the returned workspaces[].environments[].id as metadata.gradial.environmentId. Do not send display names in A2A requests. Names can change; IDs are stable.

Create A Task

Gradial supports a fire-and-poll model. message/send creates or continues a task, and tasks/get retrieves status and results.
Store result.id from the response. Use it as message.taskId in follow-up messages and as params.id in tasks/get. Set message.messageId to a unique client-generated identifier for each new message. If your system retries the exact same message after a network failure, reuse the same messageId so Gradial can treat the retry idempotently. Use a new messageId for each new follow-up message.

File Transfer

Gradial supports A2A file parts by URI. This is the supported path for binary assets and larger documents. Inbound file transfer works like this:
  1. Your system creates a short-lived HTTPS download URL for each file.
  2. Your A2A message includes a normal text instruction part plus one or more kind: "file" parts with file.uri.
  3. Gradial downloads the file server-side, validates size and type, stores it as a Gradial attachment, and persists the user message with those attachments.
  4. Grady uses the attachments as task context in the same way it uses files uploaded through the Gradial UI.
Follow-up messages use the same file shape with message.taskId set to the returned Gradial task ID.
The A2A endpoint is not a multipart upload endpoint. Inline file.bytes is not supported, and binary data should not be placed in the JSON-RPC body.

Why Signed URLs

URI-based file exchange is a standard pattern for moving files between systems without copying long-lived storage credentials between them. The A2A specification includes file exchange where generated artifacts can be returned as URL-based file references, and the same model is widely used across major object storage platforms: This pattern keeps the source system in control of the file, the allowed operation, and the expiration time. It also avoids granting Gradial permanent access to the customer’s storage account.

Network And Firewall Guidance

The current file-transfer contract is URI-based: Gradial pulls inbound files from the file.uri you provide, and your system pulls generated file artifacts from signed URLs that Gradial returns. For inbound files, the URL must be reachable from Gradial infrastructure over HTTPS. If your object store, API gateway, or firewall restricts access by source IP, allowlist Gradial’s egress IP addresses before testing. See IP Allowlisting. Use these settings for customer-hosted file URLs: If your security policy requires customer systems to push bytes directly into Gradial storage instead of allowing Gradial to fetch a short-lived URL, raise that during onboarding. That is a different transfer pattern from the current A2A contract and should be scoped with your Gradial team before production rollout.

File Limits

Supported input file types include PDF, Word, Excel, PowerPoint, common image formats, plain text, CSV, Markdown, JSON, XML, and DITA. Executable, HTML, JavaScript, SVG, and script-like extensions are rejected.

Generated Artifacts

When Grady produces downloadable files, tasks/get returns them in the task artifacts array as A2A file parts.
Download file artifacts promptly. Gradial storage artifacts use short-lived signed URLs. If your environment restricts outbound internet access, allow your integration runtime to reach https://app.gradial.com. Non-file artifacts return compact data parts with public metadata such as artifact ID, type, name, status, review status, timestamp, and URL when available.

Poll Status And History

Common status states: historyLength controls how many visible conversation messages are returned. History does not expose hidden internal reasoning, tool-call IDs, internal tool names, or internal user IDs.

Answer Follow-Up Questions

When Grady needs structured input, the task state becomes input-required and the status message includes a gradial.pendingInput data part. Your client should render that data part rather than parsing a natural-language question from the text. Continue the task with message/send and the existing task ID:

Production Readiness Checklist

  • External API access is enabled for your Gradial organization.
  • Your integration has an external API key or OAuth app scoped to the correct organization.
  • Workspace and environment IDs are discovered and stored by ID, not by display name.
  • Your messageId values are unique per new message, with the same ID reused only for safe retries of the same message.
  • File URLs are HTTPS, short-lived, and reachable from Gradial egress.
  • Your firewall allows Gradial to fetch inbound file.uri values, or your rollout has an agreed alternate transfer pattern.
  • Your integration can reach https://app.gradial.com to poll task status and download artifact URLs.
  • Your client handles input-required tasks and can send follow-up messages.
  • Your planned request rate and concurrency have been reviewed with Gradial before production launch.

Troubleshooting