Skip to content

feat(ui): add A2A skills configuration to agent creation/editing#1291

Open
opspawn wants to merge 1 commit intokagent-dev:mainfrom
opspawn:feat/a2a-skills-ui
Open

feat(ui): add A2A skills configuration to agent creation/editing#1291
opspawn wants to merge 1 commit intokagent-dev:mainfrom
opspawn:feat/a2a-skills-ui

Conversation

@opspawn
Copy link
Contributor

@opspawn opspawn commented Feb 13, 2026

Summary

Adds UI support for configuring A2A (Agent-to-Agent) skills when creating or editing a Declarative agent, as requested in #360.

The Agent CRD already supports a2aConfig.skills in the DeclarativeAgentSpec, and the TypeScript types (A2AConfig, AgentSkill) are already defined — but the UI had no way to configure them. This PR bridges that gap.

Changes

  • New A2ASkillsSection component (ui/src/components/create/A2ASkillsSection.tsx)

    • Collapsible accordion-style skill forms
    • Supports all AgentSkill fields: id, name, description, tags, examples, inputModes, outputModes
    • Comma-separated input for array fields (tags, examples, modes)
    • Add/remove skills with a max of 20 (matching CRD validation)
  • Agent creation/editing page (ui/src/app/agents/new/page.tsx)

    • New "A2A Configuration" card shown for Declarative agents
    • Form validation: required id and name, duplicate ID detection
    • Edit mode populates existing A2A config from agent spec
  • Data flow (ui/src/app/actions/agents.ts, ui/src/components/AgentsProvider.tsx)

    • Added a2aSkills field to AgentFormData
    • fromAgentFormDataToAgent maps A2A skills to declarative.a2aConfig
  • Agent card (ui/src/components/AgentCard.tsx)

    • Shows green "A2A" badge when agent has A2A skills configured

Testing

  • npx tsc --noEmit — passes
  • npm run lint — passes
  • npm run build — passes

Closes #360

Add UI support for configuring A2A (Agent-to-Agent) skills when creating
or editing a Declarative agent. This enables users to define A2A skills
directly from the UI, matching the existing Agent CRD's a2aConfig field.

Changes:
- New A2ASkillsSection component with collapsible skill forms
- Support for all AgentSkill fields: id, name, description, tags,
  examples, inputModes, outputModes
- Form validation (required id/name, duplicate detection)
- Edit mode loads existing A2A config from agent spec
- A2A badge shown on agent cards when configured
- Wired through AgentFormData -> fromAgentFormDataToAgent -> API

Closes kagent-dev#360
@opspawn opspawn requested a review from peterj as a code owner February 13, 2026 02:59
Copilot AI review requested due to automatic review settings February 13, 2026 02:59
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds UI support for configuring Agent-to-Agent (A2A) skills when creating or editing Declarative agents. The A2A protocol allows agents to expose capabilities that other agents can discover and invoke. While the backend Agent CRD already supported A2A configuration, the UI had no way to configure these skills.

Changes:

  • Adds a new A2ASkillsSection component with accordion-style skill forms supporting all AgentSkill fields
  • Integrates A2A configuration into the agent creation/editing page for Declarative agents
  • Adds validation for required fields (ID, name) and duplicate ID detection
  • Displays an "A2A" badge on agent cards when skills are configured

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
ui/src/components/create/A2ASkillsSection.tsx New component providing UI for adding/editing/removing A2A skills with collapsible forms
ui/src/app/agents/new/page.tsx Adds A2A Configuration card for Declarative agents with validation and edit mode support
ui/src/app/actions/agents.ts Maps A2A skills from form data to agent spec's declarative.a2aConfig
ui/src/components/AgentsProvider.tsx Adds a2aSkills field to AgentFormData interface and ValidationErrors
ui/src/components/AgentCard.tsx Displays green "A2A" badge when agent has A2A skills configured

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +75 to +78
<div
className="flex items-center justify-between px-4 py-3 cursor-pointer hover:bg-muted/50"
onClick={() => setExpandedIndex(isExpanded ? null : index)}
>
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The collapsible skill header is clickable but lacks proper accessibility attributes. The div should have role="button", tabIndex={0}, and onKeyDown handler to support keyboard navigation (Enter/Space keys). Additionally, consider adding aria-expanded={isExpanded} to communicate the expand/collapse state to screen readers.

Copilot uses AI. Check for mistakes.
variant="outline"
size="sm"
onClick={addSkill}
disabled={disabled || skills.length >= 20}
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The component enforces a maximum of 20 skills, but there is no corresponding maxItems validation in the CRD schema (go/config/crd/bases/kagent.dev_agents.yaml). The CRD only specifies minItems: 1 for the skills array. Consider either adding the maxItems constraint to the CRD or removing this arbitrary limit from the UI, unless there's a specific technical or business reason for this limit that isn't reflected in the CRD.

Copilot uses AI. Check for mistakes.
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

Successfully merging this pull request may close these issues.

[FEATURE] allow users to provide A2A skills when creating/editing the agent

1 participant