Skills
Patch a skill
Patch some fields of a skill and keep the rest.
PATCH
/
api
/
v2
/
skills
/
{name}
from hai_agents import Client
client = Client()
skill = client.skills.patch_skill(
name="extract-table-data",
description="Use when the task asks for data in an HTML table, as JSON or CSV.",
)
print(skill.description)
import { HaiAgentsClient } from "hai-agents";
const client = new HaiAgentsClient();
const skill = await client.skills.patchSkill({
name: "extract-table-data",
description: "Use when the task asks for data in an HTML table, as JSON or CSV.",
});
console.log(skill.description);
curl -X PATCH https://agp.eu.hcompany.ai/api/v2/skills/extract-table-data \
-H "Authorization: Bearer $HAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"description": "Use when the task asks for data in an HTML table, as JSON or CSV."}'
Behavior
Sendnull to clear an optional field, like source or url_pattern. description and body can’t be null. The merged result is validated like a full update.
Path parameters
string
required
The skill’s
name, for example extract-table-data or myorg/web-helper.Request body
Any subset of these skill fields:description, body, source, url_pattern, and compatibility. name can’t change.
Response
200 with the updated skill object.
from hai_agents import Client
client = Client()
skill = client.skills.patch_skill(
name="extract-table-data",
description="Use when the task asks for data in an HTML table, as JSON or CSV.",
)
print(skill.description)
import { HaiAgentsClient } from "hai-agents";
const client = new HaiAgentsClient();
const skill = await client.skills.patchSkill({
name: "extract-table-data",
description: "Use when the task asks for data in an HTML table, as JSON or CSV.",
});
console.log(skill.description);
curl -X PATCH https://agp.eu.hcompany.ai/api/v2/skills/extract-table-data \
-H "Authorization: Bearer $HAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"description": "Use when the task asks for data in an HTML table, as JSON or CSV."}'
Errors
| Status | Cause |
|---|---|
403 | The skill is reserved (h/) and read-only. |
404 | Not found, or not in your organization. |
422 | The merged spec fails validation, for example description or body set to null or empty. |
Was this page helpful?
⌘I
from hai_agents import Client
client = Client()
skill = client.skills.patch_skill(
name="extract-table-data",
description="Use when the task asks for data in an HTML table, as JSON or CSV.",
)
print(skill.description)
import { HaiAgentsClient } from "hai-agents";
const client = new HaiAgentsClient();
const skill = await client.skills.patchSkill({
name: "extract-table-data",
description: "Use when the task asks for data in an HTML table, as JSON or CSV.",
});
console.log(skill.description);
curl -X PATCH https://agp.eu.hcompany.ai/api/v2/skills/extract-table-data \
-H "Authorization: Bearer $HAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"description": "Use when the task asks for data in an HTML table, as JSON or CSV."}'