https://alai-standalone-backend.getalai.com/a2a
The A2A endpoint is in beta. The Alai Agent currently exposes a single
skill —
manage_presentation — that edits an existing presentation. To
create a presentation from scratch, use the REST /generations
endpoint or MCP, then hand the
presentation_id to the Alai Agent for follow-up edits.When to use A2A vs MCP vs REST
A2A
Your autonomous agent needs to delegate work to the Alai Agent and
handle a task lifecycle (streaming updates, mid-task questions, retries).
Standardised protocol, agent-to-agent.
MCP
A human-driven AI editor (Claude, Cursor, VS Code, ChatGPT) needs Alai
tools wired into its tool palette via OAuth.
REST
A traditional backend or script needs straight HTTP request/response
with API key auth.
Authentication
A2A uses the same API keys as the REST API (sk_…). Pass them as a Bearer token:
api-key header is also accepted as a fallback for clients that can’t set Authorization.
Agent Card Discovery
Every A2A server publishes an Agent Card describing its identity, capabilities, supported protocols, skills, and security requirements. Standard-compliant A2A clients fetch this card first and then route requests according to its contents.Quickstart
A single streaming edit request looks like this on the wire. For Python, TypeScript, or other languages, use the officiala2a-sdk, which wraps these endpoints in idiomatic clients.
Reuse the same
context_id across turns to keep the Alai Agent in the same
conversation (so it has memory of earlier edits). Generate a new one when
starting a fresh session.The manage_presentation Skill
The Alai Agent currently exposes one skill that handles edits to an existing presentation.
Required input
A request without
presentation_id, or one referencing a presentation the API key cannot access, returns 400 Bad Request.
What the agent can do
- Modify slide content, layout, themes, and structure on existing presentations
- Export the presentation to PDF or PPTX (delivered as artifacts — see below)
- Ask clarifying questions when an edit is ambiguous (see Handling INPUT_REQUIRED)
What the agent will not do
- Create a new presentation from scratch (use
POST /generationsinstead) - Return download or share URLs inside its text reply — those are always delivered as separate Artifacts
Example prompts
Task Lifecycle
Every request creates a Task. A2A clients stream task state transitions and any artifacts emitted along the way.
A typical happy-path sequence:
Handling INPUT_REQUIRED
When the Alai Agent needs more information to fulfill a request (e.g. you said “change the chart” but didn’t say to what), the task transitions to TASK_STATE_INPUT_REQUIRED. The status message contains the question(s) for you or your upstream user to answer.
To resume, send a new message with the same context_id and the same task_id. The agent will treat your reply as the answer to the pending question and continue from where it left off.
Artifacts
Artifacts are first-class outputs the agent attaches to a task. The Alai Agent emits up to three:
Example artifact event:
Exports are generated asynchronously and may take up to a few minutes for
large presentations. If an export does not complete within that window, the
task still finishes and the agent’s reply will explain that the export is
still in progress.
HTTP Endpoints
Alai’s A2A server exposes the standard set of REST endpoints defined by the protocol. Most integrations should use the officiala2a-sdk rather than calling these directly, but they’re listed here for reference and curl-based testing.
All endpoints except agent-card discovery require
Authorization: Bearer YOUR_API_KEY. The wire format follows the A2A protocol v1.0 specification.
Error Responses
Failures that happen after a task has started surface as
TASK_STATE_FAILED on the task itself, not as HTTP errors — by that point the request has already been accepted, so the failure lives in the task lifecycle.
Next Steps
Generate a presentation first
A2A only edits existing presentations — start with the REST
/generations
endpoint or MCP.MCP Integration
Human-driven AI editors (Claude, Cursor, VS Code, ChatGPT) — different
protocol, different use case.