Перейти к основному содержимому

Data Types

Structured types used across the Crawbl API.

MessageContent

Union type discriminated by the type field.

text

Standard text message.

{ "type": "text", "text": "string" }

action_card

Agent proposes actions to the user.

{
"type": "action_card",
"title": "string",
"description": "string",
"actions": [
{
"id": "string",
"label": "string",
"style": "primary | secondary | destructive"
}
]
}

tool_status

Agent shows tool execution progress.

{
"type": "tool_status",
"tool": "string",
"description": "string",
"state": "running | completed | failed"
}

system

System-generated message.

{ "type": "system", "text": "string" }

loading

Agent is thinking. No additional fields.

{ "type": "loading" }

AttachmentData

{
"id": "string",
"name": "string",
"url": "string",
"type": "image | video | audio | file",
"size": 0
}
FieldTypeDescription
idstringAttachment identifier
namestringFile name
urlstringDownload URL
typestringOne of: image, video, audio, file
sizeintFile size in bytes

MentionData

{
"agentId": "string",
"agentName": "string",
"offset": 0,
"length": 0
}
FieldTypeDescription
agentIdstringReferenced agent ID
agentNamestringAgent display name
offsetintCharacter position of @mention in message text
lengthintLength of mention including the @ character

Used for styled rendering in the UI and backend routing to the mentioned agent.


Enums

EnumValues
AgentStatusonline, busy, offline
ConversationTypeswarm, agent
MessageRoleuser, agent, system
MessageStatuspending, delivered, failed
ActionStyleprimary, secondary, destructive
ToolStaterunning, completed, failed
AttachmentTypeimage, video, audio, file
NotificationTypeagentMessage, systemAlert, workspaceUpdate
RuntimeStatusprovisioning, ready, offline, failed