Skip to main content

kobana finance ai-skills

Commands of kobana finance ai-skills. Every global option (Global options) applies here.

CommandHTTPDescription
ai-skills listGET /v1/ai-skillsList AI skills
ai-skills createPOST /v1/ai-skillsCreate an AI skill
ai-skills getGET /v1/ai-skills/{id}Get an AI skill by id
ai-skills updatePATCH /v1/ai-skills/{id}Update an AI skill
ai-skills deleteDELETE /v1/ai-skills/{id}Delete an AI skill

ai-skills list​

List AI skills

kobana finance ai-skills list [OPTIONS]

GET /v1/ai-skills

Returns a cursor-paginated page of the AI skills the token's person can see in the workspace: their own and the ones other members shared with them (is_owner tells them apart). A skill is an instruction set the assistant loads when a task matches its description. Requires scope finance/ai_skills with access level read.

Query parameters

NameTypeRequiredDescription
activestringnoFilter by the skill's on/off flag. false returns the skills the assistant does not see; omit to return both. Values: true, false.
minestringnotrue returns only the token person's own skills, false only the ones shared with them; omit to return both. Values: true, false.
sort_bystringnoField to order by. Default: sort_by=name&sort_order=asc. Values: name, created_at, updated_at.
sort_orderstringnoOrder direction. Defaults to asc; ignored without sort_by. Values: asc, desc.
limitintegernoPage size. Default 25, max 100.
cursorstringnoOpaque cursor for the next page. Round-trip meta.next_cursor from the previous response.
fieldsstringnoComma-separated top-level fields to return, e.g. fields=description,amount,due_date. Omit for every field. id is always included; naming an object field returns it whole. An unknown name is a 400 whose details lists unknown and available.

Headers

NameTypeRequiredDescription
X-Workspace-IdstringyesWorkspace to act on, as a UUID. The token identifies the organization; this header picks which of its workspaces the request reads or writes. It is checked against the token's organization, so a workspace owned by anyone else answers UNKNOWN_WORKSPACE — the same code as one that does not exist. Omitting it answers WORKSPACE_REQUIRED (400).

Responses

HTTPDescription
200Page of AI skills plus pagination metadata.
400Malformed query (unknown filter / operator, invalid limit, bad cursor).

ai-skills create​

Create an AI skill

kobana finance ai-skills create [OPTIONS]

POST /v1/ai-skills

Creates an AI skill owned by the token's person, in the Agent Skills format: a name, a description saying what the skill does and when to use it — all the assistant reads to decide to load it —, Markdown instructions and optional text files. It is born active and private; visibility and member_ids share it right away, within the workspace's AI settings. A person has at most 100 skills per workspace. Requires scope finance/ai_skills with access level write. Pass an X-Idempotency-Key header on retries.

Headers

NameTypeRequiredDescription
X-Workspace-IdstringyesWorkspace to act on, as a UUID. The token identifies the organization; this header picks which of its workspaces the request reads or writes. It is checked against the token's organization, so a workspace owned by anyone else answers UNKNOWN_WORKSPACE — the same code as one that does not exist. Omitting it answers WORKSPACE_REQUIRED (400).

Request body

NameTypeRequiredDescription
namestringyesFree text, as people read it.
descriptionstringyesWhat the skill does AND when to use it: it is all the assistant reads to decide to load the skill.
instructionsstringyesThe SKILL.md body, in Markdown: the steps, the tools to call by name, the format of the answer.
slugstringnoOptional: without it, it is made from name ("Month-End Close" → month-end-close). Unique among the person's skills (409 slug_taken).
filesarray<object>noText files besides SKILL.md, replaced as a whole. Paths are unique (case-insensitive); the contents add up to at most 200000 characters.
visibilitystringnoDefault private. Anything else needs the person's ai-skills.share (403 missing_share_permission); above the workspace's allowed maximum: 403 above_max_visibility. Values: private, restricted, workspace.
member_idsarray<string (uuid)>noThe whole list of members for restricted (the owner is ignored). Each must be an active member who uses the assistant in the workspace (422 member_not_eligible). Omit to keep the stored list.

More fields and nested objects: kobana schema finance.ai-skills.create.

Responses

HTTPDescription
201Skill created. The Location header points at the new row.
400Malformed JSON body.
409The person already has a skill with this slug (details.reason: slug_taken), or X-Idempotency-Key reuse with a different body.
422Schema validation failure, the person's skill limit (details.reason: too_many_skills), or member_ids naming someone who cannot receive it (details.reason: member_not_eligible, with the refused member_ids).

ai-skills get​

Get an AI skill by id

kobana finance ai-skills get [ID] [OPTIONS]

GET /v1/ai-skills/{id}

Returns the same shape as the rows from the list endpoint. Requires scope finance/ai_skills with access level read. 404 covers both "doesn't exist" and "not in the tenant" — the API does not distinguish.

Path arguments: id

Query parameters

NameTypeRequiredDescription
fieldsstringnoComma-separated top-level fields to return, e.g. fields=description,amount,due_date. Omit for every field. id is always included; naming an object field returns it whole. An unknown name is a 400 whose details lists unknown and available.

Headers

NameTypeRequiredDescription
X-Workspace-IdstringyesWorkspace to act on, as a UUID. The token identifies the organization; this header picks which of its workspaces the request reads or writes. It is checked against the token's organization, so a workspace owned by anyone else answers UNKNOWN_WORKSPACE — the same code as one that does not exist. Omitting it answers WORKSPACE_REQUIRED (400).

Responses

HTTPDescription
200Get an AI skill by id
404AI skill not found among the skills the token person can see in the workspace.

ai-skills update​

Update an AI skill

kobana finance ai-skills update [ID] [OPTIONS]

PATCH /v1/ai-skills/{id}

Partial update of one of the token person's skills — someone else's is read-only (403, details.reason: not_owner). files and member_ids replace the whole list. active: false hides the skill from the assistant. Requires scope finance/ai_skills with access level write.

Path arguments: id

Headers

NameTypeRequiredDescription
X-Workspace-IdstringyesWorkspace to act on, as a UUID. The token identifies the organization; this header picks which of its workspaces the request reads or writes. It is checked against the token's organization, so a workspace owned by anyone else answers UNKNOWN_WORKSPACE — the same code as one that does not exist. Omitting it answers WORKSPACE_REQUIRED (400).

Request body

NameTypeRequiredDescription
namestringnoFree text, as people read it.
slugstringnoLowercase letters, digits and hyphens, no hyphen at either end. Unique among the person's skills (409 slug_taken).
descriptionstringnoWhat the skill does AND when to use it: it is all the assistant reads to decide to load the skill.
instructionsstringnoThe SKILL.md body, in Markdown: the steps, the tools to call by name, the format of the answer.
filesarray<object>noText files besides SKILL.md, replaced as a whole. Paths are unique (case-insensitive); the contents add up to at most 200000 characters.
activebooleannofalse hides the skill from the assistant; true brings it back.
visibilitystringnoprivate is always allowed to the owner; anything else needs the person's ai-skills.share (403 missing_share_permission). Above the workspace's allowed maximum: 403 above_max_visibility. Omitted with member_ids, the current one stays. Values: private, restricted, workspace.
member_idsarray<string (uuid)>noThe whole list of members for restricted (the owner is ignored). Each must be an active member who uses the assistant in the workspace (422 member_not_eligible). Omit to keep the stored list.

More fields and nested objects: kobana schema finance.ai-skills.update.

Responses

HTTPDescription
200Updated skill.
400Malformed JSON body.
404AI skill not found among the skills the token person can see in the workspace.
409The person already has another skill with this slug (details.reason: slug_taken), or X-Idempotency-Key reuse with a different body.
422Schema validation failure, or member_ids naming someone who cannot receive it (details.reason: member_not_eligible).

ai-skills delete​

Delete an AI skill

kobana finance ai-skills delete [ID] [OPTIONS]

DELETE /v1/ai-skills/{id}

Removes one of the token person's skills, for everyone it was shared with; copies other people made of it stay. Someone else's skill is a 403 (details.reason: not_owner). Requires scope finance/ai_skills with access level delete. Calling DELETE twice returns 200 then 404.

Path arguments: id

Headers

NameTypeRequiredDescription
X-Workspace-IdstringyesWorkspace to act on, as a UUID. The token identifies the organization; this header picks which of its workspaces the request reads or writes. It is checked against the token's organization, so a workspace owned by anyone else answers UNKNOWN_WORKSPACE — the same code as one that does not exist. Omitting it answers WORKSPACE_REQUIRED (400).

Responses

HTTPDescription
200AI skill deleted.
404AI skill not found among the skills the token person can see in the workspace.