Skills
Retrieve a skill
Retrieve one skill’s full content by name, including pre-built h/ skills.
GET
/
api
/
v2
/
skills
/
{name}
from hai_agents import Client
client = Client()
skill = client.skills.get_skill(name="extract-table-data")
print(skill.body)
import { HaiAgentsClient } from "hai-agents";
const client = new HaiAgentsClient();
const skill = await client.skills.getSkill({ name: "extract-table-data" });
console.log(skill.body);
curl "https://agp.eu.hcompany.ai/api/v2/skills/extract-table-data" \
-H "Authorization: Bearer $HAI_API_KEY"
{
"name": "extract-table-data",
"description": "Use when the task asks for data in an HTML table.",
"body": "When you encounter an HTML table, extract all rows and columns into a JSON array of objects, using the headers as keys.",
"source": null,
"url_pattern": null,
"compatibility": null,
"files": {},
"executable_files": []
}
Path parameters
Query parameters
Read this revision instead of the latest. List them with List revisions.
Response
200 with the skill object, also returned by create, list, update, and patch. Field constraints are on Create a skill.
The ETag response header holds the revision you read, for example "3". Send it back as If-Match to update only if nobody changed the skill since.
from hai_agents import Client
client = Client()
skill = client.skills.get_skill(name="extract-table-data")
print(skill.body)
import { HaiAgentsClient } from "hai-agents";
const client = new HaiAgentsClient();
const skill = await client.skills.getSkill({ name: "extract-table-data" });
console.log(skill.body);
curl "https://agp.eu.hcompany.ai/api/v2/skills/extract-table-data" \
-H "Authorization: Bearer $HAI_API_KEY"
{
"name": "extract-table-data",
"description": "Use when the task asks for data in an HTML table.",
"body": "When you encounter an HTML table, extract all rows and columns into a JSON array of objects, using the headers as keys.",
"source": null,
"url_pattern": null,
"compatibility": null,
"files": {},
"executable_files": []
}
Errors
| Status | Cause |
|---|---|
400 | The path carries a name:N pin. Read a revision with ?revision=N instead. |
404 | Not found, or not in your organization. Also sent for an unknown revision. |
410 | The revision’s stored content fails current validation. |
Was this page helpful?
⌘I
from hai_agents import Client
client = Client()
skill = client.skills.get_skill(name="extract-table-data")
print(skill.body)
import { HaiAgentsClient } from "hai-agents";
const client = new HaiAgentsClient();
const skill = await client.skills.getSkill({ name: "extract-table-data" });
console.log(skill.body);
curl "https://agp.eu.hcompany.ai/api/v2/skills/extract-table-data" \
-H "Authorization: Bearer $HAI_API_KEY"
{
"name": "extract-table-data",
"description": "Use when the task asks for data in an HTML table.",
"body": "When you encounter an HTML table, extract all rows and columns into a JSON array of objects, using the headers as keys.",
"source": null,
"url_pattern": null,
"compatibility": null,
"files": {},
"executable_files": []
}