import json
import os
from parable_types_web_api import CreateAgentSkillInput
from parable_web_api_sdk import ClientConfig, WebApiSDK
sdk = WebApiSDK(
ClientConfig(
base_url=os.environ["PARABLE_API_URL"],
auth_token=os.environ["PARABLE_API_TOKEN"],
default_headers={"X-Tenant": os.environ["PARABLE_WORKSPACE"]},
)
)
input_data = CreateAgentSkillInput.model_validate(
json.loads("{\"displayTitle\":\"example\",\"name\":\"example\",\"icon\":\"example\",\"description\":\"example\",\"content\":\"example\",\"files\":[],\"idempotencyKey\":\"550e8400-e29b-41d4-a716-446655440000\"}"),
)
result = sdk.agent_skills.create_agent_skill(input_data)sdk, err := webapisdk.New(webapisdk.SDKConfig{
BaseURL: os.Getenv("PARABLE_API_URL"),
Auth: &webapisdk.AuthConfig{Token: os.Getenv("PARABLE_API_TOKEN")},
RequestInterceptor: func(ctx context.Context, req *http.Request) error {
req.Header.Set("X-Tenant", os.Getenv("PARABLE_WORKSPACE"))
return nil
},
})
if err != nil {
return err
}
var input webapitypes.CreateAgentSkillInput
if err := json.Unmarshal([]byte(`{"displayTitle":"example","name":"example","icon":"example","description":"example","content":"example","files":[],"idempotencyKey":"550e8400-e29b-41d4-a716-446655440000"}`), &input); err != nil {
return err
}
result, err := sdk.AgentSkillsNamespace.CreateAgentSkill(ctx, input){
"data": {
"content": "<string>",
"contentDigest": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"description": "<string>",
"displayTitle": "<string>",
"files": [
{
"content": "<string>",
"path": "<string>"
}
],
"icon": "<string>",
"id": "<string>",
"name": "<string>",
"revision": 0,
"updatedAt": "2023-11-07T05:31:56Z"
},
"meta": {
"requestId": "<string>",
"totalCount": 123
},
"links": {
"first": "<string>",
"last": "<string>",
"next": "<string>",
"prev": "<string>"
}
}{
"detail": "<string>",
"status": 400,
"title": "Bad Request",
"type": "about:blank",
"code": "WA-VL-001",
"details": "<unknown>",
"errors": "<unknown>",
"requestId": "<string>"
}{
"detail": "<string>",
"status": 400,
"title": "Bad Request",
"type": "about:blank",
"code": "WA-VL-001",
"details": "<unknown>",
"errors": "<unknown>",
"requestId": "<string>"
}{
"detail": "<string>",
"status": 400,
"title": "Bad Request",
"type": "about:blank",
"code": "WA-VL-001",
"details": "<unknown>",
"errors": "<unknown>",
"requestId": "<string>"
}{
"detail": "<string>",
"status": 400,
"title": "Bad Request",
"type": "about:blank",
"code": "WA-VL-001",
"details": "<unknown>",
"errors": "<unknown>",
"requestId": "<string>"
}Create a Power
Creates a reusable Power in this Workspace from its metadata and its Markdown instructions. A Power is instructions only: it grants no extra tools and no extra Workspace access.
import json
import os
from parable_types_web_api import CreateAgentSkillInput
from parable_web_api_sdk import ClientConfig, WebApiSDK
sdk = WebApiSDK(
ClientConfig(
base_url=os.environ["PARABLE_API_URL"],
auth_token=os.environ["PARABLE_API_TOKEN"],
default_headers={"X-Tenant": os.environ["PARABLE_WORKSPACE"]},
)
)
input_data = CreateAgentSkillInput.model_validate(
json.loads("{\"displayTitle\":\"example\",\"name\":\"example\",\"icon\":\"example\",\"description\":\"example\",\"content\":\"example\",\"files\":[],\"idempotencyKey\":\"550e8400-e29b-41d4-a716-446655440000\"}"),
)
result = sdk.agent_skills.create_agent_skill(input_data)sdk, err := webapisdk.New(webapisdk.SDKConfig{
BaseURL: os.Getenv("PARABLE_API_URL"),
Auth: &webapisdk.AuthConfig{Token: os.Getenv("PARABLE_API_TOKEN")},
RequestInterceptor: func(ctx context.Context, req *http.Request) error {
req.Header.Set("X-Tenant", os.Getenv("PARABLE_WORKSPACE"))
return nil
},
})
if err != nil {
return err
}
var input webapitypes.CreateAgentSkillInput
if err := json.Unmarshal([]byte(`{"displayTitle":"example","name":"example","icon":"example","description":"example","content":"example","files":[],"idempotencyKey":"550e8400-e29b-41d4-a716-446655440000"}`), &input); err != nil {
return err
}
result, err := sdk.AgentSkillsNamespace.CreateAgentSkill(ctx, input){
"data": {
"content": "<string>",
"contentDigest": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"description": "<string>",
"displayTitle": "<string>",
"files": [
{
"content": "<string>",
"path": "<string>"
}
],
"icon": "<string>",
"id": "<string>",
"name": "<string>",
"revision": 0,
"updatedAt": "2023-11-07T05:31:56Z"
},
"meta": {
"requestId": "<string>",
"totalCount": 123
},
"links": {
"first": "<string>",
"last": "<string>",
"next": "<string>",
"prev": "<string>"
}
}{
"detail": "<string>",
"status": 400,
"title": "Bad Request",
"type": "about:blank",
"code": "WA-VL-001",
"details": "<unknown>",
"errors": "<unknown>",
"requestId": "<string>"
}{
"detail": "<string>",
"status": 400,
"title": "Bad Request",
"type": "about:blank",
"code": "WA-VL-001",
"details": "<unknown>",
"errors": "<unknown>",
"requestId": "<string>"
}{
"detail": "<string>",
"status": 400,
"title": "Bad Request",
"type": "about:blank",
"code": "WA-VL-001",
"details": "<unknown>",
"errors": "<unknown>",
"requestId": "<string>"
}{
"detail": "<string>",
"status": 400,
"title": "Bad Request",
"type": "about:blank",
"code": "WA-VL-001",
"details": "<unknown>",
"errors": "<unknown>",
"requestId": "<string>"
}Access
This operation needs a Parable token. An MCP token cannot call it. See Authentication for the kinds of token. Your roles must granttenant.parables.manage.
Errors
HTTP 400: The Agent Skill input is invalid. Correct the name, metadata, instructions, or idempotency key.HTTP 401: The request is not authenticated. Sign in and select the Workspace.HTTP 403: You cannot manage Agent Skills in this Workspace. Use a Workspace where you can manage Parables.HTTP 409: The name is already used or the idempotency key belongs to different instructions. Reuse the original request unchanged, or choose a new name and idempotency key for a deliberately new Skill.
Authorizations
A personal access token, which starts with pat_. A Parable token can call each operation that the roles of its owner allow. An MCP token can call only the read operations that are open to agents. A SQL token does not work on this API.
Headers
Workspace slug. Overrides subdomain-based workspace resolution when provided.
"acme"
Optional request correlation ID echoed back in the response.
"550e8400-e29b-41d4-a716-446655440000"
Body
Markdown text
1 - 65536^[\s\S]*$1 - 10241 - 80400Show child attributes
Show child attributes
Serialized icon spec: a Font Awesome pack/weight/fill/name, an emoji, or an asset URL
1 - 2048^(?:fa:[a-z0-9]+(?:-[a-z0-9]+)*:[a-z0-9]+-[a-z0-9]+(?:-[a-z0-9]+)*:[a-z0-9]+(?:-[a-z0-9]+)*(?:@#[0-9a-f]{6})?|emoji:\S+|image:\S+)$UUID v4 with automatic base62 encoding for client-facing APIs
^([0-9A-Za-z]{1,22}|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$Portable Agent Skills directory and frontmatter name
1 - 64^[a-z0-9]+(?:-[a-z0-9]+)*$