Skip to content

Missing metadata in TaskStatus #275

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
kay-schmitteckert opened this issue Apr 22, 2025 · 0 comments
Open

Missing metadata in TaskStatus #275

kay-schmitteckert opened this issue Apr 22, 2025 · 0 comments

Comments

@kay-schmitteckert
Copy link

Implementing A2A for existing agent runtimes requires the ability to handle custom metadata. While the schema supports this in other places, TaskStatus currently lacks the metadata field:

Missing here:
https://github.com/google/A2A/blob/main/samples/js/src/schema.ts#L441-L458

Proposal:

/**
 * Represents the status of a task at a specific point in time.
 */
export interface TaskStatus {
    /**
     * The current state of the task.
     */
    state: TaskState;

    /**
     * An optional message associated with the current status (e.g., progress update, final response).
     * @default null
     */
    message?: Message | null;

    /**
     * The timestamp when this status was recorded (ISO 8601 format).
     * @format date-time
     */
    timestamp?: string;

    /**
     * Optional metadata associated with the task.
     * @default null
     */
    metadata?: Record<string, unknown> | null;
}

Additionally, the update logic should handle metadata merging properly:
https://github.com/google/A2A/blob/main/samples/js/src/server/server.ts#L57-L67

if (update.metadata) {
    newTask.metadata = {
        ...newTask.metadata,
        ...update.metadata
    };
}

Would be great to align schema and runtime behavior to fully support task-level metadata in updates.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant