Skills
Update a skill
Update a skill by replacing its whole content.
PUT
/
api
/
v2
/
skills
/
{name}
from hai_agents import Client
client = Client()
skill = client.skills.update_skill(
"extract-table-data",
name="extract-table-data",
description="Use when the task asks for data in an HTML table, as JSON or CSV.",
body="When you encounter an HTML table, extract all rows into JSON or CSV format based on the user request.",
)
print(skill.description)
import { HaiAgentsClient } from "hai-agents";
const client = new HaiAgentsClient();
const skill = await client.skills.updateSkill({
name: "extract-table-data",
body: {
name: "extract-table-data",
description: "Use when the task asks for data in an HTML table, as JSON or CSV.",
body: "When you encounter an HTML table, extract all rows into JSON or CSV format based on the user request.",
},
});
console.log(skill.description);
curl -X PUT https://agp.eu.hcompany.ai/api/v2/skills/extract-table-data \
-H "Authorization: Bearer $HAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "extract-table-data",
"description": "Use when the task asks for data in an HTML table, as JSON or CSV.",
"body": "When you encounter an HTML table, extract all rows into JSON or CSV format based on the user request."
}'
{
"name": "extract-table-data",
"description": "Use when the task asks for data in an HTML table, as JSON or CSV.",
"body": "When you encounter an HTML table, extract all rows into JSON or CSV format based on the user request.",
"source": null,
"url_pattern": null,
"compatibility": null,
"files": {},
"executable_files": []
}
Path parameters
string
required
The skill’s
name, for example extract-table-data or myorg/web-helper.Request body
The full skill, with the same fields and rules as Create a skill. Thename must equal the URL identifier. Omitted fields reset to their defaults. To change some fields and keep the rest, patch the skill.
Response
200 with the updated skill object.
from hai_agents import Client
client = Client()
skill = client.skills.update_skill(
"extract-table-data",
name="extract-table-data",
description="Use when the task asks for data in an HTML table, as JSON or CSV.",
body="When you encounter an HTML table, extract all rows into JSON or CSV format based on the user request.",
)
print(skill.description)
import { HaiAgentsClient } from "hai-agents";
const client = new HaiAgentsClient();
const skill = await client.skills.updateSkill({
name: "extract-table-data",
body: {
name: "extract-table-data",
description: "Use when the task asks for data in an HTML table, as JSON or CSV.",
body: "When you encounter an HTML table, extract all rows into JSON or CSV format based on the user request.",
},
});
console.log(skill.description);
curl -X PUT https://agp.eu.hcompany.ai/api/v2/skills/extract-table-data \
-H "Authorization: Bearer $HAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "extract-table-data",
"description": "Use when the task asks for data in an HTML table, as JSON or CSV.",
"body": "When you encounter an HTML table, extract all rows into JSON or CSV format based on the user request."
}'
{
"name": "extract-table-data",
"description": "Use when the task asks for data in an HTML table, as JSON or CSV.",
"body": "When you encounter an HTML table, extract all rows into JSON or CSV format based on the user request.",
"source": null,
"url_pattern": null,
"compatibility": null,
"files": {},
"executable_files": []
}
Errors
| Status | Cause |
|---|---|
400 | The name in the body does not match the URL identifier. |
403 | The skill is reserved (h/) and read-only. |
404 | Not found, or not in your organization. |
422 | Body failed validation. Common cases: empty body. |
Was this page helpful?
⌘I
from hai_agents import Client
client = Client()
skill = client.skills.update_skill(
"extract-table-data",
name="extract-table-data",
description="Use when the task asks for data in an HTML table, as JSON or CSV.",
body="When you encounter an HTML table, extract all rows into JSON or CSV format based on the user request.",
)
print(skill.description)
import { HaiAgentsClient } from "hai-agents";
const client = new HaiAgentsClient();
const skill = await client.skills.updateSkill({
name: "extract-table-data",
body: {
name: "extract-table-data",
description: "Use when the task asks for data in an HTML table, as JSON or CSV.",
body: "When you encounter an HTML table, extract all rows into JSON or CSV format based on the user request.",
},
});
console.log(skill.description);
curl -X PUT https://agp.eu.hcompany.ai/api/v2/skills/extract-table-data \
-H "Authorization: Bearer $HAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "extract-table-data",
"description": "Use when the task asks for data in an HTML table, as JSON or CSV.",
"body": "When you encounter an HTML table, extract all rows into JSON or CSV format based on the user request."
}'
{
"name": "extract-table-data",
"description": "Use when the task asks for data in an HTML table, as JSON or CSV.",
"body": "When you encounter an HTML table, extract all rows into JSON or CSV format based on the user request.",
"source": null,
"url_pattern": null,
"compatibility": null,
"files": {},
"executable_files": []
}