Skip to content

Building Blocks

Create a code tool from Python source_code. The tool’s parameters and description are parsed from the code’s manifest (a parse error is returned as an error). tags attaches tag names to the new tool.

File parameters: Annotate a parameter as bytes to accept file_id UUID strings. The platform downloads the file content from S3 before invoking the tool, so the function receives raw bytes. Example: def run(data: bytes) -> dict: — callers pass {"data": "<file_id>"}.

ParameterTypeRequiredDescription
env_varsstring[]no
namestringyes
orgstringno
source_codestringyes
tagsstring[]no

Create a prompt template. text may contain {{variable}} placeholders and is optional when fields alone defines a pure extraction schema.

fields is an optional list of field defs, each {name, field_type, …}; valid field_type: text, date, datetime, yes_no, whole_number, money, choice, object (choice needs a choices list). Any field can also set is_list: true to extract multiple values of that type instead of one. object fields nest a sub-schema under fields (a list of field defs, same shape, recursively) to extract a structured record; combine field_type: "object" with is_list: true to extract a list of records. When fields is set, the prompt runs as structured extraction instead of free-text generation — run_prompt/test_prompt return typed data, and text (if given) becomes the extraction instructions. post_processing_instructions (optional) runs a second refinement call over the extracted data.

reasoning_effort sets the LLM reasoning level (e.g. "low", "medium", "high"). tags attaches tag names to the new template.

ParameterTypeRequiredDescription
descriptionstringno
fieldsobject[]no
modelstringno
namestringyes
orgstringno
post_processing_instructionsstringno
providerstringno
reasoning_effortstringno
tagsstring[]no
textstringno

Create a skill (a bundle of instructions + a tool subset + reference material). Created immediately active. description is a one-line summary kept in-context for agents that mount it. tags attaches tag names to the new skill.

Every entry in tool_slugs must resolve in this org — call list_org_tools (or list_code_tools) for the valid slugs.

ParameterTypeRequiredDescription
descriptionstringno
instructionsstringyes
namestringyes
orgstringno
reference_materialstringno
tagsstring[]no
tool_slugsstring[]no

Get a code tool (by id or exact name), including its source code.

ParameterTypeRequiredDescription
orgstringno
toolstringyes

Get a knowledge base (by id or slug), including its embedding model.

ParameterTypeRequiredDescription
knowledge_basestringyes
orgstringno

Get a prompt template (by id or slug), including its active text.

ParameterTypeRequiredDescription
orgstringno
promptstringyes

Get a skill (by id or slug), including its active instructions and tools.

ParameterTypeRequiredDescription
orgstringno
skillstringyes

List the org’s code tools (custom Python tools).

ParameterTypeRequiredDescription
orgstringno

List the org’s knowledge bases, with source/chunk counts.

ParameterTypeRequiredDescription
orgstringno

List the org’s prompt templates.

Paged: the response carries total, has_more and next_offset — pass next_offset back as offset to walk the rest.

ParameterTypeRequiredDescription
limitintegernoMax rows to return (1–200).
offsetintegernoRows to skip — pass the previous response’s next_offset.
orgstringno

List the org’s skills.

Paged: the response carries total, has_more and next_offset — pass next_offset back as offset to walk the rest.

ParameterTypeRequiredDescription
limitintegernoMax rows to return (1–200).
offsetintegernoRows to skip — pass the previous response’s next_offset.
orgstringno

Search the org’s knowledge bases for relevant content chunks.

This is the same retrieval the in-chat search_knowledge agent tool uses: it matches both meaning and exact wording, so a single distinctive term works as well as a full question. Pass knowledge_base (an id or slug from list_knowledge_bases) to restrict the search to one base; omit it to search all of them.

ParameterTypeRequiredDescription
knowledge_basestringno
limitintegernoMax hits (1–25).
orgstringno
querystringyes

Update a code tool (by id or exact name). Only the fields you pass are changed. tags replaces the tool’s current tag set (pass an empty list to clear all tags).

File parameters: Annotate a parameter as bytes to accept file_id UUID strings. The platform downloads the file content from S3 before invoking the tool, so the function receives raw bytes. Example: def run(data: bytes) -> dict: — callers pass {"data": "<file_id>"}.

ParameterTypeRequiredDescription
env_varsstring[]no
is_enabledbooleanno
namestringno
orgstringno
source_codestringno
tagsstring[]no
toolstringyes

Update a prompt template (by id or slug). Passing text, fields, or post_processing_instructions creates a new revision (versioned together). Only the fields you pass are changed. fields (see create_prompt for the shape) turns the prompt into — or updates — structured extraction; valid field_type: text, date, datetime, yes_no, whole_number, money, choice, object. Any field can set is_list: true to extract multiple values; object fields nest a sub-schema under fields for a structured record, and object + is_list: true extracts a list of records. reasoning_effort sets the LLM reasoning level. tags replaces the template’s current tag set (pass an empty list to clear all tags).

ParameterTypeRequiredDescription
descriptionstringno
fieldsobject[]no
modelstringno
namestringno
orgstringno
post_processing_instructionsstringno
promptstringyes
providerstringno
reasoning_effortstringno
tagsstring[]no
textstringno

Update a skill (by id or slug) and deploy the change so it takes effect (skills are live immediately, like on create). Only the fields you pass are changed. tags replaces the skill’s current tag set (pass an empty list to clear all tags).

Every entry in tool_slugs must resolve in this org — call list_org_tools (or list_code_tools) for the valid slugs.

ParameterTypeRequiredDescription
descriptionstringno
instructionsstringno
namestringno
orgstringno
reference_materialstringno
skillstringyes
tagsstring[]no
tool_slugsstring[]no