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.
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
artifactsarray. - Operational tracking - Keep your system of record synchronized with Gradial task IDs, status states, messages, and artifact metadata.
How The Integration Works
- Discover Grady’s public agent card.
- Authenticate your server-side integration with an external API key or OAuth bearer token.
- Discover the Gradial workspace and environment IDs for the customer organization.
- Send
message/sendto create a non-blocking Gradial task. - Poll
tasks/getfor status, history, pending input, and artifacts. - Send follow-up
message/sendcalls when Grady asks for input or when your system needs to add context. - Download generated file artifacts from signed URLs returned in
artifacts.
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 theX-API-Key header:
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.
Workspace And Environment IDs
Task creation requires a Gradial workspace ID and environment ID. Discover them before creating the first task: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.
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:- Your system creates a short-lived HTTPS download URL for each file.
- Your A2A message includes a normal text instruction part plus one or more
kind: "file"parts withfile.uri. - Gradial downloads the file server-side, validates size and type, stores it as a Gradial attachment, and persists the user message with those attachments.
- Grady uses the attachments as task context in the same way it uses files uploaded through the Gradial UI.
message.taskId set to the returned Gradial task ID.
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 thefile.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.
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
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 becomesinput-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
messageIdvalues 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.urivalues, or your rollout has an agreed alternate transfer pattern. - Your integration can reach
https://app.gradial.comto poll task status and download artifact URLs. - Your client handles
input-requiredtasks and can send follow-up messages. - Your planned request rate and concurrency have been reviewed with Gradial before production launch.