Saltar al contenido principal

kobana finance ai-skills

Comandos de kobana finance ai-skills. Toda opción global (Opciones globales) vale aquí.

ComandoHTTPDescripción
ai-skills listGET /v1/ai-skillsListar habilidades de IA
ai-skills createPOST /v1/ai-skillsCrear habilidad de IA
ai-skills getGET /v1/ai-skills/{id}Obtener habilidad de IA por ID
ai-skills updatePATCH /v1/ai-skills/{id}Actualizar habilidad de IA
ai-skills deleteDELETE /v1/ai-skills/{id}Eliminar habilidad de IA

ai-skills list​

Listar habilidades de IA

kobana finance ai-skills list [OPCIONES]

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.

Parámetros de consulta

NombreTipoObligatorioDescripción
activestringnoFilter by the skill's on/off flag. false returns the skills the assistant does not see; omit to return both. Valores: true, false.
minestringnotrue returns only the token person's own skills, false only the ones shared with them; omit to return both. Valores: true, false.
sort_bystringnoField to order by. Default: sort_by=name&sort_order=asc. Valores: name, created_at, updated_at.
sort_orderstringnoOrder direction. Defaults to asc; ignored without sort_by. Valores: 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.

Encabezados

NombreTipoObligatorioDescripción
X-Workspace-IdstringsíWorkspace 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).

Respuestas

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

ai-skills create​

Crear habilidad de IA

kobana finance ai-skills create [OPCIONES]

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.

Encabezados

NombreTipoObligatorioDescripción
X-Workspace-IdstringsíWorkspace 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).

Cuerpo de la solicitud

NombreTipoObligatorioDescripción
namestringsíFree text, as people read it.
descriptionstringsíWhat the skill does AND when to use it: it is all the assistant reads to decide to load the skill.
instructionsstringsíThe 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. Valores: 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.

Otros campos y objetos anidados: kobana schema finance.ai-skills.create.

Respuestas

HTTPDescripción
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​

Obtener habilidad de IA por ID

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

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.

Argumentos de la ruta: id

Parámetros de consulta

NombreTipoObligatorioDescripción
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.

Encabezados

NombreTipoObligatorioDescripción
X-Workspace-IdstringsíWorkspace 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).

Respuestas

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

ai-skills update​

Actualizar habilidad de IA

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

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.

Argumentos de la ruta: id

Encabezados

NombreTipoObligatorioDescripción
X-Workspace-IdstringsíWorkspace 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).

Cuerpo de la solicitud

NombreTipoObligatorioDescripción
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. Valores: 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.

Otros campos y objetos anidados: kobana schema finance.ai-skills.update.

Respuestas

HTTPDescripción
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​

Eliminar habilidad de IA

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

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.

Argumentos de la ruta: id

Encabezados

NombreTipoObligatorioDescripción
X-Workspace-IdstringsíWorkspace 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).

Respuestas

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