A2a Task Lifecycle logo

A2a Task Lifecycle

Organization
OrcaQubits
a2a-task-lifecycle

Implement A2A task lifecycle management — task creation, state transitions, terminal states, history, and artifacts. Use when building task state machines, handling state transitions, or managing task persistence.

Overview

PublisherOrcaQubits
Repositoryagentic-commerce-skills-plugins
Skill namea2a-task-lifecycle
Stars
40
Forks
17
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by OrcaQubits on GitHub. Read the source before you install it.

Installation

Install the A2a Task Lifecycle AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/OrcaQubits/agentic-commerce-skills-plugins/tree/main/a2a-multi-agent/skills/a2a-task-lifecycle
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/OrcaQubits/agentic-commerce-skills-plugins.git /tmp/agentic-commerce-skills-plugins
mkdir -p .claude/skills
cp -r /tmp/agentic-commerce-skills-plugins/a2a-multi-agent/skills/a2a-task-lifecycle .claude/skills/a2a-task-lifecycle
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable A2a Task Lifecycle in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads A2a Task Lifecycle on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so A2a Task Lifecycle is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

A2A Task Lifecycle

Before writing code

Fetch live docs:

  1. Fetch https://a2a-protocol.org/latest/specification/ for the Task object schema and state machine
  2. Web-search site:github.com a2aproject A2A task lifecycle states for state transition rules
  3. Web-search site:github.com a2aproject a2a-samples task for task handling examples
  4. Fetch SDK docs for task-related classes and state management utilities

Conceptual Architecture

What a Task Is

A Task is the central unit of work in A2A. It represents a request from a client agent to a server agent, tracks progress through well-defined states, accumulates messages and artifacts, and reaches a terminal state when complete.

Task Structure

Key fields of a Task object:

  • id — Unique task identifier (set by client or server)
  • status — Current state object containing state enum and optional message
  • messages — Array of messages exchanged (if stateTransitionHistory enabled)
  • artifacts — Array of output artifacts produced by the agent
  • metadata — Optional key-value pairs for custom data

The 9 States

StateTerminal?Description
submittedNoTask received, queued for processing
workingNoAgent actively processing
input-requiredNoAgent needs more input (multi-turn)
auth-requiredNoAuthentication needed
completedYesTask finished successfully
failedYesTask encountered an unrecoverable error
canceledYesTask was canceled
rejectedYesServer refused the task
unknown—Default/unknown state

Valid State Transitions

submitted → working
submitted → rejected
submitted → canceled

working → completed
working → failed
working → canceled
working → input-required

input-required → working (when client provides more input)
input-required → canceled

auth-required → working (when auth is provided)
auth-required → canceled

Rules:

  • Terminal states (completed, failed, canceled, rejected) are final — no transitions out
  • Only the server transitions the task state (except canceled which client can request)
  • input-required → working happens when the client sends a follow-up message

Task Creation

Tasks are created implicitly when a client sends a message without a taskId:

  1. Client sends message/send or message/stream without taskId
  2. Server creates a new task, assigns an ID
  3. Task starts in submitted state
  4. Server may immediately transition to working or return submitted

Task Continuation

When a client sends a message with an existing taskId:

  1. The message is appended to the task's history
  2. The server resumes processing
  3. State typically transitions from input-required back to working

Artifacts

Artifacts are the outputs of a task:

  • Produced during working state
  • Each artifact has id, name, optional description, and parts
  • Parts can be TextPart, FilePart, or DataPart
  • In streaming mode, artifacts are delivered incrementally via TaskArtifactUpdateEvent
  • Multiple artifacts can be produced per task

State Transition History

If the agent declares stateTransitionHistory: true in its Agent Card:

  • The task object includes a complete history of all state transitions
  • Each transition records the state, timestamp, and optional message
  • Useful for auditing and debugging

Best Practices

  • Always validate state transitions — reject invalid ones with appropriate errors
  • Use task IDs that are globally unique (UUIDs recommended)
  • Store task state durably for production (not just in-memory)
  • Set timeouts for tasks stuck in non-terminal states
  • Clean up old tasks to prevent unbounded storage growth
  • Include meaningful messages in status updates (not just the state enum)
  • Use artifacts for structured outputs, messages for conversational exchanges
  • Implement idempotency — handle duplicate messages for the same task gracefully

Fetch the specification for the exact Task object schema, state enum values, and transition validation rules before implementing.

Frequently asked questions

What does the A2a Task Lifecycle AI skill do?

Implement A2A task lifecycle management — task creation, state transitions, terminal states, history, and artifacts. Use when building task state machines, handling state transitions, or managing task persistence.

Why use A2a Task Lifecycle on TypingMind?

Because you install it once and use it with any model. A2a Task Lifecycle is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install A2a Task Lifecycle in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/OrcaQubits/agentic-commerce-skills-plugins/tree/main/a2a-multi-agent/skills/a2a-task-lifecycle. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use A2a Task Lifecycle?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with A2a Task Lifecycle?

As many as you like. As long as a model supports skills, you can use A2a Task Lifecycle with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the A2a Task Lifecycle AI skill free?

Yes. It is published on GitHub by OrcaQubits under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇