Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
127 changes: 123 additions & 4 deletions generated_types.json
Original file line number Diff line number Diff line change
Expand Up @@ -5102,6 +5102,9 @@
"null"
],
"properties": {
"status": {
"$ref": "#/components/schemas/AutomationStatus"
},
"sampling_rate": {
"type": "number",
"minimum": 0,
Expand Down Expand Up @@ -5484,6 +5487,9 @@
],
"description": "The type of automation."
},
"status": {
"$ref": "#/components/schemas/AutomationStatus"
},
"btql_filter": {
"type": "string",
"description": "BTQL filter to identify rows for the automation rule"
Expand All @@ -5509,6 +5515,12 @@
"url": {
"type": "string",
"description": "The webhook URL to send the request to"
},
"formatting_prompt": {
"type": "string",
"minLength": 1,
"maxLength": 10000,
"description": "Instructions for Loop to format content sent to this destination"
}
},
"required": [
Expand Down Expand Up @@ -5537,6 +5549,12 @@
"message_template": {
"type": "string",
"description": "Custom message template for the alert"
},
"formatting_prompt": {
"type": "string",
"minLength": 1,
"maxLength": 10000,
"description": "Instructions for Loop to format content sent to this destination"
}
},
"required": [
Expand Down Expand Up @@ -5817,6 +5835,9 @@
],
"description": "The type of automation."
},
"status": {
"$ref": "#/components/schemas/AutomationStatus"
},
"environment_filter": {
"type": "array",
"items": {
Expand All @@ -5839,6 +5860,12 @@
"url": {
"type": "string",
"description": "The webhook URL to send the request to"
},
"formatting_prompt": {
"type": "string",
"minLength": 1,
"maxLength": 10000,
"description": "Instructions for Loop to format content sent to this destination"
}
},
"required": [
Expand Down Expand Up @@ -5867,6 +5894,12 @@
"message_template": {
"type": "string",
"description": "Custom message template for the alert"
},
"formatting_prompt": {
"type": "string",
"minLength": 1,
"maxLength": 10000,
"description": "Instructions for Loop to format content sent to this destination"
}
},
"required": [
Expand Down Expand Up @@ -8462,6 +8495,12 @@
"message_template": {
"type": "string",
"description": "Custom message template for the alert"
},
"formatting_prompt": {
"type": "string",
"minLength": 1,
"maxLength": 10000,
"description": "Instructions for Loop to format content sent to this destination"
}
},
"required": [
Expand Down Expand Up @@ -9305,6 +9344,16 @@
],
"description": "The type of automation."
},
"product_origin": {
"type": [
"string",
"null"
],
"enum": [
"patterns"
],
"description": "The product surface that created and manages the automation"
},
"status": {
"$ref": "#/components/schemas/AutomationStatus"
},
Expand Down Expand Up @@ -9510,6 +9559,65 @@
"evaluation_delay_seconds"
]
},
"loop": {
"type": "object",
"properties": {
"prompt": {
"type": "string",
"minLength": 1,
"maxLength": 10000,
"description": "Instructions for the Loop agent"
},
"include_trigger_input": {
"type": "boolean",
"default": false,
"description": "Whether to include the automation trigger payload as input"
},
"agent_slug": {
"type": "string",
"minLength": 1,
"description": "The Loop agent to run"
},
"auto_approve_tools": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
},
"default": [],
"description": "Write tools that may run without interactive approval"
},
"harness": {
"type": "string",
"enum": [
"native",
"codex",
"claude-code"
]
},
"model": {
"type": "string",
"minLength": 1
},
"reasoning_effort": {
"type": "string",
"enum": [
"none",
"minimal",
"low",
"medium",
"high",
"xhigh",
"max"
]
}
},
"required": [
"prompt",
"agent_slug"
],
"description": "Optional Loop agent to run for each triggered window"
},
"actions": {
"type": "array",
"items": {
Expand All @@ -9527,6 +9635,12 @@
"url": {
"type": "string",
"description": "The webhook URL to send the request to"
},
"formatting_prompt": {
"type": "string",
"minLength": 1,
"maxLength": 10000,
"description": "Instructions for Loop to format content sent to this destination"
}
},
"required": [
Expand Down Expand Up @@ -9555,6 +9669,12 @@
"message_template": {
"type": "string",
"description": "Custom message template for the alert"
},
"formatting_prompt": {
"type": "string",
"minLength": 1,
"maxLength": 10000,
"description": "Instructions for Loop to format content sent to this destination"
}
},
"required": [
Expand All @@ -9566,15 +9686,14 @@
],
"description": "A delivery action available to an automation"
},
"minItems": 1,
"maxItems": 20,
"description": "The delivery actions to run on each schedule or threshold lifecycle transition"
"default": [],
"description": "Delivery actions exposed to Loop as tools, or run directly when Loop is not configured"
}
},
"required": [
"event_type",
"window",
"actions"
"window"
]
}
},
Expand Down
69 changes: 66 additions & 3 deletions py/src/braintrust/_generated_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -1670,6 +1670,10 @@ class ProjectAutomationConfigAction(TypedDict):
"""
The webhook URL to send the request to
"""
formatting_prompt: NotRequired[str | None]
"""
Instructions for Loop to format content sent to this destination
"""


class ProjectAutomationConfigAction1(TypedDict):
Expand All @@ -1689,13 +1693,18 @@ class ProjectAutomationConfigAction1(TypedDict):
"""
Custom message template for the alert
"""
formatting_prompt: NotRequired[str | None]
"""
Instructions for Loop to format content sent to this destination
"""


class ProjectAutomationConfig(TypedDict):
event_type: Literal['logs']
"""
The type of automation.
"""
status: NotRequired[AutomationStatus | None]
btql_filter: str
"""
BTQL filter to identify rows for the automation rule
Expand Down Expand Up @@ -1787,6 +1796,10 @@ class ProjectAutomationConfig4Action(TypedDict):
"""
The webhook URL to send the request to
"""
formatting_prompt: NotRequired[str | None]
"""
Instructions for Loop to format content sent to this destination
"""


class ProjectAutomationConfig4Action1(TypedDict):
Expand All @@ -1806,13 +1819,18 @@ class ProjectAutomationConfig4Action1(TypedDict):
"""
Custom message template for the alert
"""
formatting_prompt: NotRequired[str | None]
"""
Instructions for Loop to format content sent to this destination
"""


class ProjectAutomationConfig4(TypedDict):
event_type: Literal['environment_update']
"""
The type of automation.
"""
status: NotRequired[AutomationStatus | None]
environment_filter: NotRequired[Sequence[str] | None]
"""
Optional list of environment slugs to filter by
Expand Down Expand Up @@ -2606,6 +2624,10 @@ class TopicDigestAutomationConfigAction(TypedDict):
"""
Custom message template for the alert
"""
formatting_prompt: NotRequired[str | None]
"""
Instructions for Loop to format content sent to this destination
"""


class TopicDigestAutomationConfig(TypedDict):
Expand Down Expand Up @@ -2947,6 +2969,30 @@ class WindowedAutomationConfigWindow(TypedDict):
"""


class WindowedAutomationConfigLoop(TypedDict):
prompt: str
"""
Instructions for the Loop agent
"""
include_trigger_input: NotRequired[bool | None]
"""
Whether to include the automation trigger payload as input
"""
agent_slug: str
"""
The Loop agent to run
"""
auto_approve_tools: NotRequired[Sequence[str] | None]
"""
Write tools that may run without interactive approval
"""
harness: NotRequired[Literal['native', 'codex', 'claude-code'] | None]
model: NotRequired[str | None]
reasoning_effort: NotRequired[
Literal['none', 'minimal', 'low', 'medium', 'high', 'xhigh', 'max']
]


class WindowedAutomationConfigActions(TypedDict):
type: Literal['webhook']
"""
Expand All @@ -2956,6 +3002,10 @@ class WindowedAutomationConfigActions(TypedDict):
"""
The webhook URL to send the request to
"""
formatting_prompt: NotRequired[str | None]
"""
Instructions for Loop to format content sent to this destination
"""


class WindowedAutomationConfigActions1(TypedDict):
Expand All @@ -2975,24 +3025,36 @@ class WindowedAutomationConfigActions1(TypedDict):
"""
Custom message template for the alert
"""
formatting_prompt: NotRequired[str | None]
"""
Instructions for Loop to format content sent to this destination
"""


class WindowedAutomationConfig(TypedDict):
event_type: Literal['windowed']
"""
The type of automation.
"""
product_origin: NotRequired[Literal['patterns'] | None]
"""
The product surface that created and manages the automation
"""
status: NotRequired[AutomationStatus | None]
threshold: NotRequired[WindowedAutomationConfigThreshold | None]
"""
Optional calculation and lifecycle policy that gate scheduled delivery
"""
window: WindowedAutomationConfigWindow
actions: Sequence[
WindowedAutomationConfigActions | WindowedAutomationConfigActions1
loop: NotRequired[WindowedAutomationConfigLoop | None]
"""
Optional Loop agent to run for each triggered window
"""
actions: NotRequired[
Sequence[WindowedAutomationConfigActions | WindowedAutomationConfigActions1]
]
"""
The delivery actions to run on each schedule or threshold lifecycle transition
Delivery actions exposed to Loop as tools, or run directly when Loop is not configured
"""


Expand Down Expand Up @@ -3500,6 +3562,7 @@ class ModelParamsModelParams(TypedDict):


class OnlineScoreConfig(TypedDict):
status: NotRequired[AutomationStatus | None]
sampling_rate: float
"""
The sampling rate for online scoring
Expand Down
2 changes: 1 addition & 1 deletion py/src/braintrust/generated_types.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Auto-generated file (content hash 7d0333cc2dc03e50) -- do not modify"""
"""Auto-generated file (content hash ec975536334c7afc) -- do not modify"""

from ._generated_types import (
Acl,
Expand Down