Activity

Activities represent individual events in an agent session’s conversation history. An Activity is a union type – exactly one of the following payload fields will be set.

Field Type Description
user UserActivity A message or action from a non-LLM actor (human user, system, or tool results)
assistant AssistantActivity A message or action generated by the LLM
error Error An error that occurred during execution
compaction Compaction A summarization of earlier conversation history
slack_thread SlackThreadActivity A reply in a Slack thread the agent is participating in
slack_mention SlackMentionActivity An @-mention of the agent in Slack
slack_reaction SlackReactionActivity An emoji reaction added to an agent-sent message in Slack
external_agent ExternalAgentActivity A message from another agent
task_transition TaskTransition A boundary between tasks: a subtask call, a tail call, or a resume after the session waited for the next message
artifacts_changed ArtifactsChanged The session’s artifact set changed (user-initiated PUT/DELETE through the session artifacts endpoint)
timestamp timestamp When this activity occurred

User Activity

A message or action from a non-LLM actor.

Field Type Description
text Text Text content of the user message
tool_results ToolResult[] Results from tool calls the user (or system) executed
author string Author identifier

Assistant Activity

A message or action generated by the LLM.

Field Type Description
text Text Generated text content
tool_calls ToolCall[] Tool calls the assistant wants to execute
usage Usage Model identity and token accounting for the LLM call that produced this turn. Unset for turns that did not originate from a model call.

Slack Thread Activity

A reply posted to a Slack thread the agent is participating in.

Field Type Description
permalink string Full Slack URL to the thread
user_id string Slack user ID of the person who replied
text string Reply content
channel_name string Name of the Slack channel

Slack Mention Activity

An @Firetiger mention in a Slack message.

Field Type Description
permalink string Slack URL to the mention
user_id string Slack user ID of the person who mentioned the agent
text string Message text (with @mention stripped)
channel_id string Slack channel ID (server-resolved from channel_name when seeded via InvokeTrigger; never caller-supplied on the public surface)
channel_name string Name of the Slack channel
thread_ts string Thread timestamp
message_ts string Message timestamp
idempotency_key string Stamped by TriggersService.InvokeTrigger from InvokeTriggerRequest.idempotency_key. The Slack event dispatcher sets this to a per-(event, trigger) key so retries of the same Slack event return the prior session instead of creating a duplicate. Empty when InvokeTrigger is called without an idempotency key.

Slack Reaction Activity

An emoji reaction added to an agent-sent message in Slack. Used to capture user feedback on agent responses.

Field Type Description
permalink string Slack URL to the reacted message
user_id string Slack user ID of the person who added the reaction
reaction string Emoji name without colons (e.g., “thumbsup”, “+1”, “white_check_mark”)
channel_id string Slack channel ID
channel_name string Name of the Slack channel
message_ts string Timestamp of the message that was reacted to
thread_ts string Thread timestamp if the reacted message is in a thread

External Agent Activity

A message from another agent session.

Field Type Description
source_session string Resource name of the source agent session
source_agent_name string Human-readable name of the source agent
title string Message title
summary string Brief summary
content string Full content (markdown supported)

Task Transition

A boundary between tasks within an agent session. The runtime writes one when control moves from one task to another. Clients reading session history can use kind to interpret why the task changed.

Field Type Description
from_task string Name of the task control moved from
to_task string Name of the task control moved to
kind TaskTransitionKind Why the transition happened (see below)
input object Structured input for the new task; resolves ${field} references in its prompt
context TaskTransitionContext How the new task receives prior conversation context (defaults to hidden — no prior context)

kind is one of:

Value Description
TASK_TRANSITION_KIND_CALL A subtask was spawned; the parent suspends until it returns
TASK_TRANSITION_KIND_TAIL_CALL A tail call into another task of the same agent (the state graph)
TASK_TRANSITION_KIND_AGENT_TAIL_CALL A tail call into another agent
TASK_TRANSITION_KIND_END_TURN_RESUME The session ended its turn, waited, and resumed into the declared task when the next message arrived — a user reply in interactive mode, or a peer/scheduler push in autonomous mode
TASK_TRANSITION_KIND_ASK_RESUME Deprecated. Collapsed into TASK_TRANSITION_KIND_END_TURN_RESUME; retained only so sessions written before the migration remain readable
TASK_TRANSITION_KIND_PAUSE_RESUME Deprecated. Collapsed into TASK_TRANSITION_KIND_END_TURN_RESUME; retained only so sessions written before the migration remain readable

Artifacts Changed

A signal-only event indicating that the session’s artifact set under the artifacts/ namespace has changed — a user-initiated PUT or DELETE through the session artifacts endpoint completed successfully. Carries no payload: consumers re-derive truth by listing the session’s artifacts. Tool-result writeArtifact calls do not emit this event; their effect is already visible via the surrounding ToolResult’s artifacts.

Compaction

A summarization that replaces earlier conversation history to keep sessions manageable.

Field Type Description
summary string Summary of the preceding messages that were compacted
truncated_token_count integer Number of tokens that were truncated

Text

Field Type Description
content string The text content
role MessageRole The sender role: USER, ASSISTANT, or SYSTEM. Set USER for a client-supplied seed message.

Usage

Model identity and token accounting for a single LLM call, mirroring the OpenTelemetry gen_ai semantic conventions. Carried on AssistantActivity so observability backends can attribute and price each turn.

Field Type Description
model string Request model id, e.g. claude-opus-4-5-20251101
provider string Serving platform: anthropic, aws.bedrock, gcp.vertex_ai, openai, or baseten
input_tokens int64 Prompt tokens consumed
output_tokens int64 Completion tokens generated
cache_read_tokens int64 Prompt-cache hit tokens (0 if no cache hit)
cache_write_tokens int64 Prompt-cache creation tokens (0 if no cache write)
finish_reason string Provider stop reason, e.g. end_turn, tool_use, max_tokens

Tool Call

A request from the assistant to invoke a tool.

Field Type Description
id string Unique identifier for this tool call (referenced by the corresponding ToolResult)
name string Name of the tool to invoke (e.g. TOOL_POSTGRES_QUERY)
arguments string JSON-encoded arguments for the tool

Tool Result

The result of executing a tool call.

Field Type Description
tool_call_id string ID of the ToolCall this result corresponds to
content string Output of the tool execution
is_error boolean Whether the tool execution failed

Error

An error that occurred during session execution.

Field Type Description
message string Human-readable error message

This site uses Just the Docs, a documentation theme for Jekyll.