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
}
| Field | Type | Description |
|---|---|---|
id | string | Attachment identifier |
name | string | File name |
url | string | Download URL |
type | string | One of: image, video, audio, file |
size | int | File size in bytes |
MentionData
{
"agentId": "string",
"agentName": "string",
"offset": 0,
"length": 0
}
| Field | Type | Description |
|---|---|---|
agentId | string | Referenced agent ID |
agentName | string | Agent display name |
offset | int | Character position of @mention in message text |
length | int | Length of mention including the @ character |
Used for styled rendering in the UI and backend routing to the mentioned agent.
Enums
| Enum | Values |
|---|---|
AgentStatus | online, busy, offline |
ConversationType | swarm, agent |
MessageRole | user, agent, system |
MessageStatus | pending, delivered, failed |
ActionStyle | primary, secondary, destructive |
ToolState | running, completed, failed |
AttachmentType | image, video, audio, file |
NotificationType | agentMessage, systemAlert, workspaceUpdate |
RuntimeStatus | provisioning, ready, offline, failed |