@personaai/sdkv0.9.0

skills — @personaai/sdk

Generated field tables for skills — do not edit

Generated from sdk/typescript/dist/typedoc.json — do not edit. Regenerate with node platform/scripts/typedoc-resources.mjs.

skills

Auth: Requires Authorization: Bearer <keyId>.<secret> (server-side). For per-user calls add x-persona-external-user-id. See .

Skills are reusable capabilities (file-backed) that agents can use. Manage them via the SDK and attach via agents.create({ skills: [skillId] }).

Example

TypeScript

ts
const skill = await persona.skills.create({ name: 'Research', description: 'Web search' });await persona.agents.create({ name: 'Analyst', systemPrompt: '...', providerId: '...', skills: [skill._id] });

cURL

bash
curl https://api.persona.hasanraiyan.me/api/v1/developer/skills \  -H "Authorization: Bearer $PERSONA_CREDENTIAL" -H "Content-Type: application/json" \  -d '{"name":"Research"}'

Response

json
{  "success": true,  "data": { "_id": "sk_123", "name": "Research" }}

Skill

Note: unlike Provider, the Developer API returns Skill documents in their raw Mongo shape (_id, not id) — reflected here as-is rather than papering over a real backend inconsistency.

Source: types/skill.ts:15

Interface

FieldTypeDescription
_idstring— _ types/skill.ts:16_
domainstring— _ types/skill.ts:17_
ownerType"PersonaUser" | "Project" | "ExternalUser"— _ types/skill.ts:18_
ownerId?string— _ types/skill.ts:19_
externalOwnerId?string— _ types/skill.ts:20_
namestring— _ types/skill.ts:21_
descriptionstring— _ types/skill.ts:22_
instructionsstring— _ types/skill.ts:23_
filesSkillFile[]— _ types/skill.ts:24_
isPublicbooleanVisible to every credential in the platform when true, not just this Domain. — _ types/skill.ts:26_
createdAtstring— _ types/skill.ts:27_
updatedAtstring— _ types/skill.ts:28_
isOwner?booleanPresent only on get() — whether the calling identity owns this Skill. — _ types/skill.ts:30_

SkillFile

A file bundled with a Skill (e.g. a reference doc or script an Agent can read).

Source: types/skill.ts:2

Interface

FieldTypeDescription
pathstring— _ types/skill.ts:3_
contentstring— _ types/skill.ts:4_
mimeType?string— _ types/skill.ts:5_
createdAt?string— _ types/skill.ts:6_
updatedAt?string— _ types/skill.ts:7_

CreateSkillInput

Source: types/skill.ts:33

Interface

FieldTypeDescription
namestring— _ types/skill.ts:34_
descriptionstring— _ types/skill.ts:35_
instructionsstringThe actual prompt text given to an Agent that has this Skill attached. — _ types/skill.ts:37_
isPublic?boolean— _ types/skill.ts:39_
files?{ path: string; content: string; mimeType: string }[]— _ types/skill.ts:40_

UpdateSkillInput

All fields optional — only what you pass is changed.

Source: types/skill.ts:44

Interface

FieldTypeDescription
name?string— _ types/skill.ts:45_
description?string— _ types/skill.ts:46_
instructions?string— _ types/skill.ts:47_
isPublic?boolean— _ types/skill.ts:48_
files?{ path: string; content: string; mimeType: string }[]Replaces the entire files array — this is not a merge/append. — _ types/skill.ts:50_

DiscoverSkillsParams

Source: types/skill.ts:53

Interface

FieldTypeDescription
page?number— _ types/skill.ts:55_
limit?number— _ types/skill.ts:57_
search?stringFree-text match against name/description. — _ types/skill.ts:59_
scope?"mine"Restricts to the asserted external user's own Skills (ProjectRuntimeContext only). — _ types/skill.ts:61_