Developer resources

A2A Task Collaboration

Propose a multi-step content project, approve it, and let Lucidry execute transform, review and publish steps autonomously.

Overview

The negotiation protocol, end to end.

  1. Discover the Agent Card

    Fetch https://lucidry.io/.well-known/agent.json. It declares the three A2A skills, their input and output schemas, the negotiation endpoints and the 5-step ceiling.

  2. Propose a plan

    POST an ordered list of steps to /v1/a2a/tasks/propose. Lucidry evaluates each step against its capabilities and returns the execution plan with status proposed.

  3. Approve or reject

    Approve the plan to start execution, or reject it with a reason. Nothing runs until the plan is approved.

  4. Execution and review

    Steps run in order. Each completed step emits a webhook; a failing step parks the task in human_review_required instead of retrying blindly.

Agent Card and skills

The published Agent Card at https://lucidry.io/.well-known/agent.json declares these three A2A skills with their input and output shapes.

lucidry.transform_content

step_type: transform

json
{ "source_artifact_id": "<deliverable id>" }
json
{ "artifact_id": "...", "content_type": "article", "word_count": 812 }

lucidry.review_content

step_type: review

json
{ "artifact_id": "<deliverable id>", "check_quality": true }
json
{ "qa_status": "passed", "quality_score": 0.91, "passed": true, "issues": [] }

lucidry.publish_content

step_type: publish

json
{ "artifact_id": "<deliverable id>", "destination_id": "<destination id>", "publish_status": "draft" }
json
{ "publishing_job_id": "...", "platform": "wordpress", "status": "pending" }

Propose a task

Up to five ordered steps. Nothing executes yet.

bash
curl -X POST https://lucidry.base44.app/functions/a2a/tasks/propose \
  -H "Authorization: Bearer lucid_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "requester_agent_id": "agent_ext_99",
    "task_type": "content_transformation",
    "steps": [
      { "step_type": "transform", "input_data": { "source_artifact_id": "art_01" } },
      { "step_type": "review", "input_data": { "artifact_id": "art_01", "check_quality": true } }
    ]
  }'
json
{
  "task_id": "a2a_task_123",
  "status": "proposed",
  "execution_plan": [
    {
      "step_number": 1,
      "step_type": "transform",
      "capability": "lucidry.transform_content",
      "required_input": ["source_artifact_id"],
      "input_data": { "source_artifact_id": "art_01" }
    }
  ]
}

Approve or reject

Approval triggers sequential execution of the plan.

bash
curl -X POST https://lucidry.base44.app/functions/a2a/tasks/a2a_task_123/approve \
  -H "Authorization: Bearer lucid_live_..."

# Reject instead: a reason is always required
curl -X POST https://lucidry.base44.app/functions/a2a/tasks/a2a_task_123/reject \
  -H "Authorization: Bearer lucid_live_..." \
  -H "Content-Type: application/json" \
  -d '{ "reason": "Budget ceiling too low for this plan" }'
bash
curl https://lucidry.base44.app/functions/a2a/tasks/a2a_task_123 \
  -H "Authorization: Bearer lucid_live_..."

curl https://lucidry.base44.app/functions/a2a/tasks/a2a_task_123/steps \
  -H "Authorization: Bearer lucid_live_..."

curl "https://lucidry.base44.app/functions/a2a/tasks?status=completed" \
  -H "Authorization: Bearer lucid_live_..."

Webhooks

Subscribe an endpoint to these events to follow a task without polling.

  • a2a.task.proposedA plan is accepted for negotiation and stored as proposed.
  • a2a.task.approvedThe plan is approved and execution begins.
  • a2a.step.completedOne step finished; the payload carries its output_data.
  • a2a.task.completedEvery step completed; the payload lists the artifacts produced.
  • a2a.task.rejectedThe plan was declined, with the caller's reason.
json
{
  "event_type": "a2a.step.completed",
  "task_id": "a2a_task_123",
  "step_id": "a2a_step_456",
  "step_number": 1,
  "step_type": "transform",
  "status": "completed",
  "output_data": { "artifact_id": "art_02", "content_type": "article" },
  "timestamp": "2026-08-31T19:20:00.000Z"
}

Step types

  • transform via lucidry.transform_content: resolves the referenced source artifact and records its content type and word count as the step output.
  • review via lucidry.review_content: returns the QA status, quality score and open issues for the referenced deliverable.
  • publish via lucidry.publish_content: queues the deliverable to one of your configured publishing destinations and returns the publishing job id.

Limits and safeguards

  • A task carries at most 5 steps. A proposal with more is refused with 400 before anything is stored.
  • step_type must be transform, review or publish. Any other value is refused with 400.
  • Every request needs an API key; an unauthenticated call is refused with 401.
  • Tasks, steps and every record they reference are organization-scoped: another tenant's task id resolves as not found.
  • Agent budget delegation still applies: a step whose work exceeds the agent's per-job or per-day ceiling is refused by the budget gate.
  • A failing step stops the run and sets the task to human_review_required; it is never retried automatically.
  • Step input_data is data only. Nothing inside it is ever executed or treated as an instruction.

Code examples

python
import requests

BASE = "https://lucidry.base44.app/functions"
HEADERS = {"Authorization": "Bearer lucid_live_..."}

plan = requests.post(
    f"{BASE}/a2a/tasks/propose",
    headers=HEADERS,
    json={
        "requester_agent_id": "agent_ext_99",
        "task_type": "publishing_pipeline",
        "steps": [
            {"step_type": "transform", "input_data": {"source_artifact_id": "art_01"}},
            {"step_type": "review", "input_data": {"artifact_id": "art_01"}},
            {"step_type": "publish", "input_data": {"artifact_id": "art_01", "destination_id": "dest_01"}},
        ],
    },
).json()

task_id = plan["task_id"]
requests.post(f"{BASE}/a2a/tasks/{task_id}/approve", headers=HEADERS)
print(requests.get(f"{BASE}/a2a/tasks/{task_id}", headers=HEADERS).json()["current_progress"])
typescript
const BASE = "https://lucidry.base44.app/functions";
const headers = {
  Authorization: "Bearer lucid_live_...",
  "Content-Type": "application/json",
};

const proposal = await fetch(`${BASE}/a2a/tasks/propose`, {
  method: "POST",
  headers,
  body: JSON.stringify({
    requester_agent_id: "agent_ext_99",
    task_type: "content_transformation",
    steps: [
      { step_type: "transform", input_data: { source_artifact_id: "art_01" } },
      { step_type: "review", input_data: { artifact_id: "art_01" } },
    ],
  }),
}).then((res) => res.json());

await fetch(`${BASE}/a2a/tasks/${proposal.task_id}/approve`, { method: "POST", headers });