Skip to main content

Chatbots

Functions for creating, reading, and updating chatbots.

Chatbots are agents of type Chatbot. The chatbotId is the same value as the agentId (agt_…). You can pass either chatbotId or agentId to the read/update functions. Agent linking and scheduling functions also work against a chatbot's id.


chatbot-create

Create a chatbot with explicit fields. Placement uses the scoped folder when set, otherwise org root.

Input

FieldTypeRequiredDescription
namestringYesShort snake_case identifier (letters, digits, underscores).
shortDescriptionstringYesBrief summary for listings.
systemPromptstringYesFull system / task instructions.
agentGuidelinesstringNoOptional extra guidelines.
conversationStartersarrayNoUp to 2 starters, each \{ name, prompt \}.

Output

FieldTypeDescription
chatbotIdstringId of the new chatbot (= agentId, agt_…).
agentIdstringSame value as chatbotId.
versionIdstringId of the created version.

chatbot-read

Read one chatbot: metadata, current version, system prompt, guidelines, conversation starters, linked tools / integrations / tables / workflows / knowledge bases, and schedules.

Input

FieldTypeRequiredDescription
chatbotIdstringOne ofChatbot id (= agentId, agt_…).
agentIdstringOne ofAlias for chatbotId.

Output

FieldTypeDescription
chatbotIdstringThe chatbot id.
chatbotobjectFull payload (same shape as agent-read's agent).

chatbot-update

Update an existing chatbot (same fields as chatbot-create). Only include fields that should change. Commits a new draft version that the user must deploy.

Input

FieldTypeRequiredDescription
chatbotId / agentIdstringYesChatbot id (= agentId).
namestringNoNew snake_case name.
shortDescriptionstringNoNew summary.
systemPromptstringNoNew system prompt.
agentGuidelinesstringNoNew guidelines.
conversationStartersarrayNoWhen set, replaces all starters (max 2).

Output

FieldTypeDescription
chatbotIdstringThe chatbot id.
agentIdstringSame value.
versionIdstringThe committed draft version id.