Skip to content

Commit 0cb4f1a

Browse files
Akshita Goyalclaude
authored andcommitted
feat: add AgentRunActivityAction type and action field to activity interfaces
Adds AgentRunActivityAction interface (name + redirect_url) and an optional action field to AgentRunActivity and CreateAgentRunActivityRequest, so agents can attach CTA buttons to response activities. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent a1d3531 commit 0cb4f1a

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/models/AgentRun.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,14 @@ export interface AgentRunActivityTextContent {
8484
*/
8585
export type AgentRunActivityContent = AgentRunActivityActionContent | AgentRunActivityTextContent;
8686

87+
/**
88+
* Top-level action attached to an activity (e.g. a CTA button shown below the response body).
89+
*/
90+
export interface AgentRunActivityAction {
91+
name: string;
92+
redirect_url: string | null;
93+
}
94+
8795
/**
8896
* Agent Run Activity interface
8997
*/
@@ -99,6 +107,7 @@ export interface AgentRunActivity extends BaseModel {
99107
type: AgentRunActivityType;
100108
project?: string;
101109
workspace: string;
110+
action?: AgentRunActivityAction | null;
102111
}
103112

104113
/**
@@ -111,4 +120,5 @@ export interface CreateAgentRunActivityRequest {
111120
signal_metadata?: Record<string, any>;
112121
type: Exclude<AgentRunActivityType, "prompt">;
113122
project?: string;
123+
action?: AgentRunActivityAction | null;
114124
}

0 commit comments

Comments
 (0)