Summary
Add methods to SkillsClient to support the new skills CRUD endpoints being added to the agent-server.
Depends on: OpenHands/software-agent-sdk#3230
Background
The SkillsClient currently only supports:
getSkills(request) - Load/list skills from various sources
syncSkills() - Refresh public skills cache
Once the agent-server adds CRUD endpoints for skills management, the typescript-client needs corresponding methods.
Proposed Changes
New Methods
// Install a skill from source (URL, local path, or marketplace)
async installSkill(request: InstallSkillRequest): Promise<InstallSkillResponse>
// Uninstall a skill by name
async uninstallSkill(skillName: string): Promise<SkillActionResponse>
// Enable or disable a skill
async toggleSkill(skillName: string, enabled: boolean): Promise<SkillActionResponse>
// List installed skills with their enabled status
async listInstalledSkills(): Promise<InstalledSkillsResponse>
// (Optional) Get marketplace catalog
async getMarketplace(): Promise<MarketplaceResponse>
New Types
interface InstallSkillRequest {
source: string; // URL, local path, or "marketplace:skill-name"
force?: boolean; // Overwrite if exists
}
interface InstallSkillResponse {
name: string;
source: string;
install_path: string;
}
interface SkillActionResponse {
success: boolean;
message?: string;
}
interface InstalledSkillInfo {
name: string;
source: string;
install_path: string;
enabled: boolean;
description?: string | null;
}
interface InstalledSkillsResponse {
skills: InstalledSkillInfo[];
}
interface MarketplaceSkill {
name: string;
description: string;
source: string;
installed: boolean;
}
interface MarketplaceResponse {
skills: MarketplaceSkill[];
}
Endpoint Mapping
| Method |
HTTP |
Endpoint |
installSkill() |
POST |
/api/skills/install |
uninstallSkill() |
DELETE |
/api/skills/{skill_name} |
toggleSkill() |
PATCH |
/api/skills/{skill_name} |
listInstalledSkills() |
GET |
/api/skills/installed |
getMarketplace() |
GET |
/api/skills/marketplace |
Implementation Notes
- All methods should use the existing
HttpClient pattern
- Error handling should follow existing conventions
- Consider adding the new types to
src/models/api.ts
Use Case
This enables the agent-canvas frontend to:
- Display a marketplace of available skills
- Install/uninstall skills with one click
- Manage installed skills (enable/disable)
- Support default bundled skills on first startup
Summary
Add methods to
SkillsClientto support the new skills CRUD endpoints being added to the agent-server.Depends on: OpenHands/software-agent-sdk#3230
Background
The
SkillsClientcurrently only supports:getSkills(request)- Load/list skills from various sourcessyncSkills()- Refresh public skills cacheOnce the agent-server adds CRUD endpoints for skills management, the typescript-client needs corresponding methods.
Proposed Changes
New Methods
New Types
Endpoint Mapping
installSkill()/api/skills/installuninstallSkill()/api/skills/{skill_name}toggleSkill()/api/skills/{skill_name}listInstalledSkills()/api/skills/installedgetMarketplace()/api/skills/marketplaceImplementation Notes
HttpClientpatternsrc/models/api.tsUse Case
This enables the agent-canvas frontend to: