archastro.platform.v1.resources.teams

   1# Copyright (c) 2026 ArchAstro Inc. Licensed under the MIT License.
   2# This file is auto-generated by @archastro/sdk-generator. Do not edit.
   3# Content hash: d4926eae556b
   4
   5from __future__ import annotations
   6
   7import builtins
   8from datetime import datetime
   9from typing import Any, Literal, Required, TypedDict
  10
  11from pydantic import BaseModel, Field
  12
  13from ...runtime.http_client import HttpClient, SyncHttpClient
  14from ...types.common import CustomObject
  15from ...types.tasks import Task
  16from ...types.teams import Team, TeamInvite, TeamMembership
  17from ...types.threads import Thread
  18
  19
  20class TeamCustomObjectCreateInput(TypedDict):
  21    "Create a team custom object"
  22
  23    fields: dict[str, Any]
  24    "Map of field values to set on the new object. Keys and value types must conform to the schema identified by `type`."
  25    type: str
  26    "Schema type identifier (`lookup_key`) that defines the object's fields and validation rules."
  27
  28
  29class MemberCreateInput(TypedDict, total=False):
  30    "Add a member to a team"
  31
  32    agent: str | None
  33    "Agent ID (`agt_...`) to add as a member. Provide exactly one of `user` or `agent`."
  34    role: str | None
  35    'Role to assign. One of `"owner"`, `"admin"`, or `"member"`. Defaults to `"member"` when omitted.'
  36    user: str | None
  37    "User ID (`usr_...`) to add as a member. Provide exactly one of `user` or `agent`."
  38
  39
  40class MemberUpdateInput(TypedDict):
  41    "Update a team member's role"
  42
  43    role: str
  44    'New role to assign. One of `"owner"`, `"admin"`, or `"member"`.'
  45
  46
  47class TeamTaskCreateInputTask(TypedDict, total=False):
  48    description: str | None
  49    "Optional long-form description or notes for the task. Supports plain text."
  50    due_date: datetime | None
  51    "Date and time by which the task should be completed (ISO 8601). Omit to create the task without a due date."
  52    epic: str | None
  53    "Optional free-form grouping label."
  54    links: dict[str, Any] | None
  55    "Arbitrary key-value map of named URLs or references associated with the task (e.g. external ticket links)."
  56    metadata: dict[str, Any] | None
  57    "Arbitrary key-value map for storing application-specific data alongside the task. Omit to create the task with no metadata."
  58    name: Required[str]
  59    "Human-readable title for the task."
  60    owner_agent: str | None
  61    "ID of the agent to assign as owner (`agi_...`). Mutually exclusive with `owner_user`; omit to leave the task unassigned."
  62    owner_user: str | None
  63    "ID of the user to assign as owner (`usr_...`). Mutually exclusive with `owner_agent`; omit to leave the task unassigned."
  64    parent: str | None
  65    "Create this task as a subtask of an existing top-level task (`tsk_...`). Subtasks nest exactly one level."
  66    priority: int | None
  67    "Priority level from `0` (highest) to `4` (lowest). Defaults to `2` (medium) when omitted."
  68    source_id: str | None
  69    "Source object identity (for example `ArchAstro/firstlanding`)."
  70    source_scope: str | None
  71    "Container of the work this task is about (for example `github.com`). Must be supplied with `source_type` and `source_id`."
  72    source_type: str | None
  73    "Kind of source object (for example `repository`)."
  74    status: str | None
  75    'Initial status for the task. One of `"open"`, `"in_progress"`, or `"done"`. Defaults to `"open"` when omitted.'
  76    tags: list[str] | None
  77    "Labels for grouping and filtering (max 20, each up to 40 characters). Stored canonically: lowercase, trimmed, de-duplicated."
  78    thread: str | None
  79    "Bind the task to a thread (`thr_...`) owned by the same team or user as the task. A bound task appears in that thread's task scope, exactly like a task filed from inside the conversation. Omit for a task not tied to a conversation."
  80
  81
  82class TeamTaskCreateInput(TypedDict, total=False):
  83    "Create a task for an owner"
  84
  85    agent: str | None
  86    "Explicit acting agent (`agi_...`) for a developer or server-to-server call. Mutually exclusive with an acting `user`; the agent must belong to the task owner."
  87    org: str | None
  88    "Explicit organization (`org_...`) for developer and server-to-server calls. Pass null when the owner is not organization-scoped. The value must match the selected user or team."
  89    task: Required[TeamTaskCreateInputTask]
  90    "Attributes for the task to create. `name` is required; all other fields are optional."
  91    user: str | None
  92    "User ID (`usr_...`). On a user route this is the task owner and creator; on a team route it is the explicit acting user for a developer or server-to-server call."
  93
  94
  95class TeamThreadCreateInputThreadMembersItem(TypedDict):
  96    id: str
  97    "Public user (`usr_...`) or agent (`agt_...`) ID matching `type`."
  98    type: Literal["user", "agent"]
  99    "Member kind. Use `user` for a user ID or `agent` for an agent ID."
 100
 101
 102class TeamThreadCreateInputThreadProfilePicture(TypedDict, total=False):
 103    data: str | None
 104    "Base64-encoded image bytes."
 105    filename: str | None
 106    "Original filename of the uploaded image, used for display and content-type inference."
 107    mime_type: str | None
 108    'MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`.'
 109
 110
 111class TeamThreadCreateInputThreadSettings(TypedDict, total=False):
 112    agent_enabled: bool | None
 113    "Whether the AI agent is active for this thread. `true` enables AI responses; `false` disables them. Defaults to `true` when settings have not been explicitly configured. `null` when a client explicitly cleared the setting."
 114
 115
 116class TeamThreadCreateInputThread(TypedDict, total=False):
 117    create_legacy_agent: bool | None
 118    "When `true`, provisions a legacy chat agent alongside the thread. Only needed for integrations that depend on the pre-v2 agent model."
 119    description: str | None
 120    "Optional longer description of the thread's purpose. `null` if not provided."
 121    is_unlisted: bool | None
 122    "When `true`, the thread is hidden from the default thread list and accessible only by direct link or ID."
 123    key: str | None
 124    "Client-assigned unique key for idempotent creation or later lookup. Must be unique within the owning organization."
 125    kind: Literal["personal"] | None
 126    "Optional behavioral subtype. `personal` is accepted only for a user-owned thread and limits membership to that user and agents currently owned by them. Mirror kinds remain server-derived and cannot be selected by callers."
 127    members: list[TeamThreadCreateInputThreadMembersItem] | None
 128    "Users and agents to add atomically when the thread is created. Each target must pass the same authorization rules as a post-creation member add. Slack mirror threads reject non-empty caller-supplied rosters because their membership is sync-owned."
 129    metadata: dict[str, Any] | None
 130    "Arbitrary key-value pairs stored alongside the thread. Values must be strings or numbers."
 131    muted: bool | None
 132    "When `true`, push and in-app notifications for this thread are suppressed for the creating user."
 133    org_id: str | None
 134    "ID of the organization to create the thread under. Defaults to the authenticated user's primary organization when omitted."
 135    profile_picture: TeamThreadCreateInputThreadProfilePicture | None
 136    "Optional profile image for the thread, provided as a base64-encoded payload."
 137    settings: TeamThreadCreateInputThreadSettings | None
 138    "Configuration overrides for the thread, such as AI model selection and context window settings."
 139    slug: str | None
 140    "Optional URL-safe identifier. Derived from the title when omitted and unique within the thread owner."
 141    title: str | None
 142    "Display name for the thread. `null` if omitted, which causes the thread to be untitled."
 143    visibility: Literal["team", "restricted", "private"] | None
 144    "Thread visibility. A team-owned thread with members must explicitly use `restricted` or `private`. User- and agent-owned threads with members default to `private` and reject every other value."
 145
 146
 147class TeamThreadCreateInput(TypedDict, total=False):
 148    "Create a thread for a team"
 149
 150    skip_welcome_message: bool | None
 151    "When `true`, suppresses the automatic welcome message that is otherwise sent into the thread on creation. Defaults to `false`."
 152    thread: Required[TeamThreadCreateInputThread]
 153    "Attributes for the new thread. See ThreadCreateParams for available fields."
 154
 155
 156class TeamCreateInputAclAddItem(TypedDict, total=False):
 157    actions: Required[list[str]]
 158    'Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.'
 159    principal: str | None
 160    'The identifier of the principal. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`; omit entirely when `principal_type` is `"everyone"`.'
 161    principal_type: Required[str]
 162    'The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.'
 163
 164
 165class TeamCreateInputAclGrantsItem(TypedDict, total=False):
 166    actions: Required[list[str]]
 167    'Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.'
 168    principal: str | None
 169    'The identifier of the principal. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`; omit entirely when `principal_type` is `"everyone"`.'
 170    principal_type: Required[str]
 171    'The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.'
 172
 173
 174class TeamCreateInputAclRemoveItem(TypedDict, total=False):
 175    principal: str | None
 176    'The identifier of the principal to remove. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`. Omit when `principal_type` is `"everyone"`.'
 177    principal_type: Required[str]
 178    'The kind of principal to remove. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.'
 179
 180
 181class TeamCreateInputAcl(TypedDict, total=False):
 182    add: list[TeamCreateInputAclAddItem] | None
 183    "Patch mode: grants to add or merge into the existing list. Cannot be combined with `grants`."
 184    grants: list[TeamCreateInputAclGrantsItem] | None
 185    "Replace mode: the complete new list of grants that replaces all existing entries. Send an empty array (`[]`) to clear all grants. Cannot be combined with `add` or `remove`."
 186    remove: list[TeamCreateInputAclRemoveItem] | None
 187    "Patch mode: principals whose grants should be removed from the existing list. Cannot be combined with `grants`."
 188
 189
 190class TeamCreateInput(TypedDict, total=False):
 191    "Create a team"
 192
 193    acl: TeamCreateInputAcl | None
 194    "Access control configuration for the team. Controls who can discover and join the team."
 195    description: str | None
 196    "Optional human-readable description of the team's purpose."
 197    idempotency_key: str | None
 198    "Optional retry key. Replays in the same app, organization, and sandbox return the original team."
 199    metadata: dict[str, Any] | None
 200    "Arbitrary key-value pairs you can attach to the team for your own use. Values must be strings."
 201    name: Required[str]
 202    "Display name for the team."
 203    org: str | None
 204    "Organization ID (`org_...`) to associate the team with. Omit to create the team without an org affiliation."
 205
 206
 207class TeamJoinByCodeInput(TypedDict, total=False):
 208    "Join a team with an invite code"
 209
 210    agent: str | None
 211    "Agent ID (`agent_...`) to add to the team. When provided, the agent is joined instead of the authenticated user. Requires a server-to-server session."
 212    invite_code: str | None
 213    "12-character invite code alias for `join_code` accepted for backwards compatibility."
 214    join_code: str | None
 215    "12-character invite code that identifies the team. Mutually usable with `invite_code`."
 216    user: str | None
 217    "User ID (`user_...`) to add to the team. Required for server-to-server requests when `agent` is not supplied."
 218
 219
 220class TeamUpdateInputAclAddItem(TypedDict, total=False):
 221    actions: Required[list[str]]
 222    'Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.'
 223    principal: str | None
 224    'The identifier of the principal. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`; omit entirely when `principal_type` is `"everyone"`.'
 225    principal_type: Required[str]
 226    'The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.'
 227
 228
 229class TeamUpdateInputAclGrantsItem(TypedDict, total=False):
 230    actions: Required[list[str]]
 231    'Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.'
 232    principal: str | None
 233    'The identifier of the principal. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`; omit entirely when `principal_type` is `"everyone"`.'
 234    principal_type: Required[str]
 235    'The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.'
 236
 237
 238class TeamUpdateInputAclRemoveItem(TypedDict, total=False):
 239    principal: str | None
 240    'The identifier of the principal to remove. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`. Omit when `principal_type` is `"everyone"`.'
 241    principal_type: Required[str]
 242    'The kind of principal to remove. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.'
 243
 244
 245class TeamUpdateInputAcl(TypedDict, total=False):
 246    add: list[TeamUpdateInputAclAddItem] | None
 247    "Patch mode: grants to add or merge into the existing list. Cannot be combined with `grants`."
 248    grants: list[TeamUpdateInputAclGrantsItem] | None
 249    "Replace mode: the complete new list of grants that replaces all existing entries. Send an empty array (`[]`) to clear all grants. Cannot be combined with `add` or `remove`."
 250    remove: list[TeamUpdateInputAclRemoveItem] | None
 251    "Patch mode: principals whose grants should be removed from the existing list. Cannot be combined with `grants`."
 252
 253
 254class TeamUpdateInputProfilePicture(TypedDict, total=False):
 255    data: str | None
 256    "Base64-encoded binary image data."
 257    filename: str | None
 258    "Original filename of the image, used for storage metadata."
 259    mime_type: str | None
 260    'MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`.'
 261
 262
 263class TeamUpdateInput(TypedDict, total=False):
 264    "Update a team"
 265
 266    acl: TeamUpdateInputAcl | None
 267    "New access control configuration for the team. Replaces the existing ACL."
 268    description: str | None
 269    "New human-readable description of the team's purpose."
 270    metadata: dict[str, Any] | None
 271    "Arbitrary key-value pairs to set on the team. Replaces the existing metadata map entirely."
 272    name: str | None
 273    "New display name for the team."
 274    profile_picture: TeamUpdateInputProfilePicture | None
 275    "New profile picture for the team. Provide this object to upload and replace the current picture."
 276
 277
 278class TeamJoinInput(TypedDict, total=False):
 279    "Join a team"
 280
 281    agent: str | None
 282    "Agent ID (`agent_...`) to add to the team. The caller must already be a member of the team."
 283    email: str | None
 284    "Email address of a member of the caller's organization to add to the team. Requires team-owner, team-admin, or org-admin role."
 285    user: str | None
 286    "User ID (`user_...`) of a member of the caller's organization to add to the team. Requires team-owner, team-admin, or org-admin role."
 287
 288
 289class TeamCustomObjectListResponseDataItemAclAddItem(BaseModel):
 290    actions: list[str] = Field(
 291        ...,
 292        description='Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.',
 293    )
 294    principal: str | None = Field(
 295        default=None,
 296        description='The identifier of the principal. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`; omit entirely when `principal_type` is `"everyone"`.',
 297    )
 298    principal_type: str = Field(
 299        ...,
 300        description='The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.',
 301    )
 302
 303
 304class TeamCustomObjectListResponseDataItemAclGrantsItem(BaseModel):
 305    actions: list[str] = Field(
 306        ...,
 307        description='Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.',
 308    )
 309    principal: str | None = Field(
 310        default=None,
 311        description='The identifier of the principal. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`; omit entirely when `principal_type` is `"everyone"`.',
 312    )
 313    principal_type: str = Field(
 314        ...,
 315        description='The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.',
 316    )
 317
 318
 319class TeamCustomObjectListResponseDataItemAclRemoveItem(BaseModel):
 320    principal: str | None = Field(
 321        default=None,
 322        description='The identifier of the principal to remove. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`. Omit when `principal_type` is `"everyone"`.',
 323    )
 324    principal_type: str = Field(
 325        ...,
 326        description='The kind of principal to remove. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.',
 327    )
 328
 329
 330class TeamCustomObjectListResponseDataItemAcl(BaseModel):
 331    add: list[TeamCustomObjectListResponseDataItemAclAddItem] | None = Field(
 332        default=None,
 333        description="Patch mode: grants to add or merge into the existing list. Cannot be combined with `grants`.",
 334    )
 335    grants: list[TeamCustomObjectListResponseDataItemAclGrantsItem] | None = Field(
 336        default=None,
 337        description="Replace mode: the complete new list of grants that replaces all existing entries. Send an empty array (`[]`) to clear all grants. Cannot be combined with `add` or `remove`.",
 338    )
 339    remove: list[TeamCustomObjectListResponseDataItemAclRemoveItem] | None = Field(
 340        default=None,
 341        description="Patch mode: principals whose grants should be removed from the existing list. Cannot be combined with `grants`.",
 342    )
 343
 344
 345class TeamCustomObjectListResponseDataItem(BaseModel):
 346    acl: TeamCustomObjectListResponseDataItemAcl | None = Field(
 347        default=None,
 348        description="Access control list governing read and write access to this custom object. Only returned to resource owners and privileged or organization-admin viewers; `null` for everyone else.",
 349    )
 350    created_at: datetime | None = Field(
 351        default=None, description="When the custom object was created (ISO 8601)."
 352    )
 353    fields: dict[str, Any] | None = Field(
 354        default=None,
 355        description="Map of field names to their current values as defined by the object's schema type.",
 356    )
 357    id: str = Field(..., description="Unique identifier for the custom object (`cobj_...`).")
 358    org: str | None = Field(
 359        default=None, description="ID of the organization this object belongs to (`org_...`)."
 360    )
 361    row_key: str | None = Field(
 362        default=None,
 363        description="An optional stable key used to identify this object by a caller-controlled string rather than its generated ID. `null` if not set.",
 364    )
 365    sandbox: str | None = Field(
 366        default=None,
 367        description="ID of the sandbox environment this object is scoped to (`dsb_...`). `null` for production objects.",
 368    )
 369    schema_type: str | None = Field(
 370        default=None,
 371        description="The lookup key of the schema type that defines this object's field structure. `null` if the schema type has not been set.",
 372    )
 373    team: str | None = Field(
 374        default=None,
 375        description="ID of the team that owns this object (`tem_...`). `null` if the object is not team-scoped.",
 376    )
 377    updated_at: datetime | None = Field(
 378        default=None,
 379        description="When the custom object was last modified (ISO 8601). `null` if the object has never been updated after creation.",
 380    )
 381    user: str | None = Field(
 382        default=None,
 383        description="ID of the user that owns this object (`usr_...`). `null` if the object is not user-scoped.",
 384    )
 385    version: int | None = Field(
 386        default=None,
 387        description="Optimistic concurrency version of the object. Increments with each successful update; pass this value in write operations to detect conflicting changes.",
 388    )
 389
 390
 391class TeamCustomObjectListResponse(BaseModel):
 392    """
 393    Successful response
 394    """
 395
 396    data: list[TeamCustomObjectListResponseDataItem] = Field(
 397        ..., description="Array of custom object records for the current page."
 398    )
 399    meta: dict[str, Any] | None = Field(
 400        default=None, description="Pagination metadata for the response."
 401    )
 402
 403
 404class MemberListResponseDataItemAgentAclAddItem(BaseModel):
 405    actions: list[str] = Field(
 406        ...,
 407        description='Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.',
 408    )
 409    principal: str | None = Field(
 410        default=None,
 411        description='The identifier of the principal. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`; omit entirely when `principal_type` is `"everyone"`.',
 412    )
 413    principal_type: str = Field(
 414        ...,
 415        description='The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.',
 416    )
 417
 418
 419class MemberListResponseDataItemAgentAclGrantsItem(BaseModel):
 420    actions: list[str] = Field(
 421        ...,
 422        description='Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.',
 423    )
 424    principal: str | None = Field(
 425        default=None,
 426        description='The identifier of the principal. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`; omit entirely when `principal_type` is `"everyone"`.',
 427    )
 428    principal_type: str = Field(
 429        ...,
 430        description='The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.',
 431    )
 432
 433
 434class MemberListResponseDataItemAgentAclRemoveItem(BaseModel):
 435    principal: str | None = Field(
 436        default=None,
 437        description='The identifier of the principal to remove. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`. Omit when `principal_type` is `"everyone"`.',
 438    )
 439    principal_type: str = Field(
 440        ...,
 441        description='The kind of principal to remove. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.',
 442    )
 443
 444
 445class MemberListResponseDataItemAgentAcl(BaseModel):
 446    add: list[MemberListResponseDataItemAgentAclAddItem] | None = Field(
 447        default=None,
 448        description="Patch mode: grants to add or merge into the existing list. Cannot be combined with `grants`.",
 449    )
 450    grants: list[MemberListResponseDataItemAgentAclGrantsItem] | None = Field(
 451        default=None,
 452        description="Replace mode: the complete new list of grants that replaces all existing entries. Send an empty array (`[]`) to clear all grants. Cannot be combined with `add` or `remove`.",
 453    )
 454    remove: list[MemberListResponseDataItemAgentAclRemoveItem] | None = Field(
 455        default=None,
 456        description="Patch mode: principals whose grants should be removed from the existing list. Cannot be combined with `grants`.",
 457    )
 458
 459
 460class MemberListResponseDataItemAgentSourceSolutionCurrentSolutionOrgLogo(BaseModel):
 461    file: str | None = Field(
 462        default=None,
 463        description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.",
 464    )
 465    height: int | None = Field(
 466        default=None, description="Height of the image in pixels. `null` if not known."
 467    )
 468    media: str | None = Field(
 469        default=None,
 470        description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.",
 471    )
 472    mime_type: str | None = Field(
 473        default=None,
 474        description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.',
 475    )
 476    refresh_url: str | None = Field(
 477        default=None,
 478        description="Endpoint URL you can call to obtain a fresh signed `url` when the current one has expired. `null` if the URL does not require refreshing.",
 479    )
 480    url: str | None = Field(
 481        default=None,
 482        description="Signed or public URL for downloading the image. May be time-limited; use `refresh_url` to obtain a new URL when this one expires.",
 483    )
 484    width: int | None = Field(
 485        default=None, description="Width of the image in pixels. `null` if not known."
 486    )
 487
 488
 489class MemberListResponseDataItemAgentSourceSolutionCurrentSolutionTemplatesItemDetailsInvokeContractParticipantsItem(
 490    BaseModel
 491):
 492    description: str | None = Field(
 493        default=None,
 494        description="Workflow-authored explanation of the slot's role. `null` when the workflow declares none.",
 495    )
 496    name: str = Field(
 497        ...,
 498        description="The slot's name, as referenced by the workflow. Supply the chosen agent under the top-level `participants[name]` field when invoking.",
 499    )
 500    required: bool = Field(
 501        ...,
 502        description="Whether the workflow requires this slot to be filled for the run to complete its embedded stages.",
 503    )
 504    type: str = Field(
 505        ...,
 506        description='The kind of principal the slot accepts. Currently always `"agent_user"` the value supplied at invoke is an agent ID (`agi_...`).',
 507    )
 508
 509
 510class MemberListResponseDataItemAgentSourceSolutionCurrentSolutionTemplatesItemDetailsInvokeContractPrefills(
 511    BaseModel
 512):
 513    participants: dict[str, Any] | None = Field(
 514        default=None,
 515        description="Participant slot-to-agent mappings applied by the platform. Caller values at these slots must match exactly.",
 516    )
 517    payload: dict[str, Any] | None = Field(
 518        default=None,
 519        description="Partial invocation payload applied by the platform. A caller may omit these values, but supplying a different value at any locked path is rejected.",
 520    )
 521
 522
 523class MemberListResponseDataItemAgentSourceSolutionCurrentSolutionTemplatesItemDetailsInvokeContract(
 524    BaseModel
 525):
 526    input_schema: dict[str, Any] | None = Field(
 527        default=None,
 528        description="JSON Schema validated against the whole invoke payload, from the automation's `input_schema_config`. `null` when none is configured.",
 529    )
 530    participants: (
 531        list[
 532            MemberListResponseDataItemAgentSourceSolutionCurrentSolutionTemplatesItemDetailsInvokeContractParticipantsItem
 533        ]
 534        | None
 535    ) = Field(
 536        default=None,
 537        description="Named participant slots declared by the workflow, sorted by name. `null` when the workflow declares none. Values supplied under the top-level `participants` field are agent IDs.",
 538    )
 539    prefills: MemberListResponseDataItemAgentSourceSolutionCurrentSolutionTemplatesItemDetailsInvokeContractPrefills = Field(
 540        ...,
 541        description="Owner-controlled payload and participant values the platform applies to every invocation. Supplying a conflicting value is rejected.",
 542    )
 543
 544
 545class MemberListResponseDataItemAgentSourceSolutionCurrentSolutionTemplatesItemDetails(BaseModel):
 546    automation_type: str | None = Field(
 547        default=None,
 548        description="Automation execution type (`invoked`, `scheduled`, or `trigger`). `null` when the template body does not declare one.",
 549    )
 550    invoke_contract: (
 551        MemberListResponseDataItemAgentSourceSolutionCurrentSolutionTemplatesItemDetailsInvokeContract
 552        | None
 553    ) = Field(
 554        default=None,
 555        description="Schema-driven payload and participant inputs for an invoked automation. Used by installation clients to collect locked prefills before provisioning. `null` for non-invoked automation types.",
 556    )
 557    type: Literal["automation"] = Field(
 558        default="automation",
 559        description="Template-details discriminator. Always `automation` for this variant.",
 560    )
 561
 562
 563class MemberListResponseDataItemAgentSourceSolutionCurrentSolutionTemplatesItem(BaseModel):
 564    description: str | None = Field(
 565        default=None,
 566        description="Short prose blurb from the template body's `description:` field. `null` when the body doesn't set one. Used as the card subhead in the Library carousel.",
 567    )
 568    details: (
 569        MemberListResponseDataItemAgentSourceSolutionCurrentSolutionTemplatesItemDetails | None
 570    ) = Field(
 571        default=None,
 572        description="Template-kind-specific details selected by the `type` discriminator. `null` when this template kind has no additional details.",
 573    )
 574    display_name: str | None = Field(
 575        default=None,
 576        description="Human-facing label from the template body's `display_name:` field. `null` when the body doesn't set one. Library carousels use this for the card title, falling back to a humanized `name`.",
 577    )
 578    id: str | None = Field(
 579        default=None,
 580        description="Template config ID (`cfg_...`). `null` for inline-only templates.",
 581    )
 582    kind: str = Field(
 583        ...,
 584        description="Template config kind, or `SolutionTemplateRef` / `SolutionTemplatePath` when unresolved.",
 585    )
 586    lookup_key: str | None = Field(
 587        default=None,
 588        description="Lookup key stamped on the template config at import time. `null` when no lookup key was assigned.",
 589    )
 590    name: str | None = Field(
 591        default=None,
 592        description="Canonical name from the template body. For `AgentTemplate` this doubles as the human-facing label; for `AgentToolTemplate` it's the LLM-facing tool function identifier (snake_case); for `AgentRoutineTemplate` it's the routine identifier (kebab-case). Clients rendering carousels should prefer `display_name` and fall back to humanizing `name`.",
 593    )
 594    readme_url: str | None = Field(
 595        default=None,
 596        description="Relative path to the public README endpoint with a signed token already embedded, scoped to this template's bundled markdown asset. `null` when the Solution body's `templates[].readme_path` is unset for this entry. Token expires in 1 hour refresh via `GET /api/v1/solutions/:solution`.",
 597    )
 598    virtual_path: str | None = Field(
 599        default=None,
 600        description="Stable virtual path assigned to the template config. `null` when no virtual path was set.",
 601    )
 602
 603
 604class MemberListResponseDataItemAgentSourceSolutionCurrentSolution(BaseModel):
 605    category_keys: list[str] | None = Field(
 606        default=None,
 607        description="Category tag keys declared in the Solution body, used to group Solutions in the catalog. An empty array when the body declares none.",
 608    )
 609    created_at: str | None = Field(
 610        default=None, description="When the Solution config was first imported (ISO 8601)."
 611    )
 612    description: str | None = Field(
 613        default=None,
 614        description="Short tagline or summary declared in the Solution body, used as the card subhead in catalog UIs. `null` when the Solution body does not set one.",
 615    )
 616    events: dict[str, Any] | None = Field(
 617        default=None,
 618        description="Custom analytics events declared in the Solution body's `events:` manifest a map of event key (snake_case) to its definition (`label`, optional `description`, optional typed `fields`). Dashboards use the `label` as the event's display name. Present as an empty object when the body declares none.",
 619    )
 620    id: str = Field(..., description="Solution config ID (`cfg_...`).")
 621    image_url: str | None = Field(
 622        default=None,
 623        description="Absolute URL of the Solution's cover image the bundled asset the body's `image:` field names. A stable, non-expiring capability URL (like `org_logo.url`), safe to hold in caches and OpenGraph tags; it 404s if the Solution stops declaring a cover. `null` when the Solution has no cover image, and always `null` for org-scoped rows the permanent URL is minted for system-scope (catalog) Solutions only.",
 624    )
 625    kind: str = Field(..., description='Resource type. Always `"Solution"`.')
 626    latest_solution: str | None = Field(
 627        default=None,
 628        description="When `upgrade_available` is `true`, the system-scope Solution config ID (`cfg_...`) that should be used as the upgrade source. `null` otherwise.",
 629    )
 630    latest_version: str | None = Field(
 631        default=None,
 632        description="When `upgrade_available` is `true`, the higher system-scope `solution_version` available to upgrade to. `null` otherwise.",
 633    )
 634    lookup_key: str | None = Field(
 635        default=None,
 636        description="The lookup key stored on the Solution config, if one was assigned during import. `null` when no lookup key was set.",
 637    )
 638    metadata: dict[str, Any] | None = Field(
 639        default=None,
 640        description="Arbitrary key-value metadata declared in the Solution body (e.g. category or display hints). Present as an empty object when the body declares none.",
 641    )
 642    name: str | None = Field(
 643        default=None,
 644        description="Human-facing display name declared in the Solution body. `null` when the Solution body does not set one.",
 645    )
 646    org: str | None = Field(
 647        default=None,
 648        description="Organization ID (`org_...`) that owns this Solution config, when the Solution is scoped to a specific org. `null` for system-scope (app-level) Solutions.",
 649    )
 650    org_logo: MemberListResponseDataItemAgentSourceSolutionCurrentSolutionOrgLogo | None = Field(
 651        default=None,
 652        description="Canonical image-source object for the resolved `org`'s logo, used as the principal category section glyph. The `url` is a stable, non-expiring capability URL (`refresh_url` is `null` there is nothing to refresh). `null` when `org_slug` is `null` or the org has no logo.",
 653    )
 654    org_name: str | None = Field(
 655        default=None,
 656        description="Display name of the resolved `org`. Pairs with `org_slug` as the principal catalog category's label. `null` when `org_slug` is `null`.",
 657    )
 658    org_slug: str | None = Field(
 659        default=None,
 660        description="Resolved slug of the Solution body's `org` (the publishing organization), when set and it resolves to a real org visible to the viewer. When present this is the Solution's principal catalog category key clients group the Solution under this org ahead of `category_keys`. `null` when the body has no `org` or it doesn't resolve.",
 661    )
 662    owners: list[str] = Field(
 663        ...,
 664        description='Owner scopes this Solution appears under. Members: `"system"` (app-level system scope) and/or `"org"` (viewer\'s org scope).',
 665    )
 666    readme_url: str | None = Field(
 667        default=None,
 668        description="Relative path to the public README endpoint with a signed token already embedded. `null` when the Solution has no README. Token expires in 1 hour refresh via `GET /api/v1/solutions/:solution`.",
 669    )
 670    screenshot_urls: list[str] | None = Field(
 671        default=None,
 672        description="Absolute URLs of the Solution's gallery screenshots the bundled assets the body's `screenshots:` field names, in declared order. Each is a stable, non-expiring capability URL with the same cacheability contract as `image_url` (one shared token, a `v` cache key, and a `file` param selecting the screenshot); a URL 404s if the Solution stops declaring its screenshot. An empty array when the Solution declares none, and always empty for org-scoped rows the permanent URLs are minted for system-scope (catalog) Solutions only.",
 673    )
 674    solution_id: str | None = Field(
 675        default=None,
 676        description="Stable UUID declared in the Solution body, used to identify the same logical Solution across multiple installed copies and owner scopes. `null` when the body omits it.",
 677    )
 678    solution_version: str | None = Field(
 679        default=None,
 680        description='Semver string declared in the Solution body (e.g. `"1.2.0"`). `null` when the body does not declare a version.',
 681    )
 682    tag_keys: list[str] | None = Field(
 683        default=None,
 684        description="Freeform tag keys declared in the Solution body. An empty array when the body declares none.",
 685    )
 686    template_kind: str | None = Field(
 687        default=None,
 688        description='Wrapped template kind `"AgentTemplate"`, `"AutomationTemplate"`, `"AgentRoutineTemplate"`, `"AgentToolTemplate"`, `"AgentComputerTemplate"`, or `"SolutionTemplateRef"` for ref-mode bundles.',
 689    )
 690    templates: list[MemberListResponseDataItemAgentSourceSolutionCurrentSolutionTemplatesItem] = (
 691        Field(
 692            ...,
 693            description="Template configs bundled by this Solution, in declaration order the first entry is the deployable template the Solution wraps; the rest are sibling templates the wrapped template references.",
 694        )
 695    )
 696    updated_at: str | None = Field(
 697        default=None, description="When the Solution config was last modified (ISO 8601)."
 698    )
 699    upgrade_available: bool = Field(
 700        ...,
 701        description="`true` when this Solution is installed at the viewer's org scope and the app-level system scope carries a higher `solution_version`. Always `false` for system-only rows.",
 702    )
 703    virtual_path: str | None = Field(
 704        default=None,
 705        description="The stable virtual path assigned to this Solution config, used as the deduplication key when the same Solution appears under multiple owner scopes. `null` when unset.",
 706    )
 707
 708
 709class MemberListResponseDataItemAgentSourceSolutionSolutionOrgLogo(BaseModel):
 710    file: str | None = Field(
 711        default=None,
 712        description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.",
 713    )
 714    height: int | None = Field(
 715        default=None, description="Height of the image in pixels. `null` if not known."
 716    )
 717    media: str | None = Field(
 718        default=None,
 719        description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.",
 720    )
 721    mime_type: str | None = Field(
 722        default=None,
 723        description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.',
 724    )
 725    refresh_url: str | None = Field(
 726        default=None,
 727        description="Endpoint URL you can call to obtain a fresh signed `url` when the current one has expired. `null` if the URL does not require refreshing.",
 728    )
 729    url: str | None = Field(
 730        default=None,
 731        description="Signed or public URL for downloading the image. May be time-limited; use `refresh_url` to obtain a new URL when this one expires.",
 732    )
 733    width: int | None = Field(
 734        default=None, description="Width of the image in pixels. `null` if not known."
 735    )
 736
 737
 738class MemberListResponseDataItemAgentSourceSolutionSolutionTemplatesItemDetailsInvokeContractParticipantsItem(
 739    BaseModel
 740):
 741    description: str | None = Field(
 742        default=None,
 743        description="Workflow-authored explanation of the slot's role. `null` when the workflow declares none.",
 744    )
 745    name: str = Field(
 746        ...,
 747        description="The slot's name, as referenced by the workflow. Supply the chosen agent under the top-level `participants[name]` field when invoking.",
 748    )
 749    required: bool = Field(
 750        ...,
 751        description="Whether the workflow requires this slot to be filled for the run to complete its embedded stages.",
 752    )
 753    type: str = Field(
 754        ...,
 755        description='The kind of principal the slot accepts. Currently always `"agent_user"` the value supplied at invoke is an agent ID (`agi_...`).',
 756    )
 757
 758
 759class MemberListResponseDataItemAgentSourceSolutionSolutionTemplatesItemDetailsInvokeContractPrefills(
 760    BaseModel
 761):
 762    participants: dict[str, Any] | None = Field(
 763        default=None,
 764        description="Participant slot-to-agent mappings applied by the platform. Caller values at these slots must match exactly.",
 765    )
 766    payload: dict[str, Any] | None = Field(
 767        default=None,
 768        description="Partial invocation payload applied by the platform. A caller may omit these values, but supplying a different value at any locked path is rejected.",
 769    )
 770
 771
 772class MemberListResponseDataItemAgentSourceSolutionSolutionTemplatesItemDetailsInvokeContract(
 773    BaseModel
 774):
 775    input_schema: dict[str, Any] | None = Field(
 776        default=None,
 777        description="JSON Schema validated against the whole invoke payload, from the automation's `input_schema_config`. `null` when none is configured.",
 778    )
 779    participants: (
 780        list[
 781            MemberListResponseDataItemAgentSourceSolutionSolutionTemplatesItemDetailsInvokeContractParticipantsItem
 782        ]
 783        | None
 784    ) = Field(
 785        default=None,
 786        description="Named participant slots declared by the workflow, sorted by name. `null` when the workflow declares none. Values supplied under the top-level `participants` field are agent IDs.",
 787    )
 788    prefills: MemberListResponseDataItemAgentSourceSolutionSolutionTemplatesItemDetailsInvokeContractPrefills = Field(
 789        ...,
 790        description="Owner-controlled payload and participant values the platform applies to every invocation. Supplying a conflicting value is rejected.",
 791    )
 792
 793
 794class MemberListResponseDataItemAgentSourceSolutionSolutionTemplatesItemDetails(BaseModel):
 795    automation_type: str | None = Field(
 796        default=None,
 797        description="Automation execution type (`invoked`, `scheduled`, or `trigger`). `null` when the template body does not declare one.",
 798    )
 799    invoke_contract: (
 800        MemberListResponseDataItemAgentSourceSolutionSolutionTemplatesItemDetailsInvokeContract
 801        | None
 802    ) = Field(
 803        default=None,
 804        description="Schema-driven payload and participant inputs for an invoked automation. Used by installation clients to collect locked prefills before provisioning. `null` for non-invoked automation types.",
 805    )
 806    type: Literal["automation"] = Field(
 807        default="automation",
 808        description="Template-details discriminator. Always `automation` for this variant.",
 809    )
 810
 811
 812class MemberListResponseDataItemAgentSourceSolutionSolutionTemplatesItem(BaseModel):
 813    description: str | None = Field(
 814        default=None,
 815        description="Short prose blurb from the template body's `description:` field. `null` when the body doesn't set one. Used as the card subhead in the Library carousel.",
 816    )
 817    details: MemberListResponseDataItemAgentSourceSolutionSolutionTemplatesItemDetails | None = (
 818        Field(
 819            default=None,
 820            description="Template-kind-specific details selected by the `type` discriminator. `null` when this template kind has no additional details.",
 821        )
 822    )
 823    display_name: str | None = Field(
 824        default=None,
 825        description="Human-facing label from the template body's `display_name:` field. `null` when the body doesn't set one. Library carousels use this for the card title, falling back to a humanized `name`.",
 826    )
 827    id: str | None = Field(
 828        default=None,
 829        description="Template config ID (`cfg_...`). `null` for inline-only templates.",
 830    )
 831    kind: str = Field(
 832        ...,
 833        description="Template config kind, or `SolutionTemplateRef` / `SolutionTemplatePath` when unresolved.",
 834    )
 835    lookup_key: str | None = Field(
 836        default=None,
 837        description="Lookup key stamped on the template config at import time. `null` when no lookup key was assigned.",
 838    )
 839    name: str | None = Field(
 840        default=None,
 841        description="Canonical name from the template body. For `AgentTemplate` this doubles as the human-facing label; for `AgentToolTemplate` it's the LLM-facing tool function identifier (snake_case); for `AgentRoutineTemplate` it's the routine identifier (kebab-case). Clients rendering carousels should prefer `display_name` and fall back to humanizing `name`.",
 842    )
 843    readme_url: str | None = Field(
 844        default=None,
 845        description="Relative path to the public README endpoint with a signed token already embedded, scoped to this template's bundled markdown asset. `null` when the Solution body's `templates[].readme_path` is unset for this entry. Token expires in 1 hour refresh via `GET /api/v1/solutions/:solution`.",
 846    )
 847    virtual_path: str | None = Field(
 848        default=None,
 849        description="Stable virtual path assigned to the template config. `null` when no virtual path was set.",
 850    )
 851
 852
 853class MemberListResponseDataItemAgentSourceSolutionSolution(BaseModel):
 854    category_keys: list[str] | None = Field(
 855        default=None,
 856        description="Category tag keys declared in the Solution body, used to group Solutions in the catalog. An empty array when the body declares none.",
 857    )
 858    created_at: str | None = Field(
 859        default=None, description="When the Solution config was first imported (ISO 8601)."
 860    )
 861    description: str | None = Field(
 862        default=None,
 863        description="Short tagline or summary declared in the Solution body, used as the card subhead in catalog UIs. `null` when the Solution body does not set one.",
 864    )
 865    events: dict[str, Any] | None = Field(
 866        default=None,
 867        description="Custom analytics events declared in the Solution body's `events:` manifest a map of event key (snake_case) to its definition (`label`, optional `description`, optional typed `fields`). Dashboards use the `label` as the event's display name. Present as an empty object when the body declares none.",
 868    )
 869    id: str = Field(..., description="Solution config ID (`cfg_...`).")
 870    image_url: str | None = Field(
 871        default=None,
 872        description="Absolute URL of the Solution's cover image the bundled asset the body's `image:` field names. A stable, non-expiring capability URL (like `org_logo.url`), safe to hold in caches and OpenGraph tags; it 404s if the Solution stops declaring a cover. `null` when the Solution has no cover image, and always `null` for org-scoped rows the permanent URL is minted for system-scope (catalog) Solutions only.",
 873    )
 874    kind: str = Field(..., description='Resource type. Always `"Solution"`.')
 875    latest_solution: str | None = Field(
 876        default=None,
 877        description="When `upgrade_available` is `true`, the system-scope Solution config ID (`cfg_...`) that should be used as the upgrade source. `null` otherwise.",
 878    )
 879    latest_version: str | None = Field(
 880        default=None,
 881        description="When `upgrade_available` is `true`, the higher system-scope `solution_version` available to upgrade to. `null` otherwise.",
 882    )
 883    lookup_key: str | None = Field(
 884        default=None,
 885        description="The lookup key stored on the Solution config, if one was assigned during import. `null` when no lookup key was set.",
 886    )
 887    metadata: dict[str, Any] | None = Field(
 888        default=None,
 889        description="Arbitrary key-value metadata declared in the Solution body (e.g. category or display hints). Present as an empty object when the body declares none.",
 890    )
 891    name: str | None = Field(
 892        default=None,
 893        description="Human-facing display name declared in the Solution body. `null` when the Solution body does not set one.",
 894    )
 895    org: str | None = Field(
 896        default=None,
 897        description="Organization ID (`org_...`) that owns this Solution config, when the Solution is scoped to a specific org. `null` for system-scope (app-level) Solutions.",
 898    )
 899    org_logo: MemberListResponseDataItemAgentSourceSolutionSolutionOrgLogo | None = Field(
 900        default=None,
 901        description="Canonical image-source object for the resolved `org`'s logo, used as the principal category section glyph. The `url` is a stable, non-expiring capability URL (`refresh_url` is `null` there is nothing to refresh). `null` when `org_slug` is `null` or the org has no logo.",
 902    )
 903    org_name: str | None = Field(
 904        default=None,
 905        description="Display name of the resolved `org`. Pairs with `org_slug` as the principal catalog category's label. `null` when `org_slug` is `null`.",
 906    )
 907    org_slug: str | None = Field(
 908        default=None,
 909        description="Resolved slug of the Solution body's `org` (the publishing organization), when set and it resolves to a real org visible to the viewer. When present this is the Solution's principal catalog category key clients group the Solution under this org ahead of `category_keys`. `null` when the body has no `org` or it doesn't resolve.",
 910    )
 911    owners: list[str] = Field(
 912        ...,
 913        description='Owner scopes this Solution appears under. Members: `"system"` (app-level system scope) and/or `"org"` (viewer\'s org scope).',
 914    )
 915    readme_url: str | None = Field(
 916        default=None,
 917        description="Relative path to the public README endpoint with a signed token already embedded. `null` when the Solution has no README. Token expires in 1 hour refresh via `GET /api/v1/solutions/:solution`.",
 918    )
 919    screenshot_urls: list[str] | None = Field(
 920        default=None,
 921        description="Absolute URLs of the Solution's gallery screenshots the bundled assets the body's `screenshots:` field names, in declared order. Each is a stable, non-expiring capability URL with the same cacheability contract as `image_url` (one shared token, a `v` cache key, and a `file` param selecting the screenshot); a URL 404s if the Solution stops declaring its screenshot. An empty array when the Solution declares none, and always empty for org-scoped rows the permanent URLs are minted for system-scope (catalog) Solutions only.",
 922    )
 923    solution_id: str | None = Field(
 924        default=None,
 925        description="Stable UUID declared in the Solution body, used to identify the same logical Solution across multiple installed copies and owner scopes. `null` when the body omits it.",
 926    )
 927    solution_version: str | None = Field(
 928        default=None,
 929        description='Semver string declared in the Solution body (e.g. `"1.2.0"`). `null` when the body does not declare a version.',
 930    )
 931    tag_keys: list[str] | None = Field(
 932        default=None,
 933        description="Freeform tag keys declared in the Solution body. An empty array when the body declares none.",
 934    )
 935    template_kind: str | None = Field(
 936        default=None,
 937        description='Wrapped template kind `"AgentTemplate"`, `"AutomationTemplate"`, `"AgentRoutineTemplate"`, `"AgentToolTemplate"`, `"AgentComputerTemplate"`, or `"SolutionTemplateRef"` for ref-mode bundles.',
 938    )
 939    templates: list[MemberListResponseDataItemAgentSourceSolutionSolutionTemplatesItem] = Field(
 940        ...,
 941        description="Template configs bundled by this Solution, in declaration order the first entry is the deployable template the Solution wraps; the rest are sibling templates the wrapped template references.",
 942    )
 943    updated_at: str | None = Field(
 944        default=None, description="When the Solution config was last modified (ISO 8601)."
 945    )
 946    upgrade_available: bool = Field(
 947        ...,
 948        description="`true` when this Solution is installed at the viewer's org scope and the app-level system scope carries a higher `solution_version`. Always `false` for system-only rows.",
 949    )
 950    virtual_path: str | None = Field(
 951        default=None,
 952        description="The stable virtual path assigned to this Solution config, used as the deduplication key when the same Solution appears under multiple owner scopes. `null` when unset.",
 953    )
 954
 955
 956class MemberListResponseDataItemAgentSourceSolutionTemplate(BaseModel):
 957    created_at: datetime | None = Field(
 958        default=None, description="When this template config was created (ISO 8601)."
 959    )
 960    description: str | None = Field(
 961        default=None,
 962        description="Description of the template from the config body. `null` if the current version has no `description` field.",
 963    )
 964    display_name: str | None = Field(
 965        default=None,
 966        description="Human-readable display name from the config body. `null` if the current version has no `display_name` field.",
 967    )
 968    id: str = Field(..., description="Template config ID (`cfg_...`).")
 969    kind: str = Field(
 970        ..., description='Config kind identifier for this template (e.g. `"agent_tool_template"`).'
 971    )
 972    lookup_key: str | None = Field(
 973        default=None,
 974        description="Stable lookup key assigned to this template config. `null` if no lookup key is set.",
 975    )
 976    name: str | None = Field(
 977        default=None,
 978        description="Template name as stored in the config body. `null` if the current version has no `name` field.",
 979    )
 980    updated_at: datetime | None = Field(
 981        default=None, description="When this template config was last modified (ISO 8601)."
 982    )
 983    virtual_path: str | None = Field(
 984        default=None,
 985        description="Virtual filesystem path for this template config. `null` if not set.",
 986    )
 987
 988
 989class MemberListResponseDataItemAgentSourceSolution(BaseModel):
 990    current_solution: MemberListResponseDataItemAgentSourceSolutionCurrentSolution | None = Field(
 991        default=None,
 992        description="Summary of the current parent Solution config row. `solution` is the pinned Solution version the agent points at; `current_solution` is the source Solution config row as it exists now.",
 993    )
 994    solution: MemberListResponseDataItemAgentSourceSolutionSolution = Field(
 995        ...,
 996        description="Summary of the parent Solution, including `upgrade_available`, `latest_version`, and `latest_solution` when a newer system-scoped version is available for the agent's org-scoped Solution.",
 997    )
 998    template: MemberListResponseDataItemAgentSourceSolutionTemplate = Field(
 999        ...,
1000        description="Summary of the AgentTemplate config (`cfg_...`) the agent was last provisioned or updated from.",
1001    )
1002
1003
1004class MemberListResponseDataItemAgent(BaseModel):
1005    acl: MemberListResponseDataItemAgentAcl | None = Field(
1006        default=None,
1007        description="Access control list for the agent. Contains a `grants` array where each entry specifies `principal_type`, `principal`, and `actions`. `null` when no ACL restrictions are applied and the agent is accessible to all members of its scope.",
1008    )
1009    app: str | None = Field(
1010        default=None, description="ID of the application that owns this agent (`dap_...`)."
1011    )
1012    created_at: str | None = Field(
1013        default=None, description="When the agent was created (ISO 8601)."
1014    )
1015    default_model: str | None = Field(
1016        default=None,
1017        description='Default LLM model identifier used by this agent when no model is specified at runtime (e.g. `"claude-3-7-sonnet-latest"`).',
1018    )
1019    description: str | None = Field(
1020        default=None,
1021        description="Human-readable description of what the agent does. `null` if not set.",
1022    )
1023    email: str | None = Field(
1024        default=None,
1025        description="Email address provisioned for this agent. `null` if email delivery is not configured.",
1026    )
1027    id: str = Field(..., description="Agent ID (`agi_...`).")
1028    identity: str | None = Field(
1029        default=None,
1030        description="System-level identity prompt that shapes the agent's persona and behavior.",
1031    )
1032    last_applied_template_config: str | None = Field(
1033        default=None,
1034        description="ID of the AgentTemplate config (`cfg_...`) this agent was last provisioned or updated from. `null` for manually created agents.",
1035    )
1036    lookup_key: str | None = Field(
1037        default=None,
1038        description="Stable, user-defined identifier for this agent within the application. Unique per app.",
1039    )
1040    metadata: dict[str, Any] | None = Field(
1041        default=None,
1042        description="Arbitrary key-value metadata attached to the agent. Not interpreted by the platform.",
1043    )
1044    name: str | None = Field(
1045        default=None, description="Human-readable display name for the agent. `null` if not set."
1046    )
1047    org: str | None = Field(
1048        default=None,
1049        description="ID of the organization this agent belongs to (`org_...`). `null` if the agent is not org-scoped.",
1050    )
1051    org_name: str | None = Field(
1052        default=None,
1053        description="Display name of the organization this agent belongs to. `null` when the agent is not org-scoped or when the org association was not preloaded.",
1054    )
1055    originator: str | None = Field(
1056        default=None,
1057        description="Free-form label identifying the source or author that created this agent (e.g. a username or pipeline name).",
1058    )
1059    phone_number: str | None = Field(
1060        default=None,
1061        description="Phone number provisioned for this agent. `null` if SMS is not configured.",
1062    )
1063    sandbox: str | None = Field(
1064        default=None,
1065        description="ID of the sandbox environment this agent is scoped to (`dsb_...`). `null` in production deployments.",
1066    )
1067    source_solution: MemberListResponseDataItemAgentSourceSolution | None = Field(
1068        default=None,
1069        description="Source Solution and AgentTemplate summary for agents provisioned from a Solution. Includes `upgrade_available`, `latest_version`, and `latest_solution` so you can render an upgrade badge without a separate dry-run call. `null` for hand-built agents and agents whose tracked template or parent Solution has been deleted. Populated only on single-agent GET responses, never on list endpoints.",
1070    )
1071    team: str | None = Field(
1072        default=None,
1073        description="ID of the team that owns this agent (`tem_...`). `null` if the agent is not team-scoped.",
1074    )
1075    template_upgrade_available: bool | None = Field(
1076        default=None,
1077        description="True when the agent's last-applied template version is behind the current version of its AgentTemplate config i.e. reapplying the template (a per-agent upgrade) would bring it newer Solution content. Self-clears once the agent is reapplied. Computed on both the list endpoints and single-agent GET. Distinct from `source_solution.upgrade_available`, which compares Solution *versions*: an agent can lag its template (`template_upgrade_available: true`) while the org already holds the latest Solution version (`upgrade_available: false`).",
1078    )
1079    updated_at: str | None = Field(
1080        default=None, description="When the agent was last modified (ISO 8601)."
1081    )
1082    user: str | None = Field(
1083        default=None,
1084        description="ID of the user that owns this agent (`usr_...`). `null` if the agent is not user-scoped.",
1085    )
1086
1087
1088class MemberListResponseDataItemProfilePicture(BaseModel):
1089    file: str | None = Field(
1090        default=None,
1091        description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.",
1092    )
1093    height: int | None = Field(
1094        default=None, description="Height of the image in pixels. `null` if not known."
1095    )
1096    media: str | None = Field(
1097        default=None,
1098        description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.",
1099    )
1100    mime_type: str | None = Field(
1101        default=None,
1102        description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.',
1103    )
1104    refresh_url: str | None = Field(
1105        default=None,
1106        description="Endpoint URL you can call to obtain a fresh signed `url` when the current one has expired. `null` if the URL does not require refreshing.",
1107    )
1108    url: str | None = Field(
1109        default=None,
1110        description="Signed or public URL for downloading the image. May be time-limited; use `refresh_url` to obtain a new URL when this one expires.",
1111    )
1112    width: int | None = Field(
1113        default=None, description="Width of the image in pixels. `null` if not known."
1114    )
1115
1116
1117class MemberListResponseDataItemUser(BaseModel):
1118    alias: str | None = Field(
1119        default=None, description="Short handle or alias for the user. `null` if not set."
1120    )
1121    app: str | None = Field(
1122        default=None,
1123        description="ID of the app this user (and their access token) is scoped to (`dap_...`). `null` if the user is not scoped to an app.",
1124    )
1125    app_name: str | None = Field(
1126        default=None,
1127        description="Display name of the user's app. `null` when the app association was not preloaded by the caller.",
1128    )
1129    created_by_agent_user: str | None = Field(
1130        default=None,
1131        description="Agent user that created this account (`usr_...`). `null` unless an agent created it.",
1132    )
1133    created_by_developer: str | None = Field(
1134        default=None,
1135        description="Developer account that created this user (`dva_...`). `null` unless created via a developer token.",
1136    )
1137    created_by_org: str | None = Field(
1138        default=None,
1139        description="Org of the principal that created this user (`org_...`). `null` on legacy rows.",
1140    )
1141    created_by_team: str | None = Field(
1142        default=None,
1143        description="Team that created this user (`tem_...`). `null` unless created as a team.",
1144    )
1145    created_by_user: str | None = Field(
1146        default=None,
1147        description="User who created this account (`usr_...`). `null` on self-signup or legacy rows.",
1148    )
1149    email: str | None = Field(default=None, description="Email address of the user.")
1150    id: str = Field(..., description="User ID (`usr_...`).")
1151    is_system_user: bool | None = Field(
1152        default=None,
1153        description="`true` if this account is an internal system user rather than a human. System users are created automatically by the platform.",
1154    )
1155    metadata: dict[str, Any] | None = Field(
1156        default=None,
1157        description="Arbitrary key-value metadata attached to the user. Defaults to an empty object.",
1158    )
1159    name: str | None = Field(
1160        default=None,
1161        description="Full display name of the user. `null` if the user has not set a name.",
1162    )
1163    org: str | None = Field(
1164        default=None,
1165        description="ID of the organization this user belongs to (`org_...`). `null` if the user is not a member of any organization.",
1166    )
1167    org_name: str | None = Field(
1168        default=None,
1169        description="Display name of the user's organization. `null` when the user is not in an org, or when the org association was not preloaded by the caller.",
1170    )
1171    org_role: str | None = Field(
1172        default=None,
1173        description='Role of the user within their organization. One of `"admin"`, `"member"`, or `"viewer"`. `null` when the user is not a member of any organization.',
1174    )
1175    org_slug: str | None = Field(
1176        default=None,
1177        description="Stable workspace slug for the user's organization. `null` when the user is not in an org, or when the org association was not preloaded by the caller.",
1178    )
1179    sandbox: str | None = Field(
1180        default=None,
1181        description="ID of the sandbox environment this user is scoped to (`sbx_...`). `null` for production users.",
1182    )
1183    sandbox_name: str | None = Field(
1184        default=None,
1185        description="Display name of the user's sandbox environment. `null` for production users, or when the sandbox association was not preloaded by the caller.",
1186    )
1187
1188
1189class MemberListResponseDataItem(BaseModel):
1190    agent: MemberListResponseDataItemAgent | None = Field(
1191        default=None,
1192        description="The agent associated with this membership, as an expanded agent object. `null` when the member is a user, the type is unknown, or the association is not preloaded.",
1193    )
1194    created_at: datetime | None = Field(
1195        default=None, description="When this membership record was created (ISO 8601)."
1196    )
1197    id: str = Field(..., description="Team membership ID (`tmb_...`).")
1198    joined_at: datetime | None = Field(
1199        default=None, description="When the principal joined the team (ISO 8601)."
1200    )
1201    metadata: dict[str, Any] | None = Field(
1202        default=None,
1203        description="Arbitrary key-value metadata attached to this membership record. `null` if no metadata has been set.",
1204    )
1205    name: str | None = Field(
1206        default=None,
1207        description="Display name of the member, derived from the associated user or agent. `null` if the principal is unknown.",
1208    )
1209    profile_picture: MemberListResponseDataItemProfilePicture | None = Field(
1210        default=None,
1211        description="Profile picture of the member, derived from the associated user or agent. `null` if not set or principal is unknown.",
1212    )
1213    role: str | None = Field(
1214        default=None,
1215        description='The member\'s role within the team. One of `"owner"`, `"admin"`, or `"member"`.',
1216    )
1217    team: dict[str, Any] | None = Field(
1218        default=None,
1219        description="The team this membership belongs to, as an expanded team object. `null` when the team association is not preloaded.",
1220    )
1221    type: str | None = Field(
1222        default=None,
1223        description='Resolved principal type. One of `"user"`, `"agent"`, or `"unknown"` when the principal cannot be determined.',
1224    )
1225    updated_at: datetime | None = Field(
1226        default=None, description="When this membership record was last updated (ISO 8601)."
1227    )
1228    user: MemberListResponseDataItemUser | None = Field(
1229        default=None,
1230        description="The user associated with this membership, as an expanded user object. `null` when the member is an agent, the type is unknown, or the association is not preloaded.",
1231    )
1232
1233
1234class MemberListResponse(BaseModel):
1235    """
1236    Successful response
1237    """
1238
1239    data: list[MemberListResponseDataItem] = Field(
1240        ..., description="Array of team membership objects, including both user and agent members."
1241    )
1242
1243
1244class TeamTaskListResponseDataItemCreatedByActorProfilePicture(BaseModel):
1245    file: str | None = Field(
1246        default=None,
1247        description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.",
1248    )
1249    height: int | None = Field(
1250        default=None, description="Height of the image in pixels. `null` if not known."
1251    )
1252    media: str | None = Field(
1253        default=None,
1254        description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.",
1255    )
1256    mime_type: str | None = Field(
1257        default=None,
1258        description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.',
1259    )
1260    refresh_url: str | None = Field(
1261        default=None,
1262        description="Endpoint URL you can call to obtain a fresh signed `url` when the current one has expired. `null` if the URL does not require refreshing.",
1263    )
1264    url: str | None = Field(
1265        default=None,
1266        description="Signed or public URL for downloading the image. May be time-limited; use `refresh_url` to obtain a new URL when this one expires.",
1267    )
1268    width: int | None = Field(
1269        default=None, description="Width of the image in pixels. `null` if not known."
1270    )
1271
1272
1273class TeamTaskListResponseDataItemCreatedByActor(BaseModel):
1274    alias: str | None = Field(
1275        default=None,
1276        description="Short handle or alias for the actor, used as an alternate display identifier. `null` if not configured.",
1277    )
1278    id: str | None = Field(
1279        default=None,
1280        description='Composite actor identifier. Format is `"user-<usr_...>"` for human users or `"agent-<agi_...>"` for agents.',
1281    )
1282    name: str | None = Field(
1283        default=None,
1284        description="Display name of the actor shown in the UI. `null` if no name is set.",
1285    )
1286    profile_picture: TeamTaskListResponseDataItemCreatedByActorProfilePicture | None = Field(
1287        default=None,
1288        description="Profile picture for the actor. `null` if the actor has no profile picture.",
1289    )
1290
1291
1292class TeamTaskListResponseDataItemCurrentLease(BaseModel):
1293    expires_at: datetime = Field(
1294        ..., description="Server-calculated lease expiry in ISO 8601 format."
1295    )
1296    harness: str = Field(..., description="Bounded harness identifier for the coding session.")
1297    session_name: str = Field(
1298        ..., description="Display name supplied by the coding session that holds the lease."
1299    )
1300
1301
1302class TeamTaskListResponseDataItemOwnerActorProfilePicture(BaseModel):
1303    file: str | None = Field(
1304        default=None,
1305        description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.",
1306    )
1307    height: int | None = Field(
1308        default=None, description="Height of the image in pixels. `null` if not known."
1309    )
1310    media: str | None = Field(
1311        default=None,
1312        description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.",
1313    )
1314    mime_type: str | None = Field(
1315        default=None,
1316        description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.',
1317    )
1318    refresh_url: str | None = Field(
1319        default=None,
1320        description="Endpoint URL you can call to obtain a fresh signed `url` when the current one has expired. `null` if the URL does not require refreshing.",
1321    )
1322    url: str | None = Field(
1323        default=None,
1324        description="Signed or public URL for downloading the image. May be time-limited; use `refresh_url` to obtain a new URL when this one expires.",
1325    )
1326    width: int | None = Field(
1327        default=None, description="Width of the image in pixels. `null` if not known."
1328    )
1329
1330
1331class TeamTaskListResponseDataItemOwnerActor(BaseModel):
1332    alias: str | None = Field(
1333        default=None,
1334        description="Short handle or alias for the actor, used as an alternate display identifier. `null` if not configured.",
1335    )
1336    id: str | None = Field(
1337        default=None,
1338        description='Composite actor identifier. Format is `"user-<usr_...>"` for human users or `"agent-<agi_...>"` for agents.',
1339    )
1340    name: str | None = Field(
1341        default=None,
1342        description="Display name of the actor shown in the UI. `null` if no name is set.",
1343    )
1344    profile_picture: TeamTaskListResponseDataItemOwnerActorProfilePicture | None = Field(
1345        default=None,
1346        description="Profile picture for the actor. `null` if the actor has no profile picture.",
1347    )
1348
1349
1350class TeamTaskListResponseDataItem(BaseModel):
1351    agent: str | None = Field(
1352        default=None,
1353        description="ID of the agent that owns this task (`agi_...`). `null` if the task is scoped to a team or user.",
1354    )
1355    blocked_by_count: int | None = Field(
1356        default=None,
1357        description="Number of tasks marked as blocking this task, whether or not they are done (see `GET /tasks/{task}/blockers`). Computed on list/show reads; create/update responses may lag one read behind.",
1358    )
1359    closed_at: datetime | None = Field(
1360        default=None,
1361        description="When the task was marked as done or otherwise closed (ISO 8601). `null` if the task is still open.",
1362    )
1363    comments_count: int | None = Field(
1364        default=None, description="Total number of comments posted on this task."
1365    )
1366    created_at: datetime | None = Field(
1367        default=None, description="When the task was created (ISO 8601)."
1368    )
1369    created_by_actor: TeamTaskListResponseDataItemCreatedByActor | None = Field(
1370        default=None,
1371        description="Resolved creator details including `id`, `name`, `alias`, and `profile_picture`. `null` if no creator is set or the creator cannot be resolved (e.g. creating agent was deleted).",
1372    )
1373    created_by_agent: str | None = Field(
1374        default=None,
1375        description="ID of the agent that created this task (`agi_...`). `null` if the task was created by a human user, or if the creating agent was later deleted.",
1376    )
1377    created_by_user: str | None = Field(
1378        default=None,
1379        description="ID of the user who created this task (`usr_...`). `null` if the task was created by an agent, or if creator provenance was cleared after the creator was deleted.",
1380    )
1381    current_lease: TeamTaskListResponseDataItemCurrentLease | None = Field(
1382        default=None,
1383        description="Viewer-safe live coding-session lease summary. `null` when the task is unleased or the projected lease has expired. Fencing identifiers are never included.",
1384    )
1385    description: str | None = Field(
1386        default=None,
1387        description="Long-form description or notes for the task. `null` if no description has been provided.",
1388    )
1389    due_date: datetime | None = Field(
1390        default=None,
1391        description="Date and time by which the task should be completed (ISO 8601). `null` if no due date is set.",
1392    )
1393    epic: str | None = Field(
1394        default=None,
1395        description="Free-form grouping label. `null` when the task is not in an epic.",
1396    )
1397    id: str = Field(..., description="Task ID (`tsk_...`).")
1398    is_blocked: bool | None = Field(
1399        default=None,
1400        description="`true` while at least one blocking task is not yet done. Informational only a blocked task can still change status and derived at read time, so the task un-blocks automatically when its last open blocker completes. Computed on list/show reads; create/update responses report `false` until the next read.",
1401    )
1402    links: dict[str, Any] | None = Field(
1403        default=None,
1404        description="Key-value map of named URLs or references associated with the task. Returns an empty object when no links have been set.",
1405    )
1406    metadata: dict[str, Any] | None = Field(
1407        default=None,
1408        description="Arbitrary key-value map of application-specific data stored alongside the task. Returns an empty object when no metadata has been set.",
1409    )
1410    name: str = Field(..., description="Human-readable title of the task.")
1411    org: str | None = Field(
1412        default=None,
1413        description="ID of the organization this task belongs to (`org_...`). `null` for tasks outside an org context.",
1414    )
1415    owner_actor: TeamTaskListResponseDataItemOwnerActor | None = Field(
1416        default=None,
1417        description="Resolved owner details including `id`, `name`, `alias`, and `profile_picture`. `null` if the task is unassigned or the owner cannot be resolved (e.g. assigned agent was deleted).",
1418    )
1419    owner_agent: str | None = Field(
1420        default=None,
1421        description="ID of the agent assigned as owner (`agi_...`). `null` if the owner is a human user, the task is unassigned, or the assigned agent was deleted.",
1422    )
1423    owner_user: str | None = Field(
1424        default=None,
1425        description="ID of the user assigned as owner (`usr_...`). `null` if the owner is an agent, the task is unassigned, or the assigned agent was deleted.",
1426    )
1427    parent: str | None = Field(
1428        default=None,
1429        description="ID of the parent task when this task is a subtask (`tsk_...`). `null` for top-level tasks. Subtasks nest exactly one level.",
1430    )
1431    priority: int | None = Field(
1432        default=None,
1433        description="Priority level of the task from `0` (highest) to `4` (lowest). Defaults to `2` (medium) when not explicitly set.",
1434    )
1435    sandbox: str | None = Field(
1436        default=None,
1437        description="ID of the developer sandbox this task is scoped to (`dsb_...`). `null` for tasks outside a sandbox environment.",
1438    )
1439    source_id: str | None = Field(
1440        default=None,
1441        description="Source object identity (for example `ArchAstro/firstlanding`). `null` when the task has no source.",
1442    )
1443    source_scope: str | None = Field(
1444        default=None,
1445        description="Container of the work this task is about (for example `github.com`). `null` when the task has no source. Set together with `source_type` and `source_id`.",
1446    )
1447    source_type: str | None = Field(
1448        default=None,
1449        description="Kind of source object (for example `repository`). `null` when the task has no source.",
1450    )
1451    status: str = Field(
1452        ...,
1453        description='Current status of the task. One of `"open"`, `"in_progress"`, or `"done"`.',
1454    )
1455    subtasks_count: int | None = Field(
1456        default=None,
1457        description="Number of subtasks under this task. Computed on list/show reads; create/update responses may report 0 until the next read. Always 0 for subtasks.",
1458    )
1459    tags: list[str] | None = Field(
1460        default=None,
1461        description="Labels for grouping and filtering, stored lowercase and de-duplicated. Empty array when untagged.",
1462    )
1463    team: str | None = Field(
1464        default=None,
1465        description="ID of the team that owns this task (`tem_...`). `null` if the task is not scoped to a team.",
1466    )
1467    thread: str | None = Field(
1468        default=None,
1469        description="ID of the thread this task is bound to (`thr_...`) the conversation it was filed from, or the thread passed at creation. `null` for tasks not tied to a thread.",
1470    )
1471    updated_at: datetime | None = Field(
1472        default=None, description="When the task was last modified (ISO 8601)."
1473    )
1474    user: str | None = Field(
1475        default=None,
1476        description="ID of the user that owns this task (`usr_...`). `null` if the task is scoped to a team.",
1477    )
1478
1479
1480class TeamTaskListResponse(BaseModel):
1481    """
1482    Successful response
1483    """
1484
1485    after_cursor: str | None = None
1486    before_cursor: str | None = None
1487    data: list[TeamTaskListResponseDataItem] = Field(
1488        ..., description="Array of task objects matching the requested filters."
1489    )
1490    has_more: bool
1491
1492
1493class TeamTaskBlockerCyclesResponseDataItemTasksItemCreatedByActorProfilePicture(BaseModel):
1494    file: str | None = Field(
1495        default=None,
1496        description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.",
1497    )
1498    height: int | None = Field(
1499        default=None, description="Height of the image in pixels. `null` if not known."
1500    )
1501    media: str | None = Field(
1502        default=None,
1503        description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.",
1504    )
1505    mime_type: str | None = Field(
1506        default=None,
1507        description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.',
1508    )
1509    refresh_url: str | None = Field(
1510        default=None,
1511        description="Endpoint URL you can call to obtain a fresh signed `url` when the current one has expired. `null` if the URL does not require refreshing.",
1512    )
1513    url: str | None = Field(
1514        default=None,
1515        description="Signed or public URL for downloading the image. May be time-limited; use `refresh_url` to obtain a new URL when this one expires.",
1516    )
1517    width: int | None = Field(
1518        default=None, description="Width of the image in pixels. `null` if not known."
1519    )
1520
1521
1522class TeamTaskBlockerCyclesResponseDataItemTasksItemCreatedByActor(BaseModel):
1523    alias: str | None = Field(
1524        default=None,
1525        description="Short handle or alias for the actor, used as an alternate display identifier. `null` if not configured.",
1526    )
1527    id: str | None = Field(
1528        default=None,
1529        description='Composite actor identifier. Format is `"user-<usr_...>"` for human users or `"agent-<agi_...>"` for agents.',
1530    )
1531    name: str | None = Field(
1532        default=None,
1533        description="Display name of the actor shown in the UI. `null` if no name is set.",
1534    )
1535    profile_picture: (
1536        TeamTaskBlockerCyclesResponseDataItemTasksItemCreatedByActorProfilePicture | None
1537    ) = Field(
1538        default=None,
1539        description="Profile picture for the actor. `null` if the actor has no profile picture.",
1540    )
1541
1542
1543class TeamTaskBlockerCyclesResponseDataItemTasksItemCurrentLease(BaseModel):
1544    expires_at: datetime = Field(
1545        ..., description="Server-calculated lease expiry in ISO 8601 format."
1546    )
1547    harness: str = Field(..., description="Bounded harness identifier for the coding session.")
1548    session_name: str = Field(
1549        ..., description="Display name supplied by the coding session that holds the lease."
1550    )
1551
1552
1553class TeamTaskBlockerCyclesResponseDataItemTasksItemOwnerActorProfilePicture(BaseModel):
1554    file: str | None = Field(
1555        default=None,
1556        description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.",
1557    )
1558    height: int | None = Field(
1559        default=None, description="Height of the image in pixels. `null` if not known."
1560    )
1561    media: str | None = Field(
1562        default=None,
1563        description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.",
1564    )
1565    mime_type: str | None = Field(
1566        default=None,
1567        description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.',
1568    )
1569    refresh_url: str | None = Field(
1570        default=None,
1571        description="Endpoint URL you can call to obtain a fresh signed `url` when the current one has expired. `null` if the URL does not require refreshing.",
1572    )
1573    url: str | None = Field(
1574        default=None,
1575        description="Signed or public URL for downloading the image. May be time-limited; use `refresh_url` to obtain a new URL when this one expires.",
1576    )
1577    width: int | None = Field(
1578        default=None, description="Width of the image in pixels. `null` if not known."
1579    )
1580
1581
1582class TeamTaskBlockerCyclesResponseDataItemTasksItemOwnerActor(BaseModel):
1583    alias: str | None = Field(
1584        default=None,
1585        description="Short handle or alias for the actor, used as an alternate display identifier. `null` if not configured.",
1586    )
1587    id: str | None = Field(
1588        default=None,
1589        description='Composite actor identifier. Format is `"user-<usr_...>"` for human users or `"agent-<agi_...>"` for agents.',
1590    )
1591    name: str | None = Field(
1592        default=None,
1593        description="Display name of the actor shown in the UI. `null` if no name is set.",
1594    )
1595    profile_picture: (
1596        TeamTaskBlockerCyclesResponseDataItemTasksItemOwnerActorProfilePicture | None
1597    ) = Field(
1598        default=None,
1599        description="Profile picture for the actor. `null` if the actor has no profile picture.",
1600    )
1601
1602
1603class TeamTaskBlockerCyclesResponseDataItemTasksItem(BaseModel):
1604    agent: str | None = Field(
1605        default=None,
1606        description="ID of the agent that owns this task (`agi_...`). `null` if the task is scoped to a team or user.",
1607    )
1608    blocked_by_count: int | None = Field(
1609        default=None,
1610        description="Number of tasks marked as blocking this task, whether or not they are done (see `GET /tasks/{task}/blockers`). Computed on list/show reads; create/update responses may lag one read behind.",
1611    )
1612    closed_at: datetime | None = Field(
1613        default=None,
1614        description="When the task was marked as done or otherwise closed (ISO 8601). `null` if the task is still open.",
1615    )
1616    comments_count: int | None = Field(
1617        default=None, description="Total number of comments posted on this task."
1618    )
1619    created_at: datetime | None = Field(
1620        default=None, description="When the task was created (ISO 8601)."
1621    )
1622    created_by_actor: TeamTaskBlockerCyclesResponseDataItemTasksItemCreatedByActor | None = Field(
1623        default=None,
1624        description="Resolved creator details including `id`, `name`, `alias`, and `profile_picture`. `null` if no creator is set or the creator cannot be resolved (e.g. creating agent was deleted).",
1625    )
1626    created_by_agent: str | None = Field(
1627        default=None,
1628        description="ID of the agent that created this task (`agi_...`). `null` if the task was created by a human user, or if the creating agent was later deleted.",
1629    )
1630    created_by_user: str | None = Field(
1631        default=None,
1632        description="ID of the user who created this task (`usr_...`). `null` if the task was created by an agent, or if creator provenance was cleared after the creator was deleted.",
1633    )
1634    current_lease: TeamTaskBlockerCyclesResponseDataItemTasksItemCurrentLease | None = Field(
1635        default=None,
1636        description="Viewer-safe live coding-session lease summary. `null` when the task is unleased or the projected lease has expired. Fencing identifiers are never included.",
1637    )
1638    description: str | None = Field(
1639        default=None,
1640        description="Long-form description or notes for the task. `null` if no description has been provided.",
1641    )
1642    due_date: datetime | None = Field(
1643        default=None,
1644        description="Date and time by which the task should be completed (ISO 8601). `null` if no due date is set.",
1645    )
1646    epic: str | None = Field(
1647        default=None,
1648        description="Free-form grouping label. `null` when the task is not in an epic.",
1649    )
1650    id: str = Field(..., description="Task ID (`tsk_...`).")
1651    is_blocked: bool | None = Field(
1652        default=None,
1653        description="`true` while at least one blocking task is not yet done. Informational only a blocked task can still change status and derived at read time, so the task un-blocks automatically when its last open blocker completes. Computed on list/show reads; create/update responses report `false` until the next read.",
1654    )
1655    links: dict[str, Any] | None = Field(
1656        default=None,
1657        description="Key-value map of named URLs or references associated with the task. Returns an empty object when no links have been set.",
1658    )
1659    metadata: dict[str, Any] | None = Field(
1660        default=None,
1661        description="Arbitrary key-value map of application-specific data stored alongside the task. Returns an empty object when no metadata has been set.",
1662    )
1663    name: str = Field(..., description="Human-readable title of the task.")
1664    org: str | None = Field(
1665        default=None,
1666        description="ID of the organization this task belongs to (`org_...`). `null` for tasks outside an org context.",
1667    )
1668    owner_actor: TeamTaskBlockerCyclesResponseDataItemTasksItemOwnerActor | None = Field(
1669        default=None,
1670        description="Resolved owner details including `id`, `name`, `alias`, and `profile_picture`. `null` if the task is unassigned or the owner cannot be resolved (e.g. assigned agent was deleted).",
1671    )
1672    owner_agent: str | None = Field(
1673        default=None,
1674        description="ID of the agent assigned as owner (`agi_...`). `null` if the owner is a human user, the task is unassigned, or the assigned agent was deleted.",
1675    )
1676    owner_user: str | None = Field(
1677        default=None,
1678        description="ID of the user assigned as owner (`usr_...`). `null` if the owner is an agent, the task is unassigned, or the assigned agent was deleted.",
1679    )
1680    parent: str | None = Field(
1681        default=None,
1682        description="ID of the parent task when this task is a subtask (`tsk_...`). `null` for top-level tasks. Subtasks nest exactly one level.",
1683    )
1684    priority: int | None = Field(
1685        default=None,
1686        description="Priority level of the task from `0` (highest) to `4` (lowest). Defaults to `2` (medium) when not explicitly set.",
1687    )
1688    sandbox: str | None = Field(
1689        default=None,
1690        description="ID of the developer sandbox this task is scoped to (`dsb_...`). `null` for tasks outside a sandbox environment.",
1691    )
1692    source_id: str | None = Field(
1693        default=None,
1694        description="Source object identity (for example `ArchAstro/firstlanding`). `null` when the task has no source.",
1695    )
1696    source_scope: str | None = Field(
1697        default=None,
1698        description="Container of the work this task is about (for example `github.com`). `null` when the task has no source. Set together with `source_type` and `source_id`.",
1699    )
1700    source_type: str | None = Field(
1701        default=None,
1702        description="Kind of source object (for example `repository`). `null` when the task has no source.",
1703    )
1704    status: str = Field(
1705        ...,
1706        description='Current status of the task. One of `"open"`, `"in_progress"`, or `"done"`.',
1707    )
1708    subtasks_count: int | None = Field(
1709        default=None,
1710        description="Number of subtasks under this task. Computed on list/show reads; create/update responses may report 0 until the next read. Always 0 for subtasks.",
1711    )
1712    tags: list[str] | None = Field(
1713        default=None,
1714        description="Labels for grouping and filtering, stored lowercase and de-duplicated. Empty array when untagged.",
1715    )
1716    team: str | None = Field(
1717        default=None,
1718        description="ID of the team that owns this task (`tem_...`). `null` if the task is not scoped to a team.",
1719    )
1720    thread: str | None = Field(
1721        default=None,
1722        description="ID of the thread this task is bound to (`thr_...`) the conversation it was filed from, or the thread passed at creation. `null` for tasks not tied to a thread.",
1723    )
1724    updated_at: datetime | None = Field(
1725        default=None, description="When the task was last modified (ISO 8601)."
1726    )
1727    user: str | None = Field(
1728        default=None,
1729        description="ID of the user that owns this task (`usr_...`). `null` if the task is scoped to a team.",
1730    )
1731
1732
1733class TeamTaskBlockerCyclesResponseDataItem(BaseModel):
1734    tasks: list[TeamTaskBlockerCyclesResponseDataItemTasksItem] = Field(
1735        ..., description="Every unfinished task in this cyclic blocker component."
1736    )
1737
1738
1739class TeamTaskBlockerCyclesResponse(BaseModel):
1740    """
1741    Successful response
1742    """
1743
1744    after_cursor: str | None = None
1745    before_cursor: str | None = None
1746    data: list[TeamTaskBlockerCyclesResponseDataItem]
1747    has_more: bool
1748
1749
1750class TeamTaskMetricsResponse(BaseModel):
1751    """
1752    Successful response
1753    """
1754
1755    completed: int
1756    created: int
1757    days: int
1758    end_at: datetime
1759    open: int
1760    series: list[dict[str, Any]] = Field(
1761        ...,
1762        description="Zero-filled UTC-day buckets with `date`, end-of-day `open`, `created`, and `completed`.",
1763    )
1764    start_at: datetime
1765
1766
1767class TeamTaskReadyResponseDataItemTaskCreatedByActorProfilePicture(BaseModel):
1768    file: str | None = Field(
1769        default=None,
1770        description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.",
1771    )
1772    height: int | None = Field(
1773        default=None, description="Height of the image in pixels. `null` if not known."
1774    )
1775    media: str | None = Field(
1776        default=None,
1777        description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.",
1778    )
1779    mime_type: str | None = Field(
1780        default=None,
1781        description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.',
1782    )
1783    refresh_url: str | None = Field(
1784        default=None,
1785        description="Endpoint URL you can call to obtain a fresh signed `url` when the current one has expired. `null` if the URL does not require refreshing.",
1786    )
1787    url: str | None = Field(
1788        default=None,
1789        description="Signed or public URL for downloading the image. May be time-limited; use `refresh_url` to obtain a new URL when this one expires.",
1790    )
1791    width: int | None = Field(
1792        default=None, description="Width of the image in pixels. `null` if not known."
1793    )
1794
1795
1796class TeamTaskReadyResponseDataItemTaskCreatedByActor(BaseModel):
1797    alias: str | None = Field(
1798        default=None,
1799        description="Short handle or alias for the actor, used as an alternate display identifier. `null` if not configured.",
1800    )
1801    id: str | None = Field(
1802        default=None,
1803        description='Composite actor identifier. Format is `"user-<usr_...>"` for human users or `"agent-<agi_...>"` for agents.',
1804    )
1805    name: str | None = Field(
1806        default=None,
1807        description="Display name of the actor shown in the UI. `null` if no name is set.",
1808    )
1809    profile_picture: TeamTaskReadyResponseDataItemTaskCreatedByActorProfilePicture | None = Field(
1810        default=None,
1811        description="Profile picture for the actor. `null` if the actor has no profile picture.",
1812    )
1813
1814
1815class TeamTaskReadyResponseDataItemTaskCurrentLease(BaseModel):
1816    expires_at: datetime = Field(
1817        ..., description="Server-calculated lease expiry in ISO 8601 format."
1818    )
1819    harness: str = Field(..., description="Bounded harness identifier for the coding session.")
1820    session_name: str = Field(
1821        ..., description="Display name supplied by the coding session that holds the lease."
1822    )
1823
1824
1825class TeamTaskReadyResponseDataItemTaskOwnerActorProfilePicture(BaseModel):
1826    file: str | None = Field(
1827        default=None,
1828        description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.",
1829    )
1830    height: int | None = Field(
1831        default=None, description="Height of the image in pixels. `null` if not known."
1832    )
1833    media: str | None = Field(
1834        default=None,
1835        description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.",
1836    )
1837    mime_type: str | None = Field(
1838        default=None,
1839        description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.',
1840    )
1841    refresh_url: str | None = Field(
1842        default=None,
1843        description="Endpoint URL you can call to obtain a fresh signed `url` when the current one has expired. `null` if the URL does not require refreshing.",
1844    )
1845    url: str | None = Field(
1846        default=None,
1847        description="Signed or public URL for downloading the image. May be time-limited; use `refresh_url` to obtain a new URL when this one expires.",
1848    )
1849    width: int | None = Field(
1850        default=None, description="Width of the image in pixels. `null` if not known."
1851    )
1852
1853
1854class TeamTaskReadyResponseDataItemTaskOwnerActor(BaseModel):
1855    alias: str | None = Field(
1856        default=None,
1857        description="Short handle or alias for the actor, used as an alternate display identifier. `null` if not configured.",
1858    )
1859    id: str | None = Field(
1860        default=None,
1861        description='Composite actor identifier. Format is `"user-<usr_...>"` for human users or `"agent-<agi_...>"` for agents.',
1862    )
1863    name: str | None = Field(
1864        default=None,
1865        description="Display name of the actor shown in the UI. `null` if no name is set.",
1866    )
1867    profile_picture: TeamTaskReadyResponseDataItemTaskOwnerActorProfilePicture | None = Field(
1868        default=None,
1869        description="Profile picture for the actor. `null` if the actor has no profile picture.",
1870    )
1871
1872
1873class TeamTaskReadyResponseDataItemTask(BaseModel):
1874    agent: str | None = Field(
1875        default=None,
1876        description="ID of the agent that owns this task (`agi_...`). `null` if the task is scoped to a team or user.",
1877    )
1878    blocked_by_count: int | None = Field(
1879        default=None,
1880        description="Number of tasks marked as blocking this task, whether or not they are done (see `GET /tasks/{task}/blockers`). Computed on list/show reads; create/update responses may lag one read behind.",
1881    )
1882    closed_at: datetime | None = Field(
1883        default=None,
1884        description="When the task was marked as done or otherwise closed (ISO 8601). `null` if the task is still open.",
1885    )
1886    comments_count: int | None = Field(
1887        default=None, description="Total number of comments posted on this task."
1888    )
1889    created_at: datetime | None = Field(
1890        default=None, description="When the task was created (ISO 8601)."
1891    )
1892    created_by_actor: TeamTaskReadyResponseDataItemTaskCreatedByActor | None = Field(
1893        default=None,
1894        description="Resolved creator details including `id`, `name`, `alias`, and `profile_picture`. `null` if no creator is set or the creator cannot be resolved (e.g. creating agent was deleted).",
1895    )
1896    created_by_agent: str | None = Field(
1897        default=None,
1898        description="ID of the agent that created this task (`agi_...`). `null` if the task was created by a human user, or if the creating agent was later deleted.",
1899    )
1900    created_by_user: str | None = Field(
1901        default=None,
1902        description="ID of the user who created this task (`usr_...`). `null` if the task was created by an agent, or if creator provenance was cleared after the creator was deleted.",
1903    )
1904    current_lease: TeamTaskReadyResponseDataItemTaskCurrentLease | None = Field(
1905        default=None,
1906        description="Viewer-safe live coding-session lease summary. `null` when the task is unleased or the projected lease has expired. Fencing identifiers are never included.",
1907    )
1908    description: str | None = Field(
1909        default=None,
1910        description="Long-form description or notes for the task. `null` if no description has been provided.",
1911    )
1912    due_date: datetime | None = Field(
1913        default=None,
1914        description="Date and time by which the task should be completed (ISO 8601). `null` if no due date is set.",
1915    )
1916    epic: str | None = Field(
1917        default=None,
1918        description="Free-form grouping label. `null` when the task is not in an epic.",
1919    )
1920    id: str = Field(..., description="Task ID (`tsk_...`).")
1921    is_blocked: bool | None = Field(
1922        default=None,
1923        description="`true` while at least one blocking task is not yet done. Informational only a blocked task can still change status and derived at read time, so the task un-blocks automatically when its last open blocker completes. Computed on list/show reads; create/update responses report `false` until the next read.",
1924    )
1925    links: dict[str, Any] | None = Field(
1926        default=None,
1927        description="Key-value map of named URLs or references associated with the task. Returns an empty object when no links have been set.",
1928    )
1929    metadata: dict[str, Any] | None = Field(
1930        default=None,
1931        description="Arbitrary key-value map of application-specific data stored alongside the task. Returns an empty object when no metadata has been set.",
1932    )
1933    name: str = Field(..., description="Human-readable title of the task.")
1934    org: str | None = Field(
1935        default=None,
1936        description="ID of the organization this task belongs to (`org_...`). `null` for tasks outside an org context.",
1937    )
1938    owner_actor: TeamTaskReadyResponseDataItemTaskOwnerActor | None = Field(
1939        default=None,
1940        description="Resolved owner details including `id`, `name`, `alias`, and `profile_picture`. `null` if the task is unassigned or the owner cannot be resolved (e.g. assigned agent was deleted).",
1941    )
1942    owner_agent: str | None = Field(
1943        default=None,
1944        description="ID of the agent assigned as owner (`agi_...`). `null` if the owner is a human user, the task is unassigned, or the assigned agent was deleted.",
1945    )
1946    owner_user: str | None = Field(
1947        default=None,
1948        description="ID of the user assigned as owner (`usr_...`). `null` if the owner is an agent, the task is unassigned, or the assigned agent was deleted.",
1949    )
1950    parent: str | None = Field(
1951        default=None,
1952        description="ID of the parent task when this task is a subtask (`tsk_...`). `null` for top-level tasks. Subtasks nest exactly one level.",
1953    )
1954    priority: int | None = Field(
1955        default=None,
1956        description="Priority level of the task from `0` (highest) to `4` (lowest). Defaults to `2` (medium) when not explicitly set.",
1957    )
1958    sandbox: str | None = Field(
1959        default=None,
1960        description="ID of the developer sandbox this task is scoped to (`dsb_...`). `null` for tasks outside a sandbox environment.",
1961    )
1962    source_id: str | None = Field(
1963        default=None,
1964        description="Source object identity (for example `ArchAstro/firstlanding`). `null` when the task has no source.",
1965    )
1966    source_scope: str | None = Field(
1967        default=None,
1968        description="Container of the work this task is about (for example `github.com`). `null` when the task has no source. Set together with `source_type` and `source_id`.",
1969    )
1970    source_type: str | None = Field(
1971        default=None,
1972        description="Kind of source object (for example `repository`). `null` when the task has no source.",
1973    )
1974    status: str = Field(
1975        ...,
1976        description='Current status of the task. One of `"open"`, `"in_progress"`, or `"done"`.',
1977    )
1978    subtasks_count: int | None = Field(
1979        default=None,
1980        description="Number of subtasks under this task. Computed on list/show reads; create/update responses may report 0 until the next read. Always 0 for subtasks.",
1981    )
1982    tags: list[str] | None = Field(
1983        default=None,
1984        description="Labels for grouping and filtering, stored lowercase and de-duplicated. Empty array when untagged.",
1985    )
1986    team: str | None = Field(
1987        default=None,
1988        description="ID of the team that owns this task (`tem_...`). `null` if the task is not scoped to a team.",
1989    )
1990    thread: str | None = Field(
1991        default=None,
1992        description="ID of the thread this task is bound to (`thr_...`) the conversation it was filed from, or the thread passed at creation. `null` for tasks not tied to a thread.",
1993    )
1994    updated_at: datetime | None = Field(
1995        default=None, description="When the task was last modified (ISO 8601)."
1996    )
1997    user: str | None = Field(
1998        default=None,
1999        description="ID of the user that owns this task (`usr_...`). `null` if the task is scoped to a team.",
2000    )
2001
2002
2003class TeamTaskReadyResponseDataItem(BaseModel):
2004    readiness: Literal["ready", "blocked", "leased"] = Field(
2005        ..., description="One of `ready`, `blocked`, or `leased`."
2006    )
2007    reason: Literal["open_blockers", "active_lease"] | None = Field(
2008        default=None,
2009        description="Stable exclusion reason: `open_blockers` or `active_lease`; omitted when ready.",
2010    )
2011    task: TeamTaskReadyResponseDataItemTask = Field(
2012        ..., description="The task evaluated for readiness."
2013    )
2014
2015
2016class TeamTaskReadyResponse(BaseModel):
2017    """
2018    Successful response
2019    """
2020
2021    after_cursor: str | None = None
2022    authoritative: bool = Field(
2023        ...,
2024        description="Always false because projections can lag writes and a later claim can race this read.",
2025    )
2026    before_cursor: str | None = None
2027    data: list[TeamTaskReadyResponseDataItem]
2028    has_more: bool
2029
2030
2031class TeamTaskSearchResponseDataItemCreatedByActorProfilePicture(BaseModel):
2032    file: str | None = Field(
2033        default=None,
2034        description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.",
2035    )
2036    height: int | None = Field(
2037        default=None, description="Height of the image in pixels. `null` if not known."
2038    )
2039    media: str | None = Field(
2040        default=None,
2041        description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.",
2042    )
2043    mime_type: str | None = Field(
2044        default=None,
2045        description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.',
2046    )
2047    refresh_url: str | None = Field(
2048        default=None,
2049        description="Endpoint URL you can call to obtain a fresh signed `url` when the current one has expired. `null` if the URL does not require refreshing.",
2050    )
2051    url: str | None = Field(
2052        default=None,
2053        description="Signed or public URL for downloading the image. May be time-limited; use `refresh_url` to obtain a new URL when this one expires.",
2054    )
2055    width: int | None = Field(
2056        default=None, description="Width of the image in pixels. `null` if not known."
2057    )
2058
2059
2060class TeamTaskSearchResponseDataItemCreatedByActor(BaseModel):
2061    alias: str | None = Field(
2062        default=None,
2063        description="Short handle or alias for the actor, used as an alternate display identifier. `null` if not configured.",
2064    )
2065    id: str | None = Field(
2066        default=None,
2067        description='Composite actor identifier. Format is `"user-<usr_...>"` for human users or `"agent-<agi_...>"` for agents.',
2068    )
2069    name: str | None = Field(
2070        default=None,
2071        description="Display name of the actor shown in the UI. `null` if no name is set.",
2072    )
2073    profile_picture: TeamTaskSearchResponseDataItemCreatedByActorProfilePicture | None = Field(
2074        default=None,
2075        description="Profile picture for the actor. `null` if the actor has no profile picture.",
2076    )
2077
2078
2079class TeamTaskSearchResponseDataItemCurrentLease(BaseModel):
2080    expires_at: datetime = Field(
2081        ..., description="Server-calculated lease expiry in ISO 8601 format."
2082    )
2083    harness: str = Field(..., description="Bounded harness identifier for the coding session.")
2084    session_name: str = Field(
2085        ..., description="Display name supplied by the coding session that holds the lease."
2086    )
2087
2088
2089class TeamTaskSearchResponseDataItemOwnerActorProfilePicture(BaseModel):
2090    file: str | None = Field(
2091        default=None,
2092        description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.",
2093    )
2094    height: int | None = Field(
2095        default=None, description="Height of the image in pixels. `null` if not known."
2096    )
2097    media: str | None = Field(
2098        default=None,
2099        description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.",
2100    )
2101    mime_type: str | None = Field(
2102        default=None,
2103        description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.',
2104    )
2105    refresh_url: str | None = Field(
2106        default=None,
2107        description="Endpoint URL you can call to obtain a fresh signed `url` when the current one has expired. `null` if the URL does not require refreshing.",
2108    )
2109    url: str | None = Field(
2110        default=None,
2111        description="Signed or public URL for downloading the image. May be time-limited; use `refresh_url` to obtain a new URL when this one expires.",
2112    )
2113    width: int | None = Field(
2114        default=None, description="Width of the image in pixels. `null` if not known."
2115    )
2116
2117
2118class TeamTaskSearchResponseDataItemOwnerActor(BaseModel):
2119    alias: str | None = Field(
2120        default=None,
2121        description="Short handle or alias for the actor, used as an alternate display identifier. `null` if not configured.",
2122    )
2123    id: str | None = Field(
2124        default=None,
2125        description='Composite actor identifier. Format is `"user-<usr_...>"` for human users or `"agent-<agi_...>"` for agents.',
2126    )
2127    name: str | None = Field(
2128        default=None,
2129        description="Display name of the actor shown in the UI. `null` if no name is set.",
2130    )
2131    profile_picture: TeamTaskSearchResponseDataItemOwnerActorProfilePicture | None = Field(
2132        default=None,
2133        description="Profile picture for the actor. `null` if the actor has no profile picture.",
2134    )
2135
2136
2137class TeamTaskSearchResponseDataItem(BaseModel):
2138    agent: str | None = Field(
2139        default=None,
2140        description="ID of the agent that owns this task (`agi_...`). `null` if the task is scoped to a team or user.",
2141    )
2142    blocked_by_count: int | None = Field(
2143        default=None,
2144        description="Number of tasks marked as blocking this task, whether or not they are done (see `GET /tasks/{task}/blockers`). Computed on list/show reads; create/update responses may lag one read behind.",
2145    )
2146    closed_at: datetime | None = Field(
2147        default=None,
2148        description="When the task was marked as done or otherwise closed (ISO 8601). `null` if the task is still open.",
2149    )
2150    comments_count: int | None = Field(
2151        default=None, description="Total number of comments posted on this task."
2152    )
2153    created_at: datetime | None = Field(
2154        default=None, description="When the task was created (ISO 8601)."
2155    )
2156    created_by_actor: TeamTaskSearchResponseDataItemCreatedByActor | None = Field(
2157        default=None,
2158        description="Resolved creator details including `id`, `name`, `alias`, and `profile_picture`. `null` if no creator is set or the creator cannot be resolved (e.g. creating agent was deleted).",
2159    )
2160    created_by_agent: str | None = Field(
2161        default=None,
2162        description="ID of the agent that created this task (`agi_...`). `null` if the task was created by a human user, or if the creating agent was later deleted.",
2163    )
2164    created_by_user: str | None = Field(
2165        default=None,
2166        description="ID of the user who created this task (`usr_...`). `null` if the task was created by an agent, or if creator provenance was cleared after the creator was deleted.",
2167    )
2168    current_lease: TeamTaskSearchResponseDataItemCurrentLease | None = Field(
2169        default=None,
2170        description="Viewer-safe live coding-session lease summary. `null` when the task is unleased or the projected lease has expired. Fencing identifiers are never included.",
2171    )
2172    description: str | None = Field(
2173        default=None,
2174        description="Long-form description or notes for the task. `null` if no description has been provided.",
2175    )
2176    due_date: datetime | None = Field(
2177        default=None,
2178        description="Date and time by which the task should be completed (ISO 8601). `null` if no due date is set.",
2179    )
2180    epic: str | None = Field(
2181        default=None,
2182        description="Free-form grouping label. `null` when the task is not in an epic.",
2183    )
2184    id: str = Field(..., description="Task ID (`tsk_...`).")
2185    is_blocked: bool | None = Field(
2186        default=None,
2187        description="`true` while at least one blocking task is not yet done. Informational only a blocked task can still change status and derived at read time, so the task un-blocks automatically when its last open blocker completes. Computed on list/show reads; create/update responses report `false` until the next read.",
2188    )
2189    links: dict[str, Any] | None = Field(
2190        default=None,
2191        description="Key-value map of named URLs or references associated with the task. Returns an empty object when no links have been set.",
2192    )
2193    metadata: dict[str, Any] | None = Field(
2194        default=None,
2195        description="Arbitrary key-value map of application-specific data stored alongside the task. Returns an empty object when no metadata has been set.",
2196    )
2197    name: str = Field(..., description="Human-readable title of the task.")
2198    org: str | None = Field(
2199        default=None,
2200        description="ID of the organization this task belongs to (`org_...`). `null` for tasks outside an org context.",
2201    )
2202    owner_actor: TeamTaskSearchResponseDataItemOwnerActor | None = Field(
2203        default=None,
2204        description="Resolved owner details including `id`, `name`, `alias`, and `profile_picture`. `null` if the task is unassigned or the owner cannot be resolved (e.g. assigned agent was deleted).",
2205    )
2206    owner_agent: str | None = Field(
2207        default=None,
2208        description="ID of the agent assigned as owner (`agi_...`). `null` if the owner is a human user, the task is unassigned, or the assigned agent was deleted.",
2209    )
2210    owner_user: str | None = Field(
2211        default=None,
2212        description="ID of the user assigned as owner (`usr_...`). `null` if the owner is an agent, the task is unassigned, or the assigned agent was deleted.",
2213    )
2214    parent: str | None = Field(
2215        default=None,
2216        description="ID of the parent task when this task is a subtask (`tsk_...`). `null` for top-level tasks. Subtasks nest exactly one level.",
2217    )
2218    priority: int | None = Field(
2219        default=None,
2220        description="Priority level of the task from `0` (highest) to `4` (lowest). Defaults to `2` (medium) when not explicitly set.",
2221    )
2222    sandbox: str | None = Field(
2223        default=None,
2224        description="ID of the developer sandbox this task is scoped to (`dsb_...`). `null` for tasks outside a sandbox environment.",
2225    )
2226    source_id: str | None = Field(
2227        default=None,
2228        description="Source object identity (for example `ArchAstro/firstlanding`). `null` when the task has no source.",
2229    )
2230    source_scope: str | None = Field(
2231        default=None,
2232        description="Container of the work this task is about (for example `github.com`). `null` when the task has no source. Set together with `source_type` and `source_id`.",
2233    )
2234    source_type: str | None = Field(
2235        default=None,
2236        description="Kind of source object (for example `repository`). `null` when the task has no source.",
2237    )
2238    status: str = Field(
2239        ...,
2240        description='Current status of the task. One of `"open"`, `"in_progress"`, or `"done"`.',
2241    )
2242    subtasks_count: int | None = Field(
2243        default=None,
2244        description="Number of subtasks under this task. Computed on list/show reads; create/update responses may report 0 until the next read. Always 0 for subtasks.",
2245    )
2246    tags: list[str] | None = Field(
2247        default=None,
2248        description="Labels for grouping and filtering, stored lowercase and de-duplicated. Empty array when untagged.",
2249    )
2250    team: str | None = Field(
2251        default=None,
2252        description="ID of the team that owns this task (`tem_...`). `null` if the task is not scoped to a team.",
2253    )
2254    thread: str | None = Field(
2255        default=None,
2256        description="ID of the thread this task is bound to (`thr_...`) the conversation it was filed from, or the thread passed at creation. `null` for tasks not tied to a thread.",
2257    )
2258    updated_at: datetime | None = Field(
2259        default=None, description="When the task was last modified (ISO 8601)."
2260    )
2261    user: str | None = Field(
2262        default=None,
2263        description="ID of the user that owns this task (`usr_...`). `null` if the task is scoped to a team.",
2264    )
2265
2266
2267class TeamTaskSearchResponse(BaseModel):
2268    """
2269    Successful response
2270    """
2271
2272    after_cursor: str | None = None
2273    before_cursor: str | None = None
2274    data: list[TeamTaskSearchResponseDataItem] = Field(
2275        ..., description="Array of task objects matching the query and filters."
2276    )
2277    has_more: bool
2278    query: str
2279
2280
2281class TeamThreadListResponseDataItemParentMessageAclAddItem(BaseModel):
2282    actions: list[str] = Field(
2283        ...,
2284        description='Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.',
2285    )
2286    principal: str | None = Field(
2287        default=None,
2288        description='The identifier of the principal. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`; omit entirely when `principal_type` is `"everyone"`.',
2289    )
2290    principal_type: str = Field(
2291        ...,
2292        description='The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.',
2293    )
2294
2295
2296class TeamThreadListResponseDataItemParentMessageAclGrantsItem(BaseModel):
2297    actions: list[str] = Field(
2298        ...,
2299        description='Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.',
2300    )
2301    principal: str | None = Field(
2302        default=None,
2303        description='The identifier of the principal. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`; omit entirely when `principal_type` is `"everyone"`.',
2304    )
2305    principal_type: str = Field(
2306        ...,
2307        description='The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.',
2308    )
2309
2310
2311class TeamThreadListResponseDataItemParentMessageAclRemoveItem(BaseModel):
2312    principal: str | None = Field(
2313        default=None,
2314        description='The identifier of the principal to remove. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`. Omit when `principal_type` is `"everyone"`.',
2315    )
2316    principal_type: str = Field(
2317        ...,
2318        description='The kind of principal to remove. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.',
2319    )
2320
2321
2322class TeamThreadListResponseDataItemParentMessageAcl(BaseModel):
2323    add: list[TeamThreadListResponseDataItemParentMessageAclAddItem] | None = Field(
2324        default=None,
2325        description="Patch mode: grants to add or merge into the existing list. Cannot be combined with `grants`.",
2326    )
2327    grants: list[TeamThreadListResponseDataItemParentMessageAclGrantsItem] | None = Field(
2328        default=None,
2329        description="Replace mode: the complete new list of grants that replaces all existing entries. Send an empty array (`[]`) to clear all grants. Cannot be combined with `add` or `remove`.",
2330    )
2331    remove: list[TeamThreadListResponseDataItemParentMessageAclRemoveItem] | None = Field(
2332        default=None,
2333        description="Patch mode: principals whose grants should be removed from the existing list. Cannot be combined with `grants`.",
2334    )
2335
2336
2337class TeamThreadListResponseDataItemParentMessageActorsItemProfilePicture(BaseModel):
2338    file: str | None = Field(
2339        default=None,
2340        description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.",
2341    )
2342    height: int | None = Field(
2343        default=None, description="Height of the image in pixels. `null` if not known."
2344    )
2345    media: str | None = Field(
2346        default=None,
2347        description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.",
2348    )
2349    mime_type: str | None = Field(
2350        default=None,
2351        description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.',
2352    )
2353    refresh_url: str | None = Field(
2354        default=None,
2355        description="Endpoint URL you can call to obtain a fresh signed `url` when the current one has expired. `null` if the URL does not require refreshing.",
2356    )
2357    url: str | None = Field(
2358        default=None,
2359        description="Signed or public URL for downloading the image. May be time-limited; use `refresh_url` to obtain a new URL when this one expires.",
2360    )
2361    width: int | None = Field(
2362        default=None, description="Width of the image in pixels. `null` if not known."
2363    )
2364
2365
2366class TeamThreadListResponseDataItemParentMessageActorsItem(BaseModel):
2367    alias: str | None = Field(
2368        default=None,
2369        description="Short handle or alias for the actor, used as an alternate display identifier. `null` if not configured.",
2370    )
2371    id: str | None = Field(
2372        default=None,
2373        description='Composite actor identifier. Format is `"user-<usr_...>"` for human users or `"agent-<agi_...>"` for agents.',
2374    )
2375    name: str | None = Field(
2376        default=None,
2377        description="Display name of the actor shown in the UI. `null` if no name is set.",
2378    )
2379    profile_picture: TeamThreadListResponseDataItemParentMessageActorsItemProfilePicture | None = (
2380        Field(
2381            default=None,
2382            description="Profile picture for the actor. `null` if the actor has no profile picture.",
2383        )
2384    )
2385
2386
2387class TeamThreadListResponseDataItemParentMessageAttachmentsItemImageSource(BaseModel):
2388    file: str | None = Field(
2389        default=None,
2390        description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.",
2391    )
2392    height: int | None = Field(
2393        default=None, description="Height of the image in pixels. `null` if not known."
2394    )
2395    media: str | None = Field(
2396        default=None,
2397        description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.",
2398    )
2399    mime_type: str | None = Field(
2400        default=None,
2401        description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.',
2402    )
2403    refresh_url: str | None = Field(
2404        default=None,
2405        description="Endpoint URL you can call to obtain a fresh signed `url` when the current one has expired. `null` if the URL does not require refreshing.",
2406    )
2407    url: str | None = Field(
2408        default=None,
2409        description="Signed or public URL for downloading the image. May be time-limited; use `refresh_url` to obtain a new URL when this one expires.",
2410    )
2411    width: int | None = Field(
2412        default=None, description="Width of the image in pixels. `null` if not known."
2413    )
2414
2415
2416class TeamThreadListResponseDataItemParentMessageAttachmentsItemVariantsItemImageSource(BaseModel):
2417    file: str | None = Field(
2418        default=None,
2419        description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.",
2420    )
2421    height: int | None = Field(
2422        default=None, description="Height of the image in pixels. `null` if not known."
2423    )
2424    media: str | None = Field(
2425        default=None,
2426        description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.",
2427    )
2428    mime_type: str | None = Field(
2429        default=None,
2430        description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.',
2431    )
2432    refresh_url: str | None = Field(
2433        default=None,
2434        description="Endpoint URL you can call to obtain a fresh signed `url` when the current one has expired. `null` if the URL does not require refreshing.",
2435    )
2436    url: str | None = Field(
2437        default=None,
2438        description="Signed or public URL for downloading the image. May be time-limited; use `refresh_url` to obtain a new URL when this one expires.",
2439    )
2440    width: int | None = Field(
2441        default=None, description="Width of the image in pixels. `null` if not known."
2442    )
2443
2444
2445class TeamThreadListResponseDataItemParentMessageAttachmentsItemVariantsItem(BaseModel):
2446    content_type: str | None = Field(
2447        default=None,
2448        description='MIME type of this variant\'s file (e.g., `"image/jpeg"`, `"video/mp4"`). `null` if the file is not loaded.',
2449    )
2450    created_at: datetime | None = Field(
2451        default=None, description="When this variant was created (ISO 8601)."
2452    )
2453    file: str | None = Field(
2454        default=None,
2455        description="ID of the underlying storage file that backs this variant (`fil_...`).",
2456    )
2457    filename: str | None = Field(
2458        default=None,
2459        description="Original filename of the uploaded file for this variant. `null` if the file is not loaded.",
2460    )
2461    height: int | None = Field(
2462        default=None, description="Height of this variant in pixels. `null` if not recorded."
2463    )
2464    id: str = Field(..., description="Media variant ID (`mvr_...`).")
2465    image_source: (
2466        TeamThreadListResponseDataItemParentMessageAttachmentsItemVariantsItemImageSource | None
2467    ) = Field(
2468        default=None,
2469        description="Resolved image delivery metadata for this variant, including dimensions and CDN URL. `null` for non-image content types.",
2470    )
2471    updated_at: datetime | None = Field(
2472        default=None, description="When this variant was last updated (ISO 8601)."
2473    )
2474    url: str | None = Field(
2475        default=None,
2476        description="Signed download URL for this variant, resolved at request time. `null` if the file is unavailable.",
2477    )
2478    variant_key: str | None = Field(
2479        default=None,
2480        description='Identifier for this variant\'s processing tier. Common values include `"original"` (the unmodified upload) and `"thumbnail"` (a resized preview).',
2481    )
2482    width: int | None = Field(
2483        default=None, description="Width of this variant in pixels. `null` if not recorded."
2484    )
2485
2486
2487class TeamThreadListResponseDataItemParentMessageAttachmentsItem(BaseModel):
2488    content_type: str | None = Field(
2489        default=None,
2490        description='MIME type of the attached file, e.g. `"image/png"` or `"application/pdf"`. Present on `file`, `artifact`, and `media` types. `null` otherwise.',
2491    )
2492    description: str | None = Field(
2493        default=None,
2494        description="Short description. The page meta-description for `scraped_link`, the artifact description for `artifact`, and the task description for `task` types. `null` on other types.",
2495    )
2496    filename: str | None = Field(
2497        default=None,
2498        description='Original filename of the attached file, e.g. `"report.pdf"`. Present on `file`, `artifact`, and `media` types. `null` otherwise.',
2499    )
2500    height: int | None = Field(
2501        default=None,
2502        description="Height in pixels of the media item. Present on `media` type only. `null` otherwise.",
2503    )
2504    id: str = Field(..., description="Unique identifier for this attachment within the message.")
2505    image_height: int | None = Field(
2506        default=None,
2507        description="Height in pixels of the scraped preview image. Present on `scraped_link` type only. `null` otherwise.",
2508    )
2509    image_source: TeamThreadListResponseDataItemParentMessageAttachmentsItemImageSource | None = (
2510        Field(
2511            default=None,
2512            description="Image source metadata for inline rendering. Present on `file`, `scraped_link`, `artifact`, and `media` types when the content is an image. `null` otherwise.",
2513        )
2514    )
2515    image_url: str | None = Field(
2516        default=None,
2517        description="URL of the preview image extracted from the scraped page. Present on `scraped_link` type only. `null` otherwise.",
2518    )
2519    image_width: int | None = Field(
2520        default=None,
2521        description="Width in pixels of the scraped preview image. Present on `scraped_link` type only. `null` otherwise.",
2522    )
2523    media_type: str | None = Field(
2524        default=None,
2525        description='The media category, e.g. `"video"` or `"audio"`. Present on `media` type only; omitted otherwise.',
2526    )
2527    name: str | None = Field(
2528        default=None,
2529        description="Display name of the media item. Present on `media` type only. `null` otherwise.",
2530    )
2531    object: dict[str, Any] | None = Field(
2532        default=None,
2533        description="The full embedded object payload. For `task` type, contains the task record. For `action` type, contains the action definition. For `chart` type, contains the chart with its inline `spec`. Omitted on other types.",
2534    )
2535    title: str | None = Field(
2536        default=None,
2537        description="Display title. The page title for `scraped_link`, the artifact name for `artifact`, and the task title for `task` types. `null` on other types.",
2538    )
2539    type: str = Field(
2540        ...,
2541        description='The attachment type. One of `"file"`, `"scraped_link"`, `"artifact"`, `"task"`, `"media"`, `"action"`, or `"chart"`. Determines which additional fields are present.',
2542    )
2543    url: str | None = Field(
2544        default=None,
2545        description="URL to access the resource. A signed download URL for `file` and `artifact` types; the original URL for `scraped_link`; a media playback URL for `media`. `null` on `task` and `action` types.",
2546    )
2547    variants: (
2548        list[TeamThreadListResponseDataItemParentMessageAttachmentsItemVariantsItem] | None
2549    ) = Field(
2550        default=None,
2551        description="Array of available encoding variants for the media item (e.g. different resolutions). Present on `media` type only; omitted otherwise.",
2552    )
2553    version: int | None = Field(
2554        default=None,
2555        description="Version number of the attached artifact at the time of attachment. Present on `artifact` type only. `null` otherwise.",
2556    )
2557    width: int | None = Field(
2558        default=None,
2559        description="Width in pixels of the media item. Present on `media` type only. `null` otherwise.",
2560    )
2561
2562
2563class TeamThreadListResponseDataItemParentMessageReactionsItem(BaseModel):
2564    payload: dict[str, Any] | None = Field(
2565        default=None,
2566        description='Type-specific reaction data. For `"emoji_reaction"` reactions, contains an `emoji` key with the Unicode emoji string (e.g., `" "`).',
2567    )
2568    type: str = Field(
2569        ...,
2570        description='Reaction type identifier. Currently always `"emoji_reaction"` for emoji-based reactions.',
2571    )
2572    user: str | None = Field(
2573        default=None, description="Public ID of the user who added the reaction (`usr_...`)."
2574    )
2575
2576
2577class TeamThreadListResponseDataItemParentMessage(BaseModel):
2578    acl: TeamThreadListResponseDataItemParentMessageAcl | None = Field(
2579        default=None,
2580        description="Access control list for private messages (grants with `read` action). Only returned to resource owners (and privileged/org-admin viewers) via server-side `field_redactions: [acl: :owner]`; `null` for everyone else.",
2581    )
2582    actors: list[TeamThreadListResponseDataItemParentMessageActorsItem] | None = Field(
2583        default=None,
2584        description="Resolved actor descriptors for the message sender, combining identity and display metadata. Always contains exactly one entry.",
2585    )
2586    agent: str | None = Field(
2587        default=None,
2588        description="ID of the agent user that sent this message (`agi_...`). `null` for messages sent by human users.",
2589    )
2590    agent_mode: Literal["cli", "embedded"] | None = Field(
2591        default=None,
2592        description="Local agent execution mode for this message. One of `cli`, `embedded`, or `null` when the message was not created by a local agent execution path.",
2593    )
2594    attachments: list[TeamThreadListResponseDataItemParentMessageAttachmentsItem] | None = Field(
2595        default=None,
2596        description="Files, links, tasks, media, artifacts, and actions attached to this message. Empty array if there are no attachments.",
2597    )
2598    branched_thread: str | None = Field(
2599        default=None,
2600        description="ID of the thread that was branched from this message (`thr_...`). `null` if this message has not spawned a branch thread.",
2601    )
2602    content: str | None = Field(
2603        default=None,
2604        description="Text content of the message. `null` for messages that contain only attachments.",
2605    )
2606    created_at: str | None = Field(
2607        default=None, description="When the message was posted (ISO 8601)."
2608    )
2609    has_replies: bool | None = Field(
2610        default=None,
2611        description="Whether this message has at least one reply. Only present when explicitly requested or computed by the server.",
2612    )
2613    id: str = Field(..., description="Message ID (`msg_...`).")
2614    idempotency_key: str | None = Field(
2615        default=None,
2616        description="Client-supplied idempotency key used to deduplicate message sends. `null` if the sender did not provide one.",
2617    )
2618    is_deleted: bool | None = Field(
2619        default=None,
2620        description="Whether this message is a deletion tombstone. `true` only on the `message_updated` broadcast emitted when a message is deleted: the original content is replaced with a placeholder and the message no longer exists on the server. Always `false` for live messages.",
2621    )
2622    legacy_agent: str | None = Field(
2623        default=None,
2624        description="Identifier of the legacy chat agent that sent this message, if applicable. `null` for messages sent by users or modern agent users.",
2625    )
2626    metadata: dict[str, Any] | None = Field(
2627        default=None,
2628        description="Arbitrary key-value metadata attached to the message. Always present; defaults to an empty object when no metadata has been set.",
2629    )
2630    org: str | None = Field(
2631        default=None, description="ID of the organization that owns this message (`org_...`)."
2632    )
2633    reactions: list[TeamThreadListResponseDataItemParentMessageReactionsItem] | None = Field(
2634        default=None,
2635        description="Emoji and other reactions added to this message by users. Empty array if no reactions have been added or the association is not preloaded.",
2636    )
2637    rendering_mode: str | None = Field(
2638        default=None,
2639        description='Display hint for how the message should be rendered. One of `"reply"`, `"direct"`, or `"inline"`. `null` for user-authored messages, which are always rendered as standard replies.',
2640    )
2641    replies: list[dict[str, Any]] | None = Field(
2642        default=None,
2643        description="Inline array of reply messages, each serialized as a full message object. Only present when the server has preloaded replies for this message.",
2644    )
2645    replies_after_cursor: str | None = Field(
2646        default=None,
2647        description="Opaque pagination cursor to fetch replies posted after the current page. Only present when inline replies are included in the response.",
2648    )
2649    replies_before_cursor: str | None = Field(
2650        default=None,
2651        description="Opaque pagination cursor to fetch replies posted before the current page. Only present when inline replies are included in the response.",
2652    )
2653    reply_count: int | None = Field(
2654        default=None,
2655        description="Total number of direct replies to this message. Only present when explicitly requested or computed by the server.",
2656    )
2657    reply_to: dict[str, Any] | None = Field(
2658        default=None,
2659        description="The parent message this message is a reply to, expanded as a full message object when loaded. `null` if this is a top-level message or the association is not preloaded.",
2660    )
2661    root_message_id: str | None = Field(
2662        default=None,
2663        description="ID of the root message in this reply chain (`msg_...`). `null` for a top-level message. The value is persisted when the reply is created, so callers can correlate a multi-turn session without walking parent messages.",
2664    )
2665    sandbox: str | None = Field(
2666        default=None,
2667        description="ID of the developer sandbox this message belongs to (`dsb_...`). `null` for non-sandbox messages.",
2668    )
2669    team: str | None = Field(
2670        default=None,
2671        description="ID of the team this message is scoped to (`tem_...`). `null` if the message is not team-scoped.",
2672    )
2673    thread: str | None = Field(
2674        default=None, description="ID of the thread this message belongs to (`thr_...`)."
2675    )
2676    type: str | None = Field(
2677        default=None,
2678        description="Optional client-defined classification for the message (for example `note` or `status`). Free-form string up to 64 characters. The value `system` is reserved for platform-authored messages and cannot be set by clients. `null` when unset.",
2679    )
2680    user: str | dict[str, Any] | None = Field(
2681        default=None,
2682        description="The human user who sent this message. Returns a public ID string (`usr_...`) when the association is not preloaded, or an expanded user object when it is. `null` for messages sent by agents.",
2683    )
2684    visibility: Literal["default", "private"] | None = Field(
2685        default=None,
2686        description="Message-level visibility. `default` is visible to anyone who can see the parent thread. `private` is restricted to the sender and explicit ACL `read` grantees.",
2687    )
2688
2689
2690class TeamThreadListResponseDataItemParticipantsItem(BaseModel):
2691    alias: str | None = Field(
2692        default=None, description="Short handle or alias for the user. `null` if not set."
2693    )
2694    app: str | None = Field(
2695        default=None,
2696        description="ID of the app this user (and their access token) is scoped to (`dap_...`). `null` if the user is not scoped to an app.",
2697    )
2698    app_name: str | None = Field(
2699        default=None,
2700        description="Display name of the user's app. `null` when the app association was not preloaded by the caller.",
2701    )
2702    created_by_agent_user: str | None = Field(
2703        default=None,
2704        description="Agent user that created this account (`usr_...`). `null` unless an agent created it.",
2705    )
2706    created_by_developer: str | None = Field(
2707        default=None,
2708        description="Developer account that created this user (`dva_...`). `null` unless created via a developer token.",
2709    )
2710    created_by_org: str | None = Field(
2711        default=None,
2712        description="Org of the principal that created this user (`org_...`). `null` on legacy rows.",
2713    )
2714    created_by_team: str | None = Field(
2715        default=None,
2716        description="Team that created this user (`tem_...`). `null` unless created as a team.",
2717    )
2718    created_by_user: str | None = Field(
2719        default=None,
2720        description="User who created this account (`usr_...`). `null` on self-signup or legacy rows.",
2721    )
2722    email: str | None = Field(default=None, description="Email address of the user.")
2723    id: str = Field(..., description="User ID (`usr_...`).")
2724    is_system_user: bool | None = Field(
2725        default=None,
2726        description="`true` if this account is an internal system user rather than a human. System users are created automatically by the platform.",
2727    )
2728    metadata: dict[str, Any] | None = Field(
2729        default=None,
2730        description="Arbitrary key-value metadata attached to the user. Defaults to an empty object.",
2731    )
2732    name: str | None = Field(
2733        default=None,
2734        description="Full display name of the user. `null` if the user has not set a name.",
2735    )
2736    org: str | None = Field(
2737        default=None,
2738        description="ID of the organization this user belongs to (`org_...`). `null` if the user is not a member of any organization.",
2739    )
2740    org_name: str | None = Field(
2741        default=None,
2742        description="Display name of the user's organization. `null` when the user is not in an org, or when the org association was not preloaded by the caller.",
2743    )
2744    org_role: str | None = Field(
2745        default=None,
2746        description='Role of the user within their organization. One of `"admin"`, `"member"`, or `"viewer"`. `null` when the user is not a member of any organization.',
2747    )
2748    org_slug: str | None = Field(
2749        default=None,
2750        description="Stable workspace slug for the user's organization. `null` when the user is not in an org, or when the org association was not preloaded by the caller.",
2751    )
2752    sandbox: str | None = Field(
2753        default=None,
2754        description="ID of the sandbox environment this user is scoped to (`sbx_...`). `null` for production users.",
2755    )
2756    sandbox_name: str | None = Field(
2757        default=None,
2758        description="Display name of the user's sandbox environment. `null` for production users, or when the sandbox association was not preloaded by the caller.",
2759    )
2760
2761
2762class TeamThreadListResponseDataItemParticipatingAgentsItemAclAddItem(BaseModel):
2763    actions: list[str] = Field(
2764        ...,
2765        description='Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.',
2766    )
2767    principal: str | None = Field(
2768        default=None,
2769        description='The identifier of the principal. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`; omit entirely when `principal_type` is `"everyone"`.',
2770    )
2771    principal_type: str = Field(
2772        ...,
2773        description='The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.',
2774    )
2775
2776
2777class TeamThreadListResponseDataItemParticipatingAgentsItemAclGrantsItem(BaseModel):
2778    actions: list[str] = Field(
2779        ...,
2780        description='Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.',
2781    )
2782    principal: str | None = Field(
2783        default=None,
2784        description='The identifier of the principal. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`; omit entirely when `principal_type` is `"everyone"`.',
2785    )
2786    principal_type: str = Field(
2787        ...,
2788        description='The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.',
2789    )
2790
2791
2792class TeamThreadListResponseDataItemParticipatingAgentsItemAclRemoveItem(BaseModel):
2793    principal: str | None = Field(
2794        default=None,
2795        description='The identifier of the principal to remove. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`. Omit when `principal_type` is `"everyone"`.',
2796    )
2797    principal_type: str = Field(
2798        ...,
2799        description='The kind of principal to remove. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.',
2800    )
2801
2802
2803class TeamThreadListResponseDataItemParticipatingAgentsItemAcl(BaseModel):
2804    add: list[TeamThreadListResponseDataItemParticipatingAgentsItemAclAddItem] | None = Field(
2805        default=None,
2806        description="Patch mode: grants to add or merge into the existing list. Cannot be combined with `grants`.",
2807    )
2808    grants: list[TeamThreadListResponseDataItemParticipatingAgentsItemAclGrantsItem] | None = Field(
2809        default=None,
2810        description="Replace mode: the complete new list of grants that replaces all existing entries. Send an empty array (`[]`) to clear all grants. Cannot be combined with `add` or `remove`.",
2811    )
2812    remove: list[TeamThreadListResponseDataItemParticipatingAgentsItemAclRemoveItem] | None = Field(
2813        default=None,
2814        description="Patch mode: principals whose grants should be removed from the existing list. Cannot be combined with `grants`.",
2815    )
2816
2817
2818class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionCurrentSolutionOrgLogo(
2819    BaseModel
2820):
2821    file: str | None = Field(
2822        default=None,
2823        description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.",
2824    )
2825    height: int | None = Field(
2826        default=None, description="Height of the image in pixels. `null` if not known."
2827    )
2828    media: str | None = Field(
2829        default=None,
2830        description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.",
2831    )
2832    mime_type: str | None = Field(
2833        default=None,
2834        description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.',
2835    )
2836    refresh_url: str | None = Field(
2837        default=None,
2838        description="Endpoint URL you can call to obtain a fresh signed `url` when the current one has expired. `null` if the URL does not require refreshing.",
2839    )
2840    url: str | None = Field(
2841        default=None,
2842        description="Signed or public URL for downloading the image. May be time-limited; use `refresh_url` to obtain a new URL when this one expires.",
2843    )
2844    width: int | None = Field(
2845        default=None, description="Width of the image in pixels. `null` if not known."
2846    )
2847
2848
2849class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionCurrentSolutionTemplatesItemDetailsInvokeContractParticipantsItem(
2850    BaseModel
2851):
2852    description: str | None = Field(
2853        default=None,
2854        description="Workflow-authored explanation of the slot's role. `null` when the workflow declares none.",
2855    )
2856    name: str = Field(
2857        ...,
2858        description="The slot's name, as referenced by the workflow. Supply the chosen agent under the top-level `participants[name]` field when invoking.",
2859    )
2860    required: bool = Field(
2861        ...,
2862        description="Whether the workflow requires this slot to be filled for the run to complete its embedded stages.",
2863    )
2864    type: str = Field(
2865        ...,
2866        description='The kind of principal the slot accepts. Currently always `"agent_user"` the value supplied at invoke is an agent ID (`agi_...`).',
2867    )
2868
2869
2870class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionCurrentSolutionTemplatesItemDetailsInvokeContractPrefills(
2871    BaseModel
2872):
2873    participants: dict[str, Any] | None = Field(
2874        default=None,
2875        description="Participant slot-to-agent mappings applied by the platform. Caller values at these slots must match exactly.",
2876    )
2877    payload: dict[str, Any] | None = Field(
2878        default=None,
2879        description="Partial invocation payload applied by the platform. A caller may omit these values, but supplying a different value at any locked path is rejected.",
2880    )
2881
2882
2883class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionCurrentSolutionTemplatesItemDetailsInvokeContract(
2884    BaseModel
2885):
2886    input_schema: dict[str, Any] | None = Field(
2887        default=None,
2888        description="JSON Schema validated against the whole invoke payload, from the automation's `input_schema_config`. `null` when none is configured.",
2889    )
2890    participants: (
2891        list[
2892            TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionCurrentSolutionTemplatesItemDetailsInvokeContractParticipantsItem
2893        ]
2894        | None
2895    ) = Field(
2896        default=None,
2897        description="Named participant slots declared by the workflow, sorted by name. `null` when the workflow declares none. Values supplied under the top-level `participants` field are agent IDs.",
2898    )
2899    prefills: TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionCurrentSolutionTemplatesItemDetailsInvokeContractPrefills = Field(
2900        ...,
2901        description="Owner-controlled payload and participant values the platform applies to every invocation. Supplying a conflicting value is rejected.",
2902    )
2903
2904
2905class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionCurrentSolutionTemplatesItemDetails(
2906    BaseModel
2907):
2908    automation_type: str | None = Field(
2909        default=None,
2910        description="Automation execution type (`invoked`, `scheduled`, or `trigger`). `null` when the template body does not declare one.",
2911    )
2912    invoke_contract: (
2913        TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionCurrentSolutionTemplatesItemDetailsInvokeContract
2914        | None
2915    ) = Field(
2916        default=None,
2917        description="Schema-driven payload and participant inputs for an invoked automation. Used by installation clients to collect locked prefills before provisioning. `null` for non-invoked automation types.",
2918    )
2919    type: Literal["automation"] = Field(
2920        default="automation",
2921        description="Template-details discriminator. Always `automation` for this variant.",
2922    )
2923
2924
2925class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionCurrentSolutionTemplatesItem(
2926    BaseModel
2927):
2928    description: str | None = Field(
2929        default=None,
2930        description="Short prose blurb from the template body's `description:` field. `null` when the body doesn't set one. Used as the card subhead in the Library carousel.",
2931    )
2932    details: (
2933        TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionCurrentSolutionTemplatesItemDetails
2934        | None
2935    ) = Field(
2936        default=None,
2937        description="Template-kind-specific details selected by the `type` discriminator. `null` when this template kind has no additional details.",
2938    )
2939    display_name: str | None = Field(
2940        default=None,
2941        description="Human-facing label from the template body's `display_name:` field. `null` when the body doesn't set one. Library carousels use this for the card title, falling back to a humanized `name`.",
2942    )
2943    id: str | None = Field(
2944        default=None,
2945        description="Template config ID (`cfg_...`). `null` for inline-only templates.",
2946    )
2947    kind: str = Field(
2948        ...,
2949        description="Template config kind, or `SolutionTemplateRef` / `SolutionTemplatePath` when unresolved.",
2950    )
2951    lookup_key: str | None = Field(
2952        default=None,
2953        description="Lookup key stamped on the template config at import time. `null` when no lookup key was assigned.",
2954    )
2955    name: str | None = Field(
2956        default=None,
2957        description="Canonical name from the template body. For `AgentTemplate` this doubles as the human-facing label; for `AgentToolTemplate` it's the LLM-facing tool function identifier (snake_case); for `AgentRoutineTemplate` it's the routine identifier (kebab-case). Clients rendering carousels should prefer `display_name` and fall back to humanizing `name`.",
2958    )
2959    readme_url: str | None = Field(
2960        default=None,
2961        description="Relative path to the public README endpoint with a signed token already embedded, scoped to this template's bundled markdown asset. `null` when the Solution body's `templates[].readme_path` is unset for this entry. Token expires in 1 hour refresh via `GET /api/v1/solutions/:solution`.",
2962    )
2963    virtual_path: str | None = Field(
2964        default=None,
2965        description="Stable virtual path assigned to the template config. `null` when no virtual path was set.",
2966    )
2967
2968
2969class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionCurrentSolution(BaseModel):
2970    category_keys: list[str] | None = Field(
2971        default=None,
2972        description="Category tag keys declared in the Solution body, used to group Solutions in the catalog. An empty array when the body declares none.",
2973    )
2974    created_at: str | None = Field(
2975        default=None, description="When the Solution config was first imported (ISO 8601)."
2976    )
2977    description: str | None = Field(
2978        default=None,
2979        description="Short tagline or summary declared in the Solution body, used as the card subhead in catalog UIs. `null` when the Solution body does not set one.",
2980    )
2981    events: dict[str, Any] | None = Field(
2982        default=None,
2983        description="Custom analytics events declared in the Solution body's `events:` manifest a map of event key (snake_case) to its definition (`label`, optional `description`, optional typed `fields`). Dashboards use the `label` as the event's display name. Present as an empty object when the body declares none.",
2984    )
2985    id: str = Field(..., description="Solution config ID (`cfg_...`).")
2986    image_url: str | None = Field(
2987        default=None,
2988        description="Absolute URL of the Solution's cover image the bundled asset the body's `image:` field names. A stable, non-expiring capability URL (like `org_logo.url`), safe to hold in caches and OpenGraph tags; it 404s if the Solution stops declaring a cover. `null` when the Solution has no cover image, and always `null` for org-scoped rows the permanent URL is minted for system-scope (catalog) Solutions only.",
2989    )
2990    kind: str = Field(..., description='Resource type. Always `"Solution"`.')
2991    latest_solution: str | None = Field(
2992        default=None,
2993        description="When `upgrade_available` is `true`, the system-scope Solution config ID (`cfg_...`) that should be used as the upgrade source. `null` otherwise.",
2994    )
2995    latest_version: str | None = Field(
2996        default=None,
2997        description="When `upgrade_available` is `true`, the higher system-scope `solution_version` available to upgrade to. `null` otherwise.",
2998    )
2999    lookup_key: str | None = Field(
3000        default=None,
3001        description="The lookup key stored on the Solution config, if one was assigned during import. `null` when no lookup key was set.",
3002    )
3003    metadata: dict[str, Any] | None = Field(
3004        default=None,
3005        description="Arbitrary key-value metadata declared in the Solution body (e.g. category or display hints). Present as an empty object when the body declares none.",
3006    )
3007    name: str | None = Field(
3008        default=None,
3009        description="Human-facing display name declared in the Solution body. `null` when the Solution body does not set one.",
3010    )
3011    org: str | None = Field(
3012        default=None,
3013        description="Organization ID (`org_...`) that owns this Solution config, when the Solution is scoped to a specific org. `null` for system-scope (app-level) Solutions.",
3014    )
3015    org_logo: (
3016        TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionCurrentSolutionOrgLogo
3017        | None
3018    ) = Field(
3019        default=None,
3020        description="Canonical image-source object for the resolved `org`'s logo, used as the principal category section glyph. The `url` is a stable, non-expiring capability URL (`refresh_url` is `null` there is nothing to refresh). `null` when `org_slug` is `null` or the org has no logo.",
3021    )
3022    org_name: str | None = Field(
3023        default=None,
3024        description="Display name of the resolved `org`. Pairs with `org_slug` as the principal catalog category's label. `null` when `org_slug` is `null`.",
3025    )
3026    org_slug: str | None = Field(
3027        default=None,
3028        description="Resolved slug of the Solution body's `org` (the publishing organization), when set and it resolves to a real org visible to the viewer. When present this is the Solution's principal catalog category key clients group the Solution under this org ahead of `category_keys`. `null` when the body has no `org` or it doesn't resolve.",
3029    )
3030    owners: list[str] = Field(
3031        ...,
3032        description='Owner scopes this Solution appears under. Members: `"system"` (app-level system scope) and/or `"org"` (viewer\'s org scope).',
3033    )
3034    readme_url: str | None = Field(
3035        default=None,
3036        description="Relative path to the public README endpoint with a signed token already embedded. `null` when the Solution has no README. Token expires in 1 hour refresh via `GET /api/v1/solutions/:solution`.",
3037    )
3038    screenshot_urls: list[str] | None = Field(
3039        default=None,
3040        description="Absolute URLs of the Solution's gallery screenshots the bundled assets the body's `screenshots:` field names, in declared order. Each is a stable, non-expiring capability URL with the same cacheability contract as `image_url` (one shared token, a `v` cache key, and a `file` param selecting the screenshot); a URL 404s if the Solution stops declaring its screenshot. An empty array when the Solution declares none, and always empty for org-scoped rows the permanent URLs are minted for system-scope (catalog) Solutions only.",
3041    )
3042    solution_id: str | None = Field(
3043        default=None,
3044        description="Stable UUID declared in the Solution body, used to identify the same logical Solution across multiple installed copies and owner scopes. `null` when the body omits it.",
3045    )
3046    solution_version: str | None = Field(
3047        default=None,
3048        description='Semver string declared in the Solution body (e.g. `"1.2.0"`). `null` when the body does not declare a version.',
3049    )
3050    tag_keys: list[str] | None = Field(
3051        default=None,
3052        description="Freeform tag keys declared in the Solution body. An empty array when the body declares none.",
3053    )
3054    template_kind: str | None = Field(
3055        default=None,
3056        description='Wrapped template kind `"AgentTemplate"`, `"AutomationTemplate"`, `"AgentRoutineTemplate"`, `"AgentToolTemplate"`, `"AgentComputerTemplate"`, or `"SolutionTemplateRef"` for ref-mode bundles.',
3057    )
3058    templates: list[
3059        TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionCurrentSolutionTemplatesItem
3060    ] = Field(
3061        ...,
3062        description="Template configs bundled by this Solution, in declaration order the first entry is the deployable template the Solution wraps; the rest are sibling templates the wrapped template references.",
3063    )
3064    updated_at: str | None = Field(
3065        default=None, description="When the Solution config was last modified (ISO 8601)."
3066    )
3067    upgrade_available: bool = Field(
3068        ...,
3069        description="`true` when this Solution is installed at the viewer's org scope and the app-level system scope carries a higher `solution_version`. Always `false` for system-only rows.",
3070    )
3071    virtual_path: str | None = Field(
3072        default=None,
3073        description="The stable virtual path assigned to this Solution config, used as the deduplication key when the same Solution appears under multiple owner scopes. `null` when unset.",
3074    )
3075
3076
3077class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolutionOrgLogo(BaseModel):
3078    file: str | None = Field(
3079        default=None,
3080        description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.",
3081    )
3082    height: int | None = Field(
3083        default=None, description="Height of the image in pixels. `null` if not known."
3084    )
3085    media: str | None = Field(
3086        default=None,
3087        description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.",
3088    )
3089    mime_type: str | None = Field(
3090        default=None,
3091        description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.',
3092    )
3093    refresh_url: str | None = Field(
3094        default=None,
3095        description="Endpoint URL you can call to obtain a fresh signed `url` when the current one has expired. `null` if the URL does not require refreshing.",
3096    )
3097    url: str | None = Field(
3098        default=None,
3099        description="Signed or public URL for downloading the image. May be time-limited; use `refresh_url` to obtain a new URL when this one expires.",
3100    )
3101    width: int | None = Field(
3102        default=None, description="Width of the image in pixels. `null` if not known."
3103    )
3104
3105
3106class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolutionTemplatesItemDetailsInvokeContractParticipantsItem(
3107    BaseModel
3108):
3109    description: str | None = Field(
3110        default=None,
3111        description="Workflow-authored explanation of the slot's role. `null` when the workflow declares none.",
3112    )
3113    name: str = Field(
3114        ...,
3115        description="The slot's name, as referenced by the workflow. Supply the chosen agent under the top-level `participants[name]` field when invoking.",
3116    )
3117    required: bool = Field(
3118        ...,
3119        description="Whether the workflow requires this slot to be filled for the run to complete its embedded stages.",
3120    )
3121    type: str = Field(
3122        ...,
3123        description='The kind of principal the slot accepts. Currently always `"agent_user"` the value supplied at invoke is an agent ID (`agi_...`).',
3124    )
3125
3126
3127class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolutionTemplatesItemDetailsInvokeContractPrefills(
3128    BaseModel
3129):
3130    participants: dict[str, Any] | None = Field(
3131        default=None,
3132        description="Participant slot-to-agent mappings applied by the platform. Caller values at these slots must match exactly.",
3133    )
3134    payload: dict[str, Any] | None = Field(
3135        default=None,
3136        description="Partial invocation payload applied by the platform. A caller may omit these values, but supplying a different value at any locked path is rejected.",
3137    )
3138
3139
3140class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolutionTemplatesItemDetailsInvokeContract(
3141    BaseModel
3142):
3143    input_schema: dict[str, Any] | None = Field(
3144        default=None,
3145        description="JSON Schema validated against the whole invoke payload, from the automation's `input_schema_config`. `null` when none is configured.",
3146    )
3147    participants: (
3148        list[
3149            TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolutionTemplatesItemDetailsInvokeContractParticipantsItem
3150        ]
3151        | None
3152    ) = Field(
3153        default=None,
3154        description="Named participant slots declared by the workflow, sorted by name. `null` when the workflow declares none. Values supplied under the top-level `participants` field are agent IDs.",
3155    )
3156    prefills: TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolutionTemplatesItemDetailsInvokeContractPrefills = Field(
3157        ...,
3158        description="Owner-controlled payload and participant values the platform applies to every invocation. Supplying a conflicting value is rejected.",
3159    )
3160
3161
3162class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolutionTemplatesItemDetails(
3163    BaseModel
3164):
3165    automation_type: str | None = Field(
3166        default=None,
3167        description="Automation execution type (`invoked`, `scheduled`, or `trigger`). `null` when the template body does not declare one.",
3168    )
3169    invoke_contract: (
3170        TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolutionTemplatesItemDetailsInvokeContract
3171        | None
3172    ) = Field(
3173        default=None,
3174        description="Schema-driven payload and participant inputs for an invoked automation. Used by installation clients to collect locked prefills before provisioning. `null` for non-invoked automation types.",
3175    )
3176    type: Literal["automation"] = Field(
3177        default="automation",
3178        description="Template-details discriminator. Always `automation` for this variant.",
3179    )
3180
3181
3182class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolutionTemplatesItem(
3183    BaseModel
3184):
3185    description: str | None = Field(
3186        default=None,
3187        description="Short prose blurb from the template body's `description:` field. `null` when the body doesn't set one. Used as the card subhead in the Library carousel.",
3188    )
3189    details: (
3190        TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolutionTemplatesItemDetails
3191        | None
3192    ) = Field(
3193        default=None,
3194        description="Template-kind-specific details selected by the `type` discriminator. `null` when this template kind has no additional details.",
3195    )
3196    display_name: str | None = Field(
3197        default=None,
3198        description="Human-facing label from the template body's `display_name:` field. `null` when the body doesn't set one. Library carousels use this for the card title, falling back to a humanized `name`.",
3199    )
3200    id: str | None = Field(
3201        default=None,
3202        description="Template config ID (`cfg_...`). `null` for inline-only templates.",
3203    )
3204    kind: str = Field(
3205        ...,
3206        description="Template config kind, or `SolutionTemplateRef` / `SolutionTemplatePath` when unresolved.",
3207    )
3208    lookup_key: str | None = Field(
3209        default=None,
3210        description="Lookup key stamped on the template config at import time. `null` when no lookup key was assigned.",
3211    )
3212    name: str | None = Field(
3213        default=None,
3214        description="Canonical name from the template body. For `AgentTemplate` this doubles as the human-facing label; for `AgentToolTemplate` it's the LLM-facing tool function identifier (snake_case); for `AgentRoutineTemplate` it's the routine identifier (kebab-case). Clients rendering carousels should prefer `display_name` and fall back to humanizing `name`.",
3215    )
3216    readme_url: str | None = Field(
3217        default=None,
3218        description="Relative path to the public README endpoint with a signed token already embedded, scoped to this template's bundled markdown asset. `null` when the Solution body's `templates[].readme_path` is unset for this entry. Token expires in 1 hour refresh via `GET /api/v1/solutions/:solution`.",
3219    )
3220    virtual_path: str | None = Field(
3221        default=None,
3222        description="Stable virtual path assigned to the template config. `null` when no virtual path was set.",
3223    )
3224
3225
3226class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolution(BaseModel):
3227    category_keys: list[str] | None = Field(
3228        default=None,
3229        description="Category tag keys declared in the Solution body, used to group Solutions in the catalog. An empty array when the body declares none.",
3230    )
3231    created_at: str | None = Field(
3232        default=None, description="When the Solution config was first imported (ISO 8601)."
3233    )
3234    description: str | None = Field(
3235        default=None,
3236        description="Short tagline or summary declared in the Solution body, used as the card subhead in catalog UIs. `null` when the Solution body does not set one.",
3237    )
3238    events: dict[str, Any] | None = Field(
3239        default=None,
3240        description="Custom analytics events declared in the Solution body's `events:` manifest a map of event key (snake_case) to its definition (`label`, optional `description`, optional typed `fields`). Dashboards use the `label` as the event's display name. Present as an empty object when the body declares none.",
3241    )
3242    id: str = Field(..., description="Solution config ID (`cfg_...`).")
3243    image_url: str | None = Field(
3244        default=None,
3245        description="Absolute URL of the Solution's cover image the bundled asset the body's `image:` field names. A stable, non-expiring capability URL (like `org_logo.url`), safe to hold in caches and OpenGraph tags; it 404s if the Solution stops declaring a cover. `null` when the Solution has no cover image, and always `null` for org-scoped rows the permanent URL is minted for system-scope (catalog) Solutions only.",
3246    )
3247    kind: str = Field(..., description='Resource type. Always `"Solution"`.')
3248    latest_solution: str | None = Field(
3249        default=None,
3250        description="When `upgrade_available` is `true`, the system-scope Solution config ID (`cfg_...`) that should be used as the upgrade source. `null` otherwise.",
3251    )
3252    latest_version: str | None = Field(
3253        default=None,
3254        description="When `upgrade_available` is `true`, the higher system-scope `solution_version` available to upgrade to. `null` otherwise.",
3255    )
3256    lookup_key: str | None = Field(
3257        default=None,
3258        description="The lookup key stored on the Solution config, if one was assigned during import. `null` when no lookup key was set.",
3259    )
3260    metadata: dict[str, Any] | None = Field(
3261        default=None,
3262        description="Arbitrary key-value metadata declared in the Solution body (e.g. category or display hints). Present as an empty object when the body declares none.",
3263    )
3264    name: str | None = Field(
3265        default=None,
3266        description="Human-facing display name declared in the Solution body. `null` when the Solution body does not set one.",
3267    )
3268    org: str | None = Field(
3269        default=None,
3270        description="Organization ID (`org_...`) that owns this Solution config, when the Solution is scoped to a specific org. `null` for system-scope (app-level) Solutions.",
3271    )
3272    org_logo: (
3273        TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolutionOrgLogo | None
3274    ) = Field(
3275        default=None,
3276        description="Canonical image-source object for the resolved `org`'s logo, used as the principal category section glyph. The `url` is a stable, non-expiring capability URL (`refresh_url` is `null` there is nothing to refresh). `null` when `org_slug` is `null` or the org has no logo.",
3277    )
3278    org_name: str | None = Field(
3279        default=None,
3280        description="Display name of the resolved `org`. Pairs with `org_slug` as the principal catalog category's label. `null` when `org_slug` is `null`.",
3281    )
3282    org_slug: str | None = Field(
3283        default=None,
3284        description="Resolved slug of the Solution body's `org` (the publishing organization), when set and it resolves to a real org visible to the viewer. When present this is the Solution's principal catalog category key clients group the Solution under this org ahead of `category_keys`. `null` when the body has no `org` or it doesn't resolve.",
3285    )
3286    owners: list[str] = Field(
3287        ...,
3288        description='Owner scopes this Solution appears under. Members: `"system"` (app-level system scope) and/or `"org"` (viewer\'s org scope).',
3289    )
3290    readme_url: str | None = Field(
3291        default=None,
3292        description="Relative path to the public README endpoint with a signed token already embedded. `null` when the Solution has no README. Token expires in 1 hour refresh via `GET /api/v1/solutions/:solution`.",
3293    )
3294    screenshot_urls: list[str] | None = Field(
3295        default=None,
3296        description="Absolute URLs of the Solution's gallery screenshots the bundled assets the body's `screenshots:` field names, in declared order. Each is a stable, non-expiring capability URL with the same cacheability contract as `image_url` (one shared token, a `v` cache key, and a `file` param selecting the screenshot); a URL 404s if the Solution stops declaring its screenshot. An empty array when the Solution declares none, and always empty for org-scoped rows the permanent URLs are minted for system-scope (catalog) Solutions only.",
3297    )
3298    solution_id: str | None = Field(
3299        default=None,
3300        description="Stable UUID declared in the Solution body, used to identify the same logical Solution across multiple installed copies and owner scopes. `null` when the body omits it.",
3301    )
3302    solution_version: str | None = Field(
3303        default=None,
3304        description='Semver string declared in the Solution body (e.g. `"1.2.0"`). `null` when the body does not declare a version.',
3305    )
3306    tag_keys: list[str] | None = Field(
3307        default=None,
3308        description="Freeform tag keys declared in the Solution body. An empty array when the body declares none.",
3309    )
3310    template_kind: str | None = Field(
3311        default=None,
3312        description='Wrapped template kind `"AgentTemplate"`, `"AutomationTemplate"`, `"AgentRoutineTemplate"`, `"AgentToolTemplate"`, `"AgentComputerTemplate"`, or `"SolutionTemplateRef"` for ref-mode bundles.',
3313    )
3314    templates: list[
3315        TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolutionTemplatesItem
3316    ] = Field(
3317        ...,
3318        description="Template configs bundled by this Solution, in declaration order the first entry is the deployable template the Solution wraps; the rest are sibling templates the wrapped template references.",
3319    )
3320    updated_at: str | None = Field(
3321        default=None, description="When the Solution config was last modified (ISO 8601)."
3322    )
3323    upgrade_available: bool = Field(
3324        ...,
3325        description="`true` when this Solution is installed at the viewer's org scope and the app-level system scope carries a higher `solution_version`. Always `false` for system-only rows.",
3326    )
3327    virtual_path: str | None = Field(
3328        default=None,
3329        description="The stable virtual path assigned to this Solution config, used as the deduplication key when the same Solution appears under multiple owner scopes. `null` when unset.",
3330    )
3331
3332
3333class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionTemplate(BaseModel):
3334    created_at: datetime | None = Field(
3335        default=None, description="When this template config was created (ISO 8601)."
3336    )
3337    description: str | None = Field(
3338        default=None,
3339        description="Description of the template from the config body. `null` if the current version has no `description` field.",
3340    )
3341    display_name: str | None = Field(
3342        default=None,
3343        description="Human-readable display name from the config body. `null` if the current version has no `display_name` field.",
3344    )
3345    id: str = Field(..., description="Template config ID (`cfg_...`).")
3346    kind: str = Field(
3347        ..., description='Config kind identifier for this template (e.g. `"agent_tool_template"`).'
3348    )
3349    lookup_key: str | None = Field(
3350        default=None,
3351        description="Stable lookup key assigned to this template config. `null` if no lookup key is set.",
3352    )
3353    name: str | None = Field(
3354        default=None,
3355        description="Template name as stored in the config body. `null` if the current version has no `name` field.",
3356    )
3357    updated_at: datetime | None = Field(
3358        default=None, description="When this template config was last modified (ISO 8601)."
3359    )
3360    virtual_path: str | None = Field(
3361        default=None,
3362        description="Virtual filesystem path for this template config. `null` if not set.",
3363    )
3364
3365
3366class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolution(BaseModel):
3367    current_solution: (
3368        TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionCurrentSolution | None
3369    ) = Field(
3370        default=None,
3371        description="Summary of the current parent Solution config row. `solution` is the pinned Solution version the agent points at; `current_solution` is the source Solution config row as it exists now.",
3372    )
3373    solution: TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolution = Field(
3374        ...,
3375        description="Summary of the parent Solution, including `upgrade_available`, `latest_version`, and `latest_solution` when a newer system-scoped version is available for the agent's org-scoped Solution.",
3376    )
3377    template: TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionTemplate = Field(
3378        ...,
3379        description="Summary of the AgentTemplate config (`cfg_...`) the agent was last provisioned or updated from.",
3380    )
3381
3382
3383class TeamThreadListResponseDataItemParticipatingAgentsItem(BaseModel):
3384    acl: TeamThreadListResponseDataItemParticipatingAgentsItemAcl | None = Field(
3385        default=None,
3386        description="Access control list for the agent. Contains a `grants` array where each entry specifies `principal_type`, `principal`, and `actions`. `null` when no ACL restrictions are applied and the agent is accessible to all members of its scope.",
3387    )
3388    app: str | None = Field(
3389        default=None, description="ID of the application that owns this agent (`dap_...`)."
3390    )
3391    created_at: str | None = Field(
3392        default=None, description="When the agent was created (ISO 8601)."
3393    )
3394    default_model: str | None = Field(
3395        default=None,
3396        description='Default LLM model identifier used by this agent when no model is specified at runtime (e.g. `"claude-3-7-sonnet-latest"`).',
3397    )
3398    description: str | None = Field(
3399        default=None,
3400        description="Human-readable description of what the agent does. `null` if not set.",
3401    )
3402    email: str | None = Field(
3403        default=None,
3404        description="Email address provisioned for this agent. `null` if email delivery is not configured.",
3405    )
3406    id: str = Field(..., description="Agent ID (`agi_...`).")
3407    identity: str | None = Field(
3408        default=None,
3409        description="System-level identity prompt that shapes the agent's persona and behavior.",
3410    )
3411    last_applied_template_config: str | None = Field(
3412        default=None,
3413        description="ID of the AgentTemplate config (`cfg_...`) this agent was last provisioned or updated from. `null` for manually created agents.",
3414    )
3415    lookup_key: str | None = Field(
3416        default=None,
3417        description="Stable, user-defined identifier for this agent within the application. Unique per app.",
3418    )
3419    metadata: dict[str, Any] | None = Field(
3420        default=None,
3421        description="Arbitrary key-value metadata attached to the agent. Not interpreted by the platform.",
3422    )
3423    name: str | None = Field(
3424        default=None, description="Human-readable display name for the agent. `null` if not set."
3425    )
3426    org: str | None = Field(
3427        default=None,
3428        description="ID of the organization this agent belongs to (`org_...`). `null` if the agent is not org-scoped.",
3429    )
3430    org_name: str | None = Field(
3431        default=None,
3432        description="Display name of the organization this agent belongs to. `null` when the agent is not org-scoped or when the org association was not preloaded.",
3433    )
3434    originator: str | None = Field(
3435        default=None,
3436        description="Free-form label identifying the source or author that created this agent (e.g. a username or pipeline name).",
3437    )
3438    phone_number: str | None = Field(
3439        default=None,
3440        description="Phone number provisioned for this agent. `null` if SMS is not configured.",
3441    )
3442    sandbox: str | None = Field(
3443        default=None,
3444        description="ID of the sandbox environment this agent is scoped to (`dsb_...`). `null` in production deployments.",
3445    )
3446    source_solution: TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolution | None = (
3447        Field(
3448            default=None,
3449            description="Source Solution and AgentTemplate summary for agents provisioned from a Solution. Includes `upgrade_available`, `latest_version`, and `latest_solution` so you can render an upgrade badge without a separate dry-run call. `null` for hand-built agents and agents whose tracked template or parent Solution has been deleted. Populated only on single-agent GET responses, never on list endpoints.",
3450        )
3451    )
3452    team: str | None = Field(
3453        default=None,
3454        description="ID of the team that owns this agent (`tem_...`). `null` if the agent is not team-scoped.",
3455    )
3456    template_upgrade_available: bool | None = Field(
3457        default=None,
3458        description="True when the agent's last-applied template version is behind the current version of its AgentTemplate config i.e. reapplying the template (a per-agent upgrade) would bring it newer Solution content. Self-clears once the agent is reapplied. Computed on both the list endpoints and single-agent GET. Distinct from `source_solution.upgrade_available`, which compares Solution *versions*: an agent can lag its template (`template_upgrade_available: true`) while the org already holds the latest Solution version (`upgrade_available: false`).",
3459    )
3460    updated_at: str | None = Field(
3461        default=None, description="When the agent was last modified (ISO 8601)."
3462    )
3463    user: str | None = Field(
3464        default=None,
3465        description="ID of the user that owns this agent (`usr_...`). `null` if the agent is not user-scoped.",
3466    )
3467
3468
3469class TeamThreadListResponseDataItemSettings(BaseModel):
3470    agent_enabled: bool | None = Field(
3471        default=None,
3472        description="Whether the AI agent is active for this thread. `true` enables AI responses; `false` disables them. Defaults to `true` when settings have not been explicitly configured. `null` when a client explicitly cleared the setting.",
3473    )
3474
3475
3476class TeamThreadListResponseDataItem(BaseModel):
3477    agent_user: str | None = Field(
3478        default=None,
3479        description="ID of the agent that owns this thread (`agt_...`). `null` for user-owned or team-owned threads.",
3480    )
3481    created_at: str | None = Field(
3482        default=None, description="When the thread was created (ISO 8601)."
3483    )
3484    creator: str | dict[str, Any] | None = Field(
3485        default=None,
3486        description="User who created this thread. Returns a user ID (`usr_...`) by default, or an expanded user object when the association is loaded. `null` if the creator is unknown.",
3487    )
3488    description: str | None = Field(
3489        default=None,
3490        description="Optional description or purpose statement for the thread. `null` if not set.",
3491    )
3492    id: str = Field(..., description="Thread ID (`thr_...`).")
3493    is_channel: bool | None = Field(
3494        default=None,
3495        description="Whether this thread operates as a channel a multi-member broadcast-style conversation.",
3496    )
3497    is_default: bool | None = Field(
3498        default=None,
3499        description="Whether this is the default thread for its owner. Each user or team has at most one default thread.",
3500    )
3501    is_transient: bool | None = Field(
3502        default=None,
3503        description="Whether this thread is ephemeral and may be deleted automatically after a period of inactivity or when its TTL expires.",
3504    )
3505    is_unlisted: bool | None = Field(
3506        default=None,
3507        description="Whether this thread is hidden from public discovery. Unlisted threads are accessible only to direct participants.",
3508    )
3509    key: str | None = Field(
3510        default=None,
3511        description="Application-defined stable key that uniquely identifies the thread within its scope. Useful for idempotent creation. `null` if not set.",
3512    )
3513    kind: str | None = Field(
3514        default=None,
3515        description='Thread subtype: `"standard"` for ordinary threads, `"personal"` for a user-and-owned-agents roster, `"slack_mirror"` for the membership-strict mirror of a Slack channel, or `"slashwork_mirror"` for the membership-strict mirror of a Slashwork group. `personal` is an explicit user-thread creation option; mirror kinds are server-derived.',
3516    )
3517    last_activity: str | None = Field(
3518        default=None,
3519        description="When the most recent message was posted in this thread, falling back to the thread's creation time if it has no messages. Always populated on thread list endpoints (which order by it, after default threads); `null` on endpoints that don't compute activity enrichment.",
3520    )
3521    last_message_preview: str | None = Field(
3522        default=None,
3523        description="Single-line snippet of the most recent message's text content (first non-empty line, truncated to 140 characters). Populated on thread list endpoints alongside `last_activity`; `null` when the thread has no messages, the latest message has no text content (e.g. attachment-only), or the endpoint doesn't compute activity enrichment.",
3524    )
3525    last_message_sender: str | None = Field(
3526        default=None,
3527        description="Display name of the sender of the most recent message the same message `last_message_preview` snippets. Populated on thread list endpoints; `null` when the thread has no messages or the endpoint doesn't compute activity enrichment.",
3528    )
3529    metadata: dict[str, Any] | None = Field(
3530        default=None,
3531        description="Arbitrary key-value metadata attached to the thread. Shape is application-defined; `null` if no metadata has been set.",
3532    )
3533    muted: bool | None = Field(
3534        default=None,
3535        description="Whether the authenticated user has muted notifications for this thread. `true` suppresses all notification delivery.",
3536    )
3537    org: str | None = Field(
3538        default=None,
3539        description="ID of the organization this thread belongs to (`org_...`). `null` for threads outside an org context.",
3540    )
3541    parent_message: TeamThreadListResponseDataItemParentMessage | None = Field(
3542        default=None,
3543        description="The message that spawned this thread as a sub-thread. `null` for top-level threads.",
3544    )
3545    participant: list[str] | None = Field(
3546        default=None,
3547        description="Array of participant user IDs (`usr_...`) who are members of this thread.",
3548    )
3549    participants: list[TeamThreadListResponseDataItemParticipantsItem] | None = Field(
3550        default=None,
3551        description="Expanded participant user objects for each member of this thread. Populated only when the association is loaded.",
3552    )
3553    participating_actor: list[str] | None = Field(
3554        default=None,
3555        description="Composite actor identifiers for all participants currently active in this thread. Present only when actor enrichment is requested.",
3556    )
3557    participating_agents: list[TeamThreadListResponseDataItemParticipatingAgentsItem] | None = (
3558        Field(
3559            default=None,
3560            description="Expanded agent objects for all agents participating in this thread. Present only when agent enrichment is requested.",
3561        )
3562    )
3563    role: str | None = Field(
3564        default=None,
3565        description='The authenticated user\'s membership role in this thread, e.g. `"owner"`, `"member"`, or `"viewer"`. `null` if the user is not a member.',
3566    )
3567    sandbox: str | None = Field(
3568        default=None,
3569        description="ID of the developer sandbox this thread is scoped to (`dsb_...`). `null` for production threads.",
3570    )
3571    settings: TeamThreadListResponseDataItemSettings | None = Field(
3572        default=None,
3573        description="Per-thread configuration settings controlling AI agent behavior for this thread.",
3574    )
3575    slug: str | None = Field(
3576        default=None,
3577        description="URL-safe slug for the thread, used in human-readable permalinks. `null` if not assigned.",
3578    )
3579    sub_threads: list[dict[str, Any]] | None = Field(
3580        default=None,
3581        description="Threads that are nested under this thread as replies to a parent message. Present only when sub-thread enrichment is requested.",
3582    )
3583    tags: list[str] | None = Field(
3584        default=None,
3585        description='Status tags on the thread (e.g. `"blocked"`, `"needs-review"`). Edited by any thread participant via the `/threads/:thread/tags` endpoints and filterable on the thread list endpoints. Empty array if none set.',
3586    )
3587    team: str | None = Field(
3588        default=None,
3589        description="ID of the team that owns this thread (`team_...`). `null` for user-owned or agent-owned threads.",
3590    )
3591    title: str | None = Field(
3592        default=None,
3593        description="Human-readable name of the thread. `null` if no title has been set.",
3594    )
3595    ttl: str | None = Field(
3596        default=None,
3597        description="Offset-free expiry timestamp after which the thread may be automatically cleaned up. `null` if the thread does not expire.",
3598    )
3599    unread_count: int | None = Field(
3600        default=None,
3601        description="Number of messages in this thread that the authenticated user has not yet read. Present only when read-state enrichment is requested.",
3602    )
3603    updated_at: str | None = Field(
3604        default=None, description="When the thread was last modified (ISO 8601)."
3605    )
3606    user: str | None = Field(
3607        default=None,
3608        description="ID of the user who owns this thread (`usr_...`). `null` for team-owned or agent-owned threads.",
3609    )
3610    visibility: Literal["team", "restricted", "private"] = Field(
3611        ...,
3612        description="Who can read the thread: `team` for every owning-team member, `restricted` for team-readable threads with an explicit roster, or `private` for roster-only access.",
3613    )
3614
3615
3616class TeamThreadListResponse(BaseModel):
3617    """
3618    Successful response
3619    """
3620
3621    data: list[TeamThreadListResponseDataItem] = Field(
3622        ..., description="Array of thread objects belonging to the team."
3623    )
3624
3625
3626class TeamThreadMetricsResponse(BaseModel):
3627    """
3628    Successful response
3629    """
3630
3631    days: int
3632    end_at: datetime
3633    opened: int
3634    start_at: datetime
3635
3636
3637class TeamListResponseDataItemAclAddItem(BaseModel):
3638    actions: list[str] = Field(
3639        ...,
3640        description='Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.',
3641    )
3642    principal: str | None = Field(
3643        default=None,
3644        description='The identifier of the principal. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`; omit entirely when `principal_type` is `"everyone"`.',
3645    )
3646    principal_type: str = Field(
3647        ...,
3648        description='The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.',
3649    )
3650
3651
3652class TeamListResponseDataItemAclGrantsItem(BaseModel):
3653    actions: list[str] = Field(
3654        ...,
3655        description='Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.',
3656    )
3657    principal: str | None = Field(
3658        default=None,
3659        description='The identifier of the principal. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`; omit entirely when `principal_type` is `"everyone"`.',
3660    )
3661    principal_type: str = Field(
3662        ...,
3663        description='The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.',
3664    )
3665
3666
3667class TeamListResponseDataItemAclRemoveItem(BaseModel):
3668    principal: str | None = Field(
3669        default=None,
3670        description='The identifier of the principal to remove. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`. Omit when `principal_type` is `"everyone"`.',
3671    )
3672    principal_type: str = Field(
3673        ...,
3674        description='The kind of principal to remove. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.',
3675    )
3676
3677
3678class TeamListResponseDataItemAcl(BaseModel):
3679    add: list[TeamListResponseDataItemAclAddItem] | None = Field(
3680        default=None,
3681        description="Patch mode: grants to add or merge into the existing list. Cannot be combined with `grants`.",
3682    )
3683    grants: list[TeamListResponseDataItemAclGrantsItem] | None = Field(
3684        default=None,
3685        description="Replace mode: the complete new list of grants that replaces all existing entries. Send an empty array (`[]`) to clear all grants. Cannot be combined with `add` or `remove`.",
3686    )
3687    remove: list[TeamListResponseDataItemAclRemoveItem] | None = Field(
3688        default=None,
3689        description="Patch mode: principals whose grants should be removed from the existing list. Cannot be combined with `grants`.",
3690    )
3691
3692
3693class TeamListResponseDataItem(BaseModel):
3694    acl: TeamListResponseDataItemAcl | None = Field(
3695        default=None,
3696        description="Access control list governing visibility and join permissions for this team. `null` when no ACL restrictions are applied and the team inherits default access rules.",
3697    )
3698    app: str | None = Field(
3699        default=None,
3700        description="ID of the developer application this team belongs to (`dap_...`). `null` if the team is not scoped to an app.",
3701    )
3702    badges: dict[str, Any] | None = Field(
3703        default=None,
3704        description="Aggregated badge counts for the team, keyed by category. `null` when badge data is not loaded.",
3705    )
3706    created_at: datetime | None = Field(
3707        default=None, description="When this team was created (ISO 8601)."
3708    )
3709    description: str | None = Field(
3710        default=None,
3711        description="Human-readable description of the team's purpose. `null` if not set.",
3712    )
3713    id: str = Field(..., description="Team ID (`tem_...`).")
3714    membership_status: str | None = Field(
3715        default=None,
3716        description='The authenticated viewer\'s role on this team. One of `"owner"`, `"admin"`, or `"member"`. `null` if the viewer is not a member.',
3717    )
3718    metadata: dict[str, Any] | None = Field(
3719        default=None,
3720        description="Arbitrary key-value metadata attached to this team. Returns an empty object when no metadata has been set.",
3721    )
3722    name: str | None = Field(default=None, description="Display name of the team.")
3723    org: str | None = Field(
3724        default=None,
3725        description="ID of the organization this team belongs to (`org_...`). `null` if the team is not org-scoped.",
3726    )
3727    sandbox: str | None = Field(
3728        default=None,
3729        description="ID of the developer sandbox this team is scoped to (`dsb_...`). `null` outside sandbox contexts.",
3730    )
3731    slug: str | None = Field(
3732        default=None,
3733        description="URL-safe slug for the team, derived from the team name. `null` if not set.",
3734    )
3735    updated_at: datetime | None = Field(
3736        default=None, description="When this team was last updated (ISO 8601)."
3737    )
3738
3739
3740class TeamListResponse(BaseModel):
3741    """
3742    Successful response
3743    """
3744
3745    data: list[TeamListResponseDataItem] = Field(
3746        ..., description="Array of team objects for the current page."
3747    )
3748    has_next: bool = Field(..., description="`true` if there is a subsequent page of results.")
3749    has_prev: bool = Field(..., description="`true` if there is a preceding page of results.")
3750    page: int = Field(..., description="The current page number.")
3751    page_size: int = Field(..., description="The number of results per page.")
3752    total_entries: int = Field(
3753        ..., description="Total number of teams matching the query across all pages."
3754    )
3755    total_pages: int = Field(
3756        ..., description="Total number of pages given the current `page_size`."
3757    )
3758
3759
3760class TeamArtifactsResponseDataItemImageSource(BaseModel):
3761    file: str | None = Field(
3762        default=None,
3763        description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.",
3764    )
3765    height: int | None = Field(
3766        default=None, description="Height of the image in pixels. `null` if not known."
3767    )
3768    media: str | None = Field(
3769        default=None,
3770        description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.",
3771    )
3772    mime_type: str | None = Field(
3773        default=None,
3774        description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.',
3775    )
3776    refresh_url: str | None = Field(
3777        default=None,
3778        description="Endpoint URL you can call to obtain a fresh signed `url` when the current one has expired. `null` if the URL does not require refreshing.",
3779    )
3780    url: str | None = Field(
3781        default=None,
3782        description="Signed or public URL for downloading the image. May be time-limited; use `refresh_url` to obtain a new URL when this one expires.",
3783    )
3784    width: int | None = Field(
3785        default=None, description="Width of the image in pixels. `null` if not known."
3786    )
3787
3788
3789class TeamArtifactsResponseDataItem(BaseModel):
3790    agent: str | None = Field(
3791        default=None,
3792        description="ID of the agent that produced this artifact (`agt_...`). `null` if not agent-produced.",
3793    )
3794    content_type: str | None = Field(
3795        default=None,
3796        description='MIME type of the current version\'s file, e.g. `"text/csv"` or `"image/png"`. `null` if no file is attached.',
3797    )
3798    created_at: datetime | None = Field(
3799        default=None, description="When the artifact was first created (ISO 8601)."
3800    )
3801    current_version: str | None = Field(
3802        default=None,
3803        description="ID of the current (latest published) artifact version (`artv_...`). `null` if no version has been published.",
3804    )
3805    description: str | None = Field(
3806        default=None,
3807        description="Optional longer description of the artifact's contents or purpose. `null` if not set.",
3808    )
3809    file: str | None = Field(
3810        default=None,
3811        description="Storage file ID for the current version (`fil_...`). `null` if no file is attached.",
3812    )
3813    file_name: str | None = Field(
3814        default=None,
3815        description='Original filename of the current version\'s file, e.g. `"output.csv"`. `null` if no file is attached.',
3816    )
3817    file_url: str | None = Field(
3818        default=None,
3819        description="Short-lived signed URL for downloading the current version's file. `null` if no file is attached.",
3820    )
3821    id: str = Field(..., description="Artifact ID (`art_...`).")
3822    image_source: TeamArtifactsResponseDataItemImageSource | None = Field(
3823        default=None,
3824        description='Image source metadata for rendering the current version\'s file inline. Present only when `content_type` starts with `"image/"`. `null` otherwise.',
3825    )
3826    name: str | None = Field(
3827        default=None,
3828        description='Human-readable name for the artifact, e.g. `"Q2 Report"`. `null` if not set.',
3829    )
3830    org: str | None = Field(
3831        default=None, description="ID of the organization this artifact belongs to (`org_...`)."
3832    )
3833    sandbox: str | None = Field(
3834        default=None,
3835        description="Identifier of the sandbox environment associated with this artifact. `null` if not sandbox-scoped.",
3836    )
3837    team: str | None = Field(
3838        default=None,
3839        description="ID of the team that owns this artifact (`tea_...`). `null` if not team-scoped.",
3840    )
3841    thread: str | None = Field(
3842        default=None,
3843        description="ID of the thread in which this artifact was created (`thr_...`). `null` if not thread-scoped.",
3844    )
3845    updated_at: datetime | None = Field(
3846        default=None, description="When the artifact record was last modified (ISO 8601)."
3847    )
3848    user: str | None = Field(
3849        default=None,
3850        description="ID of the user who created this artifact (`usr_...`). `null` if not user-scoped.",
3851    )
3852    version: int | None = Field(
3853        default=None,
3854        description="Current version number of the artifact. Increments each time a new version is published.",
3855    )
3856
3857
3858class TeamArtifactsResponse(BaseModel):
3859    """
3860    Successful response
3861    """
3862
3863    data: list[TeamArtifactsResponseDataItem] = Field(
3864        ..., description="Array of artifact objects belonging to the team."
3865    )
3866
3867
3868class TeamInvitesResponse(BaseModel):
3869    """
3870    Successful response
3871    """
3872
3873    code: str = Field(
3874        ...,
3875        description="Six-character alphanumeric join code. Present this value to the join-team endpoint to add a user to the team.",
3876    )
3877
3878
3879class TeamTaskAssigneesResponseDataItemActorProfilePicture(BaseModel):
3880    file: str | None = Field(
3881        default=None,
3882        description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.",
3883    )
3884    height: int | None = Field(
3885        default=None, description="Height of the image in pixels. `null` if not known."
3886    )
3887    media: str | None = Field(
3888        default=None,
3889        description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.",
3890    )
3891    mime_type: str | None = Field(
3892        default=None,
3893        description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.',
3894    )
3895    refresh_url: str | None = Field(
3896        default=None,
3897        description="Endpoint URL you can call to obtain a fresh signed `url` when the current one has expired. `null` if the URL does not require refreshing.",
3898    )
3899    url: str | None = Field(
3900        default=None,
3901        description="Signed or public URL for downloading the image. May be time-limited; use `refresh_url` to obtain a new URL when this one expires.",
3902    )
3903    width: int | None = Field(
3904        default=None, description="Width of the image in pixels. `null` if not known."
3905    )
3906
3907
3908class TeamTaskAssigneesResponseDataItemActor(BaseModel):
3909    alias: str | None = Field(
3910        default=None,
3911        description="Short handle or alias for the actor, used as an alternate display identifier. `null` if not configured.",
3912    )
3913    id: str | None = Field(
3914        default=None,
3915        description='Composite actor identifier. Format is `"user-<usr_...>"` for human users or `"agent-<agi_...>"` for agents.',
3916    )
3917    name: str | None = Field(
3918        default=None,
3919        description="Display name of the actor shown in the UI. `null` if no name is set.",
3920    )
3921    profile_picture: TeamTaskAssigneesResponseDataItemActorProfilePicture | None = Field(
3922        default=None,
3923        description="Profile picture for the actor. `null` if the actor has no profile picture.",
3924    )
3925
3926
3927class TeamTaskAssigneesResponseDataItem(BaseModel):
3928    actor: TeamTaskAssigneesResponseDataItemActor = Field(
3929        ..., description="Resolved display details for the assignable principal."
3930    )
3931    id: str = Field(..., description="User (`usr_...`) or agent (`agi_...`) ID.")
3932    type: Literal["user", "agent"] = Field(..., description="Principal type: `user` or `agent`.")
3933
3934
3935class TeamTaskAssigneesResponse(BaseModel):
3936    """
3937    Successful response
3938    """
3939
3940    data: list[TeamTaskAssigneesResponseDataItem] = Field(
3941        ..., description="Users and agents that can be assigned to tasks owned by the team."
3942    )
3943
3944
3945class AsyncTeamCustomObjectResource:
3946    def __init__(self, http: HttpClient):
3947        self._http = http
3948
3949    async def list(
3950        self,
3951        team: str,
3952        type: str,
3953        *,
3954        limit: int | None = None,
3955        offset: int | None = None,
3956        row_key: str | None = None,
3957        sort_key: str | None = None,
3958        query: str | None = None,
3959    ) -> TeamCustomObjectListResponse:
3960        """
3961        List a team's custom objects
3962        Returns a paginated list of custom objects owned by the specified team,
3963        filtered to a single schema type. Results are ordered by creation time
3964        descending unless `query` is provided, in which case they are ordered by
3965        full-text relevance score descending.
3966        Use `limit` and `offset` for page-based pagination. Use `row_key` or
3967        `sort_key` to narrow results to objects matching those index values.
3968        Full-text search via `query` operates only against the fields configured
3969        as `search_fields` on the schema.
3970        The authenticated user must be a member of the team with sufficient
3971        access. Returns 404 if the team is not found, the caller lacks access,
3972        or `type` does not match a registered schema for the team's organization.
3973
3974        Args:
3975            team: Team ID (`team_...`). Scopes results to objects owned by this team.
3976            type: Schema type identifier (`lookup_key`) that filters results to objects of this schema.
3977            limit: Maximum number of objects to return per page.
3978            offset: Number of objects to skip before returning results. Use with `limit` for page-based pagination.
3979            row_key: Filter results to objects whose `row_key` exactly matches this value.
3980            sort_key: Filter results to objects whose `sort_key` exactly matches this value.
3981            query: Full-text search string matched against the schema's configured `search_fields`. When provided, results are ordered by relevance score descending instead of creation time descending.
3982
3983        Returns:
3984            Successful response
3985        """
3986        query: dict[str, object] = {}
3987        query["type"] = type
3988        if limit is not None:
3989            query["limit"] = limit
3990        if offset is not None:
3991            query["offset"] = offset
3992        if row_key is not None:
3993            query["row_key"] = row_key
3994        if sort_key is not None:
3995            query["sort_key"] = sort_key
3996        if query is not None:
3997            query["query"] = query
3998        return await self._http.request(
3999            f"/api/v1/teams/{team}/custom_objects",
4000            query=query,
4001            response_type=TeamCustomObjectListResponse,
4002        )
4003
4004    async def create(self, team: str, input: TeamCustomObjectCreateInput) -> CustomObject:
4005        """
4006        Create a team custom object
4007        Creates a new custom object owned by the specified team. The object is
4008        instantiated against the schema identified by `type` (the schema's
4009        `lookup_key`). All field values are validated against that schema's
4010        field definitions before the object is persisted.
4011        The authenticated user must be a member of the team with sufficient
4012        access. If the team is not found or the caller lacks access, the endpoint
4013        returns 404. If `type` does not match a registered schema for the team's
4014        organization, the endpoint also returns 404.
4015
4016        Args:
4017            team: Team ID (`team_...`). Scopes results to objects owned by this team.
4018            input: Request body.
4019            input.fields: Map of field values to set on the new object. Keys and value types must conform to the schema identified by `type`.
4020            input.type: Schema type identifier (`lookup_key`) that defines the object's fields and validation rules.
4021
4022        Returns:
4023            The newly created custom object.
4024        """
4025        return await self._http.request(
4026            f"/api/v1/teams/{team}/custom_objects",
4027            method="POST",
4028            body=input,
4029            response_type=CustomObject,
4030        )
4031
4032
4033class AsyncMemberResource:
4034    def __init__(self, http: HttpClient):
4035        self._http = http
4036
4037    async def remove(self, team: str) -> None:
4038        """
4039        Remove a member or org from a team
4040        Removes a user, agent, or all members of an organization from the specified
4041        team. Provide exactly one of `user`, `agent`, or `org` supplying more than
4042        one or none returns a 400 error. On success, returns 204 No Content.
4043        When `org` is provided, every user and agent membership belonging to that org
4044        is removed in a single call. The caller must be a member of the team's owning
4045        org to perform an org-scoped removal. You cannot target the team's owning org
4046        itself with this parameter.
4047        The caller must have permission to manage the team. When `app` is present, the
4048        request is scoped to that app and requires a valid app-scoped token.
4049
4050        Args:
4051            team: Team ID (`team_...`). The team to remove the member from.
4052
4053        Returns:
4054            Empty response. Returns 204 No Content on success.
4055        """
4056        await self._http.request(f"/api/v1/teams/{team}/members", method="DELETE")
4057
4058    async def list(self, team: str) -> MemberListResponse:
4059        """
4060        List members of a team
4061        Returns all members of the specified team, including both users and agents.
4062        Members are returned in a single non-paginated array ordered by join time.
4063        Bearer-authenticated users must be a member of the team to retrieve its
4064        member list. Developer and server-to-server callers can retrieve members for
4065        any team visible to their app scope. When `app` is provided, the request is
4066        scoped to that app and requires a valid app-scoped token.
4067
4068        Args:
4069            team: Team ID (`team_...`). The team to remove the member from.
4070
4071        Returns:
4072            Successful response
4073        """
4074        return await self._http.request(
4075            f"/api/v1/teams/{team}/members",
4076            response_type=MemberListResponse,
4077        )
4078
4079    async def create(self, team: str, input: MemberCreateInput) -> TeamMembership:
4080        """
4081        Add a member to a team
4082        Adds a user or agent as a member of the specified team and returns the new
4083        membership with HTTP 201. Provide exactly one of `user` or `agent` supplying
4084        both or neither returns a 400 error.
4085        Adding a user requires permission to manage the team (team owner, team
4086        admin, or org admin). Adding an agent with the default `"member"` role is
4087        also open to any existing member of the team; assigning an elevated role to
4088        an agent still requires team-manage permission. When an `app` is provided,
4089        the request is scoped to that app and the caller must hold a valid app-scoped
4090        token. The default role is `"member"` when `role` is omitted.
4091
4092        Args:
4093            team: Team ID (`team_...`). The team to remove the member from.
4094            input: Request body.
4095            input.agent: Agent ID (`agt_...`) to add as a member. Provide exactly one of `user` or `agent`.
4096            input.role: Role to assign. One of `"owner"`, `"admin"`, or `"member"`. Defaults to `"member"` when omitted.
4097            input.user: User ID (`usr_...`) to add as a member. Provide exactly one of `user` or `agent`.
4098
4099        Returns:
4100            The newly created team membership.
4101        """
4102        return await self._http.request(
4103            f"/api/v1/teams/{team}/members",
4104            method="POST",
4105            body=input,
4106            response_type=TeamMembership,
4107        )
4108
4109    async def update(self, team: str, user: str, input: MemberUpdateInput) -> TeamMembership:
4110        """
4111        Update a team member's role
4112        Changes the role of an existing user member on the specified team. Returns the
4113        updated membership on success.
4114        Only user memberships are supported by this endpoint. Attempting to update an
4115        agent membership returns 404. To change an agent's role, remove the existing
4116        membership and re-add the agent with the desired role.
4117        The caller must have permission to modify the team. You cannot change a member's
4118        role across organization boundaries. Demoting the last owner of a team returns
4119        409. An invalid `role` value returns 422. When `app` is provided, the request
4120        is scoped to that app and requires a valid app-scoped token.
4121
4122        Args:
4123            team: Team ID (`team_...`). The team to remove the member from.
4124            user: User ID (`usr_...`) of the existing member whose role should be changed.
4125            input: Request body.
4126            input.role: New role to assign. One of `"owner"`, `"admin"`, or `"member"`.
4127
4128        Returns:
4129            The updated team membership reflecting the new role.
4130        """
4131        return await self._http.request(
4132            f"/api/v1/teams/{team}/members/{user}",
4133            method="PATCH",
4134            body=input,
4135            response_type=TeamMembership,
4136        )
4137
4138
4139class AsyncTeamTaskResource:
4140    def __init__(self, http: HttpClient):
4141        self._http = http
4142
4143    async def list(
4144        self,
4145        team: str,
4146        *,
4147        user: str | None = None,
4148        org: str | None = None,
4149        status: str | None = None,
4150        owner_user: str | None = None,
4151        owner_agent: str | None = None,
4152        priority: int | None = None,
4153        tag: str | None = None,
4154        parent: str | None = None,
4155        source_scope: str | None = None,
4156        source_type: str | None = None,
4157        source_id: str | None = None,
4158        epic: str | None = None,
4159        search: str | None = None,
4160        sort: str | None = None,
4161        order: str | None = None,
4162        due_before: str | None = None,
4163        due_after: str | None = None,
4164        overdue: bool | None = None,
4165        ready: bool | None = None,
4166        limit: int | None = None,
4167        after_cursor: str | None = None,
4168    ) -> TeamTaskListResponse:
4169        """
4170        List an owner's tasks
4171        Returns tasks owned by the specified user or team. You can narrow results using the
4172        optional filters below. By default results are returned in reverse chronological
4173        order (most recently created first); use `sort` and `order` to sort by due date or
4174        priority instead.
4175        User-authenticated callers may list their personal tasks or tasks for teams they
4176        have joined. Privileged callers provide the owner in the route; the owner's
4177        organization is implied by that principal. An explicit `org` is optional and,
4178        when set, must match the owner's organization.
4179
4180        Args:
4181            team: Team ID (`tem_...`). Only tasks belonging to this team are returned.
4182            user: User ID (`usr_...`) for user-scoped tasks.
4183            org: Optional organization (`org_...`) for developer and server-to-server calls. When omitted, the org is taken from the owner principal (team, user, or agent). When set, it must match that principal's org; pass null for an owner outside an organization.
4184            status: Filter tasks by status. One of `"open"`, `"in_progress"`, or `"done"`. Omit to return tasks in all statuses.
4185            owner_user: Filter tasks assigned to a specific user. Provide the user's public ID (`usr_...`).
4186            owner_agent: Filter tasks assigned to a specific agent. Provide the agent's public ID (`agi_...`).
4187            priority: Filter tasks by priority, from 0 (highest) to 4 (lowest).
4188            tag: Return only tasks carrying this tag (matched against the canonical lowercase form).
4189            parent: Return only subtasks of the given task (`tsk_...`), or pass `none` to return only top-level tasks.
4190            source_scope: Return only tasks whose source matches this container. Must be supplied with `source_type` and `source_id`.
4191            source_type: Return only tasks whose source matches this object kind. Must be supplied with the other source filters.
4192            source_id: Return only tasks whose source matches this object identity. Must be supplied with the other source filters.
4193            epic: Return only tasks with this exact epic label.
4194            search: Restrict results to tasks whose name or description contains this string.
4195            sort: Sort key. One of `"created"` (default most recently created first), `"due_date"` (soonest due first; tasks without a due date always sort last), or `"priority"` (most urgent first). Ties break by most recently created.
4196            order: Sort direction, `"asc"` or `"desc"`. Defaults to `"desc"` for `created` and `"asc"` for `due_date` and `priority`.
4197            due_before: Return only tasks with a due date strictly before this ISO 8601 datetime (`2026-08-01T00:00:00Z`) or date (`2026-08-01`, meaning midnight UTC). Tasks without a due date are excluded.
4198            due_after: Return only tasks with a due date strictly after this ISO 8601 datetime or date. Tasks without a due date are excluded.
4199            overdue: When `true`, return only overdue tasks: a due date before the current UTC day and a status other than `"done"`. A task due today is not overdue.
4200            ready: When true, return only open tasks with no unfinished blockers and no active session lease. This is a projection snapshot; claim a lease before starting work.
4201            limit: Maximum number of tasks to return. Capped at 100.
4202            after_cursor: Opaque cursor returned by the previous page.
4203
4204        Returns:
4205            Successful response
4206        """
4207        query: dict[str, object] = {}
4208        if user is not None:
4209            query["user"] = user
4210        if org is not None:
4211            query["org"] = org
4212        if status is not None:
4213            query["status"] = status
4214        if owner_user is not None:
4215            query["owner_user"] = owner_user
4216        if owner_agent is not None:
4217            query["owner_agent"] = owner_agent
4218        if priority is not None:
4219            query["priority"] = priority
4220        if tag is not None:
4221            query["tag"] = tag
4222        if parent is not None:
4223            query["parent"] = parent
4224        if source_scope is not None:
4225            query["source_scope"] = source_scope
4226        if source_type is not None:
4227            query["source_type"] = source_type
4228        if source_id is not None:
4229            query["source_id"] = source_id
4230        if epic is not None:
4231            query["epic"] = epic
4232        if search is not None:
4233            query["search"] = search
4234        if sort is not None:
4235            query["sort"] = sort
4236        if order is not None:
4237            query["order"] = order
4238        if due_before is not None:
4239            query["due_before"] = due_before
4240        if due_after is not None:
4241            query["due_after"] = due_after
4242        if overdue is not None:
4243            query["overdue"] = overdue
4244        if ready is not None:
4245            query["ready"] = ready
4246        if limit is not None:
4247            query["limit"] = limit
4248        if after_cursor is not None:
4249            query["after_cursor"] = after_cursor
4250        return await self._http.request(
4251            f"/api/v1/teams/{team}/tasks",
4252            query=query,
4253            response_type=TeamTaskListResponse,
4254        )
4255
4256    async def create(self, team: str, input: TeamTaskCreateInput) -> Task:
4257        """
4258        Create a task for an owner
4259        Creates a new task owned by the specified user or team and returns the full
4260        task object. User-authenticated calls are attributed to the authenticated
4261        user or agent. App-scoped developer and server-to-server callers must provide
4262        the task's explicit `org` scope and an explicit `user` or `agent` actor for
4263        team tasks; a user-owned task reuses the user in the route unless an explicit
4264        agent is supplied. Every referenced principal is validated against the app,
4265        owner, and team membership before creation.
4266
4267        Args:
4268            team: Team ID (`tem_...`). Only tasks belonging to this team are returned.
4269            input: Request body.
4270            input.agent: Explicit acting agent (`agi_...`) for a developer or server-to-server call. Mutually exclusive with an acting `user`; the agent must belong to the task owner.
4271            input.org: Explicit organization (`org_...`) for developer and server-to-server calls. Pass null when the owner is not organization-scoped. The value must match the selected user or team.
4272            input.task: Attributes for the task to create. `name` is required; all other fields are optional.
4273            input.user: User ID (`usr_...`). On a user route this is the task owner and creator; on a team route it is the explicit acting user for a developer or server-to-server call.
4274
4275        Returns:
4276            The newly created task.
4277        """
4278        return await self._http.request(
4279            f"/api/v1/teams/{team}/tasks",
4280            method="POST",
4281            body=input,
4282            response_type=Task,
4283        )
4284
4285    async def blocker_cycles(
4286        self,
4287        team: str,
4288        *,
4289        user: str | None = None,
4290        org: str | None = None,
4291        limit: int | None = None,
4292        after_cursor: str | None = None,
4293    ) -> TeamTaskBlockerCyclesResponse:
4294        """
4295        List task blocker cycles
4296        Runs an on-demand diagnostic over unfinished tasks owned by the specified
4297        team or user and returns a forward cursor-paginated page of complete cyclic
4298        blocker components. Detection is bounded to owners with at most 100
4299        unfinished tasks. This endpoint is read-only: cycles do not prevent task
4300        updates, lease acquisition, or completion.
4301
4302        Args:
4303            team: Team ID (`tem_...`). Only tasks belonging to this team are returned.
4304            user: User ID (`usr_...`) owning the tasks.
4305            org: Optional organization context for privileged callers.
4306            limit: Maximum cycle components to return. Defaults to 50; maximum is 100.
4307            after_cursor: Opaque cursor returned by the preceding page.
4308
4309        Returns:
4310            Successful response
4311        """
4312        query: dict[str, object] = {}
4313        if user is not None:
4314            query["user"] = user
4315        if org is not None:
4316            query["org"] = org
4317        if limit is not None:
4318            query["limit"] = limit
4319        if after_cursor is not None:
4320            query["after_cursor"] = after_cursor
4321        return await self._http.request(
4322            f"/api/v1/teams/{team}/tasks/blocker_cycles",
4323            query=query,
4324            response_type=TeamTaskBlockerCyclesResponse,
4325        )
4326
4327    async def metrics(self, team: str, *, days: int | None = None) -> TeamTaskMetricsResponse:
4328        """
4329        Get task activity metrics for a team
4330        Returns task activity metrics scoped to one team (the Network in ArchAgents).
4331        `open` counts currently open or in-progress team tasks, `created` counts
4332        tasks inserted in the UTC-day window, and `completed` counts tasks whose
4333        `closed_at` falls in that window while still in a closed status. Hard-deleted
4334        tasks are absent from the projection and therefore omitted. The daily series
4335        is zero-filled across the requested window and includes reconstructed
4336        end-of-day `open` stock (from remaining projection rows' inserted_at/closed_at).
4337        Any authenticated team member may read this count-only Network summary.
4338        Requests from callers without team access return 404 so team existence is
4339        not disclosed.
4340
4341        Args:
4342            team: Team ID (`tem_...`). Only tasks belonging to this team are returned.
4343            days: UTC-day window. One of 7, 30, 90, or 365; defaults to 30.
4344
4345        Returns:
4346            Successful response
4347        """
4348        query: dict[str, object] = {}
4349        if days is not None:
4350            query["days"] = days
4351        return await self._http.request(
4352            f"/api/v1/teams/{team}/tasks/metrics",
4353            query=query,
4354            response_type=TeamTaskMetricsResponse,
4355        )
4356
4357    async def ready(
4358        self,
4359        team: str,
4360        *,
4361        user: str | None = None,
4362        org: str | None = None,
4363        explain: bool | None = None,
4364        assigned_to_me: bool | None = None,
4365        source_scope: str | None = None,
4366        source_type: str | None = None,
4367        source_id: str | None = None,
4368        epic: str | None = None,
4369        limit: int | None = None,
4370        after_cursor: str | None = None,
4371    ) -> TeamTaskReadyResponse:
4372        """
4373        List an owner's ready tasks
4374        Returns open tasks with no unfinished blockers and no active session lease.
4375        Readiness is calculated by the server from the current task projection. It is
4376        a snapshot, not a reservation; claim a task lease before starting work.
4377        Pass `explain=true` to include every open task with a stable readiness reason.
4378
4379        Args:
4380            team: Team ID (`tem_...`). Only tasks belonging to this team are returned.
4381            user: User ID (`usr_...`) owning the tasks.
4382            org: Optional organization context for privileged callers.
4383            explain: Include blocked and actively leased open tasks with exclusion reasons.
4384            assigned_to_me: Only include tasks assigned to the authenticated user.
4385            source_scope: Only include tasks whose source matches this container. Must be supplied with `source_type` and `source_id`.
4386            source_type: Only include tasks whose source matches this object kind.
4387            source_id: Only include tasks whose source matches this object identity.
4388            epic: Only include tasks with this exact epic label.
4389            limit: Maximum number of readiness entries to return. Capped at 100.
4390            after_cursor: Opaque cursor returned by the previous page.
4391
4392        Returns:
4393            Successful response
4394        """
4395        query: dict[str, object] = {}
4396        if user is not None:
4397            query["user"] = user
4398        if org is not None:
4399            query["org"] = org
4400        if explain is not None:
4401            query["explain"] = explain
4402        if assigned_to_me is not None:
4403            query["assigned_to_me"] = assigned_to_me
4404        if source_scope is not None:
4405            query["source_scope"] = source_scope
4406        if source_type is not None:
4407            query["source_type"] = source_type
4408        if source_id is not None:
4409            query["source_id"] = source_id
4410        if epic is not None:
4411            query["epic"] = epic
4412        if limit is not None:
4413            query["limit"] = limit
4414        if after_cursor is not None:
4415            query["after_cursor"] = after_cursor
4416        return await self._http.request(
4417            f"/api/v1/teams/{team}/tasks/ready",
4418            query=query,
4419            response_type=TeamTaskReadyResponse,
4420        )
4421
4422    async def search(
4423        self,
4424        team: str,
4425        *,
4426        user: str | None = None,
4427        org: str | None = None,
4428        q: str | None = None,
4429        query: str | None = None,
4430        status: str | None = None,
4431        owner_user: str | None = None,
4432        owner_agent: str | None = None,
4433        priority: int | None = None,
4434        tag: str | None = None,
4435        parent: str | None = None,
4436        source_scope: str | None = None,
4437        source_type: str | None = None,
4438        source_id: str | None = None,
4439        epic: str | None = None,
4440        limit: int | None = None,
4441        after_cursor: str | None = None,
4442    ) -> TeamTaskSearchResponse:
4443        """
4444        Search an owner's tasks
4445        Performs a full-text search over tasks owned by the specified user or team and returns
4446        matching results. Combine `q` with the optional filters to narrow the result set
4447        further. When no query is provided, the endpoint behaves like a filtered list.
4448        The `query` field in the response echoes the effective search query.
4449        User-authenticated callers may search their personal tasks or tasks for teams
4450        they have joined. Privileged callers provide the owner in the route; the owner's
4451        organization is implied by that principal. An explicit `org` is optional and,
4452        when set, must match the owner's organization.
4453
4454        Args:
4455            team: Team ID (`tem_...`). Only tasks belonging to this team are returned.
4456            user: User ID (`usr_...`) whose tasks are searched.
4457            org: Optional organization (`org_...`) for developer and server-to-server calls. When omitted, the org is taken from the owner principal (team, user, or agent). When set, it must match that principal's org; pass null for an owner outside an organization.
4458            q: Full-text search query matched against task names and descriptions. Takes precedence over `query` when both are provided.
4459            query: Alias for `q`. Use `q` when possible; this parameter exists for compatibility.
4460            status: Filter results by status. One of `"open"`, `"in_progress"`, or `"done"`. Omit to include all statuses.
4461            owner_user: Restrict results to tasks assigned to the user with this public ID (`usr_...`).
4462            owner_agent: Restrict results to tasks assigned to the agent with this public ID (`agi_...`).
4463            priority: Filter results by priority, from 0 (highest) to 4 (lowest).
4464            tag: Return only tasks carrying this tag (matched against the canonical lowercase form).
4465            parent: Return only subtasks of the given task (`tsk_...`), or pass `none` to return only top-level tasks.
4466            source_scope: Return only tasks whose source matches this container. Must be supplied with `source_type` and `source_id`.
4467            source_type: Return only tasks whose source matches this object kind.
4468            source_id: Return only tasks whose source matches this object identity.
4469            epic: Return only tasks with this exact epic label.
4470            limit: Maximum number of tasks to return. Capped at 100.
4471            after_cursor: Opaque cursor returned by the previous page.
4472
4473        Returns:
4474            Successful response
4475        """
4476        query: dict[str, object] = {}
4477        if user is not None:
4478            query["user"] = user
4479        if org is not None:
4480            query["org"] = org
4481        if q is not None:
4482            query["q"] = q
4483        if query is not None:
4484            query["query"] = query
4485        if status is not None:
4486            query["status"] = status
4487        if owner_user is not None:
4488            query["owner_user"] = owner_user
4489        if owner_agent is not None:
4490            query["owner_agent"] = owner_agent
4491        if priority is not None:
4492            query["priority"] = priority
4493        if tag is not None:
4494            query["tag"] = tag
4495        if parent is not None:
4496            query["parent"] = parent
4497        if source_scope is not None:
4498            query["source_scope"] = source_scope
4499        if source_type is not None:
4500            query["source_type"] = source_type
4501        if source_id is not None:
4502            query["source_id"] = source_id
4503        if epic is not None:
4504            query["epic"] = epic
4505        if limit is not None:
4506            query["limit"] = limit
4507        if after_cursor is not None:
4508            query["after_cursor"] = after_cursor
4509        return await self._http.request(
4510            f"/api/v1/teams/{team}/tasks/search",
4511            query=query,
4512            response_type=TeamTaskSearchResponse,
4513        )
4514
4515
4516class AsyncTeamThreadResource:
4517    def __init__(self, http: HttpClient):
4518        self._http = http
4519
4520    async def list(
4521        self, team: str, *, tags: builtins.list[str] | None = None
4522    ) -> TeamThreadListResponse:
4523        """
4524        List threads for a team
4525        Returns all threads owned by the specified team that the authenticated caller
4526        has permission to view. The caller must have access to the team; requests
4527        without team access are rejected with 404.
4528        Threads are returned in a single `data` array, ordered with the team's
4529        default thread first, then by most recent activity (newest first). Each
4530        thread carries a `last_activity` timestamp the most recent message's
4531        creation time, falling back to the thread's own creation time. Use the
4532        team-scoped thread endpoints to create, update, or delete individual
4533        threads.
4534
4535        Args:
4536            team: Team ID (`tem_...`) whose threads should be listed.
4537            tags: Optional: only return threads tagged with at least one of these tags (OR-match). Repeated query params, e.g. `?tags[]=blocked&tags[]=needs-review`.
4538
4539        Returns:
4540            Successful response
4541        """
4542        query: dict[str, object] = {}
4543        if tags is not None:
4544            query["tags"] = tags
4545        return await self._http.request(
4546            f"/api/v1/teams/{team}/threads",
4547            query=query,
4548            response_type=TeamThreadListResponse,
4549        )
4550
4551    async def create(self, team: str, input: TeamThreadCreateInput) -> Thread:
4552        """
4553        Create a thread for a team
4554        Creates a new thread owned by the specified team. The authenticated caller must
4555        have access to the team; requests from callers without team access are rejected
4556        with 404.
4557        If a `profile_picture` is provided in the thread params, it must be
4558        base64-encoded image data. The image is uploaded and associated with the thread
4559        before creation completes. Omit `profile_picture` to skip this step.
4560        By default the platform sends an automatic welcome message into the new thread.
4561        Pass `skip_welcome_message: true` to suppress this behavior, for example when
4562        creating threads programmatically in bulk or seeding test data.
4563
4564        Args:
4565            team: Team ID (`tem_...`) whose threads should be listed.
4566            input: Request body.
4567            input.skip_welcome_message: When `true`, suppresses the automatic welcome message that is otherwise sent into the thread on creation. Defaults to `false`.
4568            input.thread: Attributes for the new thread. See ThreadCreateParams for available fields.
4569
4570        Returns:
4571            The newly created thread.
4572        """
4573        return await self._http.request(
4574            f"/api/v1/teams/{team}/threads",
4575            method="POST",
4576            body=input,
4577            response_type=Thread,
4578        )
4579
4580    async def metrics(self, team: str, *, days: int | None = None) -> TeamThreadMetricsResponse:
4581        """
4582        Get threads-created count for a team
4583        Returns how many **network-public** team threads were created in the UTC-day
4584        window. Counts come from realtime SQL aggregation over append-only
4585        `network_activity_events` (`thread.created` rows co-committed with create):
4586        team- or restricted-visibility threads (plus legacy open-team rows), never
4587        private or mirror. Every Network member sees the same number. Hard-delete
4588        co-commits a separate `thread.deleted` transition event and does not remove
4589        create events (metric is "created", not "still present"). Visibility flips
4590        after insert are ignored in v1.
4591        Any authenticated team member may read this count-only Network summary.
4592        Requests from callers without team access return 404 so team existence is
4593        not disclosed.
4594
4595        Args:
4596            team: Team ID (`tem_...`) whose threads should be listed.
4597            days: UTC-day window. One of 7, 30, 90, or 365; defaults to 30.
4598
4599        Returns:
4600            Successful response
4601        """
4602        query: dict[str, object] = {}
4603        if days is not None:
4604            query["days"] = days
4605        return await self._http.request(
4606            f"/api/v1/teams/{team}/threads/metrics",
4607            query=query,
4608            response_type=TeamThreadMetricsResponse,
4609        )
4610
4611
4612class AsyncTeamResource:
4613    def __init__(self, http: HttpClient):
4614        self._http = http
4615        self.custom_objects = AsyncTeamCustomObjectResource(http)
4616        self.members = AsyncMemberResource(http)
4617        self.tasks = AsyncTeamTaskResource(http)
4618        self.threads = AsyncTeamThreadResource(http)
4619
4620    async def list(
4621        self,
4622        *,
4623        page: int | None = None,
4624        page_size: int | None = None,
4625        search: str | None = None,
4626        metadata: dict[str, Any] | None = None,
4627        membership: str | None = None,
4628    ) -> TeamListResponse:
4629        """
4630        List teams
4631        Returns a paginated list of teams visible to the authenticated user, ordered
4632        by creation time descending. Use `membership` to narrow results to teams the
4633        caller has joined or teams they are eligible to join based on their ACL
4634        visibility.
4635        Supports full-text search across team name and description via `search`, and
4636        structured metadata filtering via `metadata`. When `app` is present, results
4637        are scoped to that app and the caller must hold the corresponding app scope.
4638
4639        Args:
4640            page: Page number to retrieve, starting at 1. Defaults to 1.
4641            page_size: Number of teams to return per page. Defaults to 25.
4642            search: Full-text search string matched against team name and description.
4643            metadata: Structured metadata filter expression. Only teams whose metadata satisfies the expression are returned.
4644            membership: Filter teams by membership status. `"joined"` returns only teams the caller is a member of. `"joinable"` returns ACL-visible teams the caller has not yet joined. Omit to return all visible teams.
4645
4646        Returns:
4647            Successful response
4648        """
4649        query: dict[str, object] = {}
4650        if page is not None:
4651            query["page"] = page
4652        if page_size is not None:
4653            query["page_size"] = page_size
4654        if search is not None:
4655            query["search"] = search
4656        if metadata is not None:
4657            query["metadata"] = metadata
4658        if membership is not None:
4659            query["membership"] = membership
4660        return await self._http.request(
4661            "/api/v1/teams",
4662            query=query,
4663            response_type=TeamListResponse,
4664        )
4665
4666    async def create(self, input: TeamCreateInput) -> Team:
4667        """
4668        Create a team
4669        Creates a new team and returns the created team object. The authenticated
4670        user becomes the team's owner.
4671        When `app` is supplied, the request is scoped to that app and the caller
4672        must hold the corresponding app scope. Omit `org` unless you want the team
4673        pinned to a specific organization. A default chat thread is provisioned for
4674        the team automatically after creation.
4675
4676        Args:
4677            input: Request body.
4678            input.acl: Access control configuration for the team. Controls who can discover and join the team.
4679            input.description: Optional human-readable description of the team's purpose.
4680            input.idempotency_key: Optional retry key. Replays in the same app, organization, and sandbox return the original team.
4681            input.metadata: Arbitrary key-value pairs you can attach to the team for your own use. Values must be strings.
4682            input.name: Display name for the team.
4683            input.org: Organization ID (`org_...`) to associate the team with. Omit to create the team without an org affiliation.
4684
4685        Returns:
4686            The newly created team.
4687        """
4688        return await self._http.request(
4689            "/api/v1/teams",
4690            method="POST",
4691            body=input,
4692            response_type=Team,
4693        )
4694
4695    async def join_by_code(self, input: TeamJoinByCodeInput) -> Team:
4696        """
4697        Join a team with an invite code
4698        Adds a principal to a team using a 12-character invite code. The invite
4699        code can be supplied as either `join_code` or `invite_code`; both are
4700        accepted for backwards compatibility.
4701        For user-authenticated requests, the currently authenticated user is added
4702        to the team. For server-to-server requests, you must supply either `agent`
4703        (to add an agent) or `user` (to add a specific user by ID). If the user
4704        is already a member of the team, the request succeeds without creating a
4705        duplicate membership.
4706        This endpoint is rate-limited to 10 requests per minute per IP address to
4707        prevent invite-code enumeration.
4708
4709        Args:
4710            input: Request body.
4711            input.agent: Agent ID (`agent_...`) to add to the team. When provided, the agent is joined instead of the authenticated user. Requires a server-to-server session.
4712            input.invite_code: 12-character invite code alias for `join_code` accepted for backwards compatibility.
4713            input.join_code: 12-character invite code that identifies the team. Mutually usable with `invite_code`.
4714            input.user: User ID (`user_...`) to add to the team. Required for server-to-server requests when `agent` is not supplied.
4715
4716        Returns:
4717            The team the principal has joined.
4718        """
4719        return await self._http.request(
4720            "/api/v1/teams/join_by_code",
4721            method="POST",
4722            body=input,
4723            response_type=Team,
4724        )
4725
4726    async def delete(self, team: str) -> None:
4727        """
4728        Delete a team
4729        Permanently deletes the team identified by `team`. This action is
4730        irreversible all team memberships, settings, and associated data are
4731        removed.
4732        The caller must be the team owner or an org admin. When `app` is present,
4733        the caller must also hold the corresponding app scope.
4734
4735        Args:
4736            team: Team ID (`team_...`) of the team to delete.
4737
4738        Returns:
4739            Empty response the team has been deleted.
4740        """
4741        await self._http.request(f"/api/v1/teams/{team}", method="DELETE")
4742
4743    async def get(self, team: str) -> Team:
4744        """
4745        Retrieve a team
4746        Returns the full team object for the given `team` ID, including its current
4747        member list and all associated threads.
4748        The authenticated user must be a member of the team or hold a role that
4749        grants visibility (org admin, app scope). When `app` is supplied, the
4750        caller must hold the corresponding app scope.
4751
4752        Args:
4753            team: Team ID (`team_...`) of the team to retrieve.
4754
4755        Returns:
4756            The requested team, including its members and threads.
4757        """
4758        return await self._http.request(f"/api/v1/teams/{team}", response_type=Team)
4759
4760    async def update(self, team: str, input: TeamUpdateInput) -> Team:
4761        """
4762        Update a team
4763        Updates one or more attributes of the team identified by `team`. Only the
4764        fields you provide are changed; omitted fields are left as-is.
4765        To replace the team's profile picture, supply the `profile_picture` object
4766        with base64-encoded image data. The previous picture is deleted after the
4767        new one is successfully uploaded. When `app` is present, the caller must hold
4768        the corresponding app scope. The caller must be a team owner or org admin.
4769
4770        Args:
4771            team: Team ID (`team_...`) of the team to update.
4772            input: Request body.
4773            input.acl: New access control configuration for the team. Replaces the existing ACL.
4774            input.description: New human-readable description of the team's purpose.
4775            input.metadata: Arbitrary key-value pairs to set on the team. Replaces the existing metadata map entirely.
4776            input.name: New display name for the team.
4777            input.profile_picture: New profile picture for the team. Provide this object to upload and replace the current picture.
4778
4779        Returns:
4780            The updated team with all changes applied.
4781        """
4782        return await self._http.request(
4783            f"/api/v1/teams/{team}",
4784            method="PATCH",
4785            body=input,
4786            response_type=Team,
4787        )
4788
4789    async def artifacts(self, team: str) -> TeamArtifactsResponse:
4790        """
4791        List a team's artifacts
4792        Returns all artifacts owned by the specified team. Artifacts represent
4793        AI-generated or user-uploaded files associated with agent sessions,
4794        threads, or sandboxes such as images, documents, and code outputs.
4795        The authenticated user must be a member of the team. Attempting to list
4796        artifacts for a team the caller does not have access to returns 404
4797        rather than 403 to avoid leaking team existence.
4798        Results are returned in a single page without cursor pagination. Each
4799        artifact in the response reflects the state of its current version,
4800        including a short-lived signed `file_url` for direct download.
4801
4802        Args:
4803            team: Team ID (`tea_...`). The authenticated user must be a member of this team.
4804
4805        Returns:
4806            Successful response
4807        """
4808        return await self._http.request(
4809            f"/api/v1/teams/{team}/artifacts",
4810            response_type=TeamArtifactsResponse,
4811        )
4812
4813    async def invite(self, team: str) -> TeamInvite:
4814        """
4815        Create a team invite
4816        Generates a new invite code for the specified team. The authenticated user
4817        must be a member of the team with the `owner` or `admin` role.
4818        The returned code is a short alphanumeric string that other users can
4819        present to join the team. Each call produces a new code; previously issued
4820        codes are not invalidated by this request.
4821
4822        Args:
4823            team: Team ID (`tm_...`) identifying the team for which to generate the invite code.
4824
4825        Returns:
4826            The newly created team invite containing the join code.
4827        """
4828        return await self._http.request(
4829            f"/api/v1/teams/{team}/invite",
4830            method="POST",
4831            response_type=TeamInvite,
4832        )
4833
4834    async def invites(self, team: str) -> TeamInvitesResponse:
4835        """
4836        Create a team invite (server-to-server)
4837        Generates a new invite code for the specified team using server-to-server
4838        authentication. Unlike the user-facing create endpoint, this variant does not
4839        require the caller to be a team member it is intended for privileged
4840        back-end services acting on behalf of your platform.
4841        The returned code is a short alphanumeric string that users can present to
4842        join the team. Each call produces a new code; previously issued codes are
4843        not invalidated by this request.
4844
4845        Args:
4846            team: Team ID (`tm_...`) identifying the team for which to generate the invite code.
4847
4848        Returns:
4849            Successful response
4850        """
4851        return await self._http.request(
4852            f"/api/v1/teams/{team}/invites",
4853            method="POST",
4854            response_type=TeamInvitesResponse,
4855        )
4856
4857    async def join(self, team: str, input: TeamJoinInput) -> None:
4858        """
4859        Join a team
4860        Adds a principal to a team that is visible to the authenticated user.
4861        By default, the currently authenticated user joins the team. Provide `agent`
4862        to add an agent to the team instead the caller must already be a member of
4863        the team to do so. Provide `user` (by ID) or `email` to add another user from
4864        your organization the caller must be a team owner, team admin, or org admin.
4865        Only one of `agent`, `user`, or `email` may be supplied per request.
4866        If the target principal is already a member of the team, the request succeeds
4867        without creating a duplicate membership. Server-to-server callers are not
4868        permitted to use this endpoint; use the invite-code endpoint instead.
4869
4870        Args:
4871            team: Team ID (`team_...`) to join.
4872            input: Request body.
4873            input.agent: Agent ID (`agent_...`) to add to the team. The caller must already be a member of the team.
4874            input.email: Email address of a member of the caller's organization to add to the team. Requires team-owner, team-admin, or org-admin role.
4875            input.user: User ID (`user_...`) of a member of the caller's organization to add to the team. Requires team-owner, team-admin, or org-admin role.
4876
4877        Returns:
4878            Empty response the principal is now a member of the team.
4879        """
4880        await self._http.request(f"/api/v1/teams/{team}/join", method="POST", body=input)
4881
4882    async def leave(self, team: str) -> None:
4883        """
4884        Leave a team
4885        Removes a principal from a team. By default, the authenticated user removes
4886        themselves from the team. Provide `agent` to remove an agent instead the
4887        caller must be a member of the team to do so.
4888        Team owners cannot leave their own team. To transfer ownership first, use
4889        the update-membership endpoint, then call this endpoint.
4890        For server-to-server requests, `user` is required to identify which user
4891        should be removed.
4892
4893        Args:
4894            team: Team ID (`team_...`) to leave.
4895
4896        Returns:
4897            Empty response the principal has been removed from the team.
4898        """
4899        await self._http.request(f"/api/v1/teams/{team}/leave", method="DELETE")
4900
4901    async def task_assignees(
4902        self, team: str, *, org: str | None = None
4903    ) -> TeamTaskAssigneesResponse:
4904        """
4905        List task assignees for a team
4906        Returns the list of principals users and agents that can be assigned
4907        to tasks within the team. Results include both human members and AI agents
4908        and are sorted alphabetically by display name.
4909        This endpoint is only available for team-scoped contexts. Calling it with a
4910        user-scoped owner returns a 400 error. The authenticated user must be a
4911        member of the team or hold org-admin access. App-scoped developer and
4912        server-to-server callers may list assignees for teams in their app so they
4913        can select the explicit user or agent actor required by privileged task
4914        mutations.
4915
4916        Args:
4917            team: Team ID (`tem_...`).
4918            org: Explicit organization (`org_...`) for developer and server-to-server calls. Pass null for a team outside an organization.
4919
4920        Returns:
4921            Successful response
4922        """
4923        query: dict[str, object] = {}
4924        if org is not None:
4925            query["org"] = org
4926        return await self._http.request(
4927            f"/api/v1/teams/{team}/task_assignees",
4928            query=query,
4929            response_type=TeamTaskAssigneesResponse,
4930        )
4931
4932
4933class TeamCustomObjectResource:
4934    def __init__(self, http: SyncHttpClient):
4935        self._http = http
4936
4937    def list(
4938        self,
4939        team: str,
4940        type: str,
4941        *,
4942        limit: int | None = None,
4943        offset: int | None = None,
4944        row_key: str | None = None,
4945        sort_key: str | None = None,
4946        query: str | None = None,
4947    ) -> TeamCustomObjectListResponse:
4948        """
4949        List a team's custom objects
4950        Returns a paginated list of custom objects owned by the specified team,
4951        filtered to a single schema type. Results are ordered by creation time
4952        descending unless `query` is provided, in which case they are ordered by
4953        full-text relevance score descending.
4954        Use `limit` and `offset` for page-based pagination. Use `row_key` or
4955        `sort_key` to narrow results to objects matching those index values.
4956        Full-text search via `query` operates only against the fields configured
4957        as `search_fields` on the schema.
4958        The authenticated user must be a member of the team with sufficient
4959        access. Returns 404 if the team is not found, the caller lacks access,
4960        or `type` does not match a registered schema for the team's organization.
4961
4962        Args:
4963            team: Team ID (`team_...`). Scopes results to objects owned by this team.
4964            type: Schema type identifier (`lookup_key`) that filters results to objects of this schema.
4965            limit: Maximum number of objects to return per page.
4966            offset: Number of objects to skip before returning results. Use with `limit` for page-based pagination.
4967            row_key: Filter results to objects whose `row_key` exactly matches this value.
4968            sort_key: Filter results to objects whose `sort_key` exactly matches this value.
4969            query: Full-text search string matched against the schema's configured `search_fields`. When provided, results are ordered by relevance score descending instead of creation time descending.
4970
4971        Returns:
4972            Successful response
4973        """
4974        query: dict[str, object] = {}
4975        query["type"] = type
4976        if limit is not None:
4977            query["limit"] = limit
4978        if offset is not None:
4979            query["offset"] = offset
4980        if row_key is not None:
4981            query["row_key"] = row_key
4982        if sort_key is not None:
4983            query["sort_key"] = sort_key
4984        if query is not None:
4985            query["query"] = query
4986        return self._http.request(
4987            f"/api/v1/teams/{team}/custom_objects",
4988            query=query,
4989            response_type=TeamCustomObjectListResponse,
4990        )
4991
4992    def create(self, team: str, input: TeamCustomObjectCreateInput) -> CustomObject:
4993        """
4994        Create a team custom object
4995        Creates a new custom object owned by the specified team. The object is
4996        instantiated against the schema identified by `type` (the schema's
4997        `lookup_key`). All field values are validated against that schema's
4998        field definitions before the object is persisted.
4999        The authenticated user must be a member of the team with sufficient
5000        access. If the team is not found or the caller lacks access, the endpoint
5001        returns 404. If `type` does not match a registered schema for the team's
5002        organization, the endpoint also returns 404.
5003
5004        Args:
5005            team: Team ID (`team_...`). Scopes results to objects owned by this team.
5006            input: Request body.
5007            input.fields: Map of field values to set on the new object. Keys and value types must conform to the schema identified by `type`.
5008            input.type: Schema type identifier (`lookup_key`) that defines the object's fields and validation rules.
5009
5010        Returns:
5011            The newly created custom object.
5012        """
5013        return self._http.request(
5014            f"/api/v1/teams/{team}/custom_objects",
5015            method="POST",
5016            body=input,
5017            response_type=CustomObject,
5018        )
5019
5020
5021class MemberResource:
5022    def __init__(self, http: SyncHttpClient):
5023        self._http = http
5024
5025    def remove(self, team: str) -> None:
5026        """
5027        Remove a member or org from a team
5028        Removes a user, agent, or all members of an organization from the specified
5029        team. Provide exactly one of `user`, `agent`, or `org` supplying more than
5030        one or none returns a 400 error. On success, returns 204 No Content.
5031        When `org` is provided, every user and agent membership belonging to that org
5032        is removed in a single call. The caller must be a member of the team's owning
5033        org to perform an org-scoped removal. You cannot target the team's owning org
5034        itself with this parameter.
5035        The caller must have permission to manage the team. When `app` is present, the
5036        request is scoped to that app and requires a valid app-scoped token.
5037
5038        Args:
5039            team: Team ID (`team_...`). The team to remove the member from.
5040
5041        Returns:
5042            Empty response. Returns 204 No Content on success.
5043        """
5044        self._http.request(f"/api/v1/teams/{team}/members", method="DELETE")
5045
5046    def list(self, team: str) -> MemberListResponse:
5047        """
5048        List members of a team
5049        Returns all members of the specified team, including both users and agents.
5050        Members are returned in a single non-paginated array ordered by join time.
5051        Bearer-authenticated users must be a member of the team to retrieve its
5052        member list. Developer and server-to-server callers can retrieve members for
5053        any team visible to their app scope. When `app` is provided, the request is
5054        scoped to that app and requires a valid app-scoped token.
5055
5056        Args:
5057            team: Team ID (`team_...`). The team to remove the member from.
5058
5059        Returns:
5060            Successful response
5061        """
5062        return self._http.request(f"/api/v1/teams/{team}/members", response_type=MemberListResponse)
5063
5064    def create(self, team: str, input: MemberCreateInput) -> TeamMembership:
5065        """
5066        Add a member to a team
5067        Adds a user or agent as a member of the specified team and returns the new
5068        membership with HTTP 201. Provide exactly one of `user` or `agent` supplying
5069        both or neither returns a 400 error.
5070        Adding a user requires permission to manage the team (team owner, team
5071        admin, or org admin). Adding an agent with the default `"member"` role is
5072        also open to any existing member of the team; assigning an elevated role to
5073        an agent still requires team-manage permission. When an `app` is provided,
5074        the request is scoped to that app and the caller must hold a valid app-scoped
5075        token. The default role is `"member"` when `role` is omitted.
5076
5077        Args:
5078            team: Team ID (`team_...`). The team to remove the member from.
5079            input: Request body.
5080            input.agent: Agent ID (`agt_...`) to add as a member. Provide exactly one of `user` or `agent`.
5081            input.role: Role to assign. One of `"owner"`, `"admin"`, or `"member"`. Defaults to `"member"` when omitted.
5082            input.user: User ID (`usr_...`) to add as a member. Provide exactly one of `user` or `agent`.
5083
5084        Returns:
5085            The newly created team membership.
5086        """
5087        return self._http.request(
5088            f"/api/v1/teams/{team}/members",
5089            method="POST",
5090            body=input,
5091            response_type=TeamMembership,
5092        )
5093
5094    def update(self, team: str, user: str, input: MemberUpdateInput) -> TeamMembership:
5095        """
5096        Update a team member's role
5097        Changes the role of an existing user member on the specified team. Returns the
5098        updated membership on success.
5099        Only user memberships are supported by this endpoint. Attempting to update an
5100        agent membership returns 404. To change an agent's role, remove the existing
5101        membership and re-add the agent with the desired role.
5102        The caller must have permission to modify the team. You cannot change a member's
5103        role across organization boundaries. Demoting the last owner of a team returns
5104        409. An invalid `role` value returns 422. When `app` is provided, the request
5105        is scoped to that app and requires a valid app-scoped token.
5106
5107        Args:
5108            team: Team ID (`team_...`). The team to remove the member from.
5109            user: User ID (`usr_...`) of the existing member whose role should be changed.
5110            input: Request body.
5111            input.role: New role to assign. One of `"owner"`, `"admin"`, or `"member"`.
5112
5113        Returns:
5114            The updated team membership reflecting the new role.
5115        """
5116        return self._http.request(
5117            f"/api/v1/teams/{team}/members/{user}",
5118            method="PATCH",
5119            body=input,
5120            response_type=TeamMembership,
5121        )
5122
5123
5124class TeamTaskResource:
5125    def __init__(self, http: SyncHttpClient):
5126        self._http = http
5127
5128    def list(
5129        self,
5130        team: str,
5131        *,
5132        user: str | None = None,
5133        org: str | None = None,
5134        status: str | None = None,
5135        owner_user: str | None = None,
5136        owner_agent: str | None = None,
5137        priority: int | None = None,
5138        tag: str | None = None,
5139        parent: str | None = None,
5140        source_scope: str | None = None,
5141        source_type: str | None = None,
5142        source_id: str | None = None,
5143        epic: str | None = None,
5144        search: str | None = None,
5145        sort: str | None = None,
5146        order: str | None = None,
5147        due_before: str | None = None,
5148        due_after: str | None = None,
5149        overdue: bool | None = None,
5150        ready: bool | None = None,
5151        limit: int | None = None,
5152        after_cursor: str | None = None,
5153    ) -> TeamTaskListResponse:
5154        """
5155        List an owner's tasks
5156        Returns tasks owned by the specified user or team. You can narrow results using the
5157        optional filters below. By default results are returned in reverse chronological
5158        order (most recently created first); use `sort` and `order` to sort by due date or
5159        priority instead.
5160        User-authenticated callers may list their personal tasks or tasks for teams they
5161        have joined. Privileged callers provide the owner in the route; the owner's
5162        organization is implied by that principal. An explicit `org` is optional and,
5163        when set, must match the owner's organization.
5164
5165        Args:
5166            team: Team ID (`tem_...`). Only tasks belonging to this team are returned.
5167            user: User ID (`usr_...`) for user-scoped tasks.
5168            org: Optional organization (`org_...`) for developer and server-to-server calls. When omitted, the org is taken from the owner principal (team, user, or agent). When set, it must match that principal's org; pass null for an owner outside an organization.
5169            status: Filter tasks by status. One of `"open"`, `"in_progress"`, or `"done"`. Omit to return tasks in all statuses.
5170            owner_user: Filter tasks assigned to a specific user. Provide the user's public ID (`usr_...`).
5171            owner_agent: Filter tasks assigned to a specific agent. Provide the agent's public ID (`agi_...`).
5172            priority: Filter tasks by priority, from 0 (highest) to 4 (lowest).
5173            tag: Return only tasks carrying this tag (matched against the canonical lowercase form).
5174            parent: Return only subtasks of the given task (`tsk_...`), or pass `none` to return only top-level tasks.
5175            source_scope: Return only tasks whose source matches this container. Must be supplied with `source_type` and `source_id`.
5176            source_type: Return only tasks whose source matches this object kind. Must be supplied with the other source filters.
5177            source_id: Return only tasks whose source matches this object identity. Must be supplied with the other source filters.
5178            epic: Return only tasks with this exact epic label.
5179            search: Restrict results to tasks whose name or description contains this string.
5180            sort: Sort key. One of `"created"` (default most recently created first), `"due_date"` (soonest due first; tasks without a due date always sort last), or `"priority"` (most urgent first). Ties break by most recently created.
5181            order: Sort direction, `"asc"` or `"desc"`. Defaults to `"desc"` for `created` and `"asc"` for `due_date` and `priority`.
5182            due_before: Return only tasks with a due date strictly before this ISO 8601 datetime (`2026-08-01T00:00:00Z`) or date (`2026-08-01`, meaning midnight UTC). Tasks without a due date are excluded.
5183            due_after: Return only tasks with a due date strictly after this ISO 8601 datetime or date. Tasks without a due date are excluded.
5184            overdue: When `true`, return only overdue tasks: a due date before the current UTC day and a status other than `"done"`. A task due today is not overdue.
5185            ready: When true, return only open tasks with no unfinished blockers and no active session lease. This is a projection snapshot; claim a lease before starting work.
5186            limit: Maximum number of tasks to return. Capped at 100.
5187            after_cursor: Opaque cursor returned by the previous page.
5188
5189        Returns:
5190            Successful response
5191        """
5192        query: dict[str, object] = {}
5193        if user is not None:
5194            query["user"] = user
5195        if org is not None:
5196            query["org"] = org
5197        if status is not None:
5198            query["status"] = status
5199        if owner_user is not None:
5200            query["owner_user"] = owner_user
5201        if owner_agent is not None:
5202            query["owner_agent"] = owner_agent
5203        if priority is not None:
5204            query["priority"] = priority
5205        if tag is not None:
5206            query["tag"] = tag
5207        if parent is not None:
5208            query["parent"] = parent
5209        if source_scope is not None:
5210            query["source_scope"] = source_scope
5211        if source_type is not None:
5212            query["source_type"] = source_type
5213        if source_id is not None:
5214            query["source_id"] = source_id
5215        if epic is not None:
5216            query["epic"] = epic
5217        if search is not None:
5218            query["search"] = search
5219        if sort is not None:
5220            query["sort"] = sort
5221        if order is not None:
5222            query["order"] = order
5223        if due_before is not None:
5224            query["due_before"] = due_before
5225        if due_after is not None:
5226            query["due_after"] = due_after
5227        if overdue is not None:
5228            query["overdue"] = overdue
5229        if ready is not None:
5230            query["ready"] = ready
5231        if limit is not None:
5232            query["limit"] = limit
5233        if after_cursor is not None:
5234            query["after_cursor"] = after_cursor
5235        return self._http.request(
5236            f"/api/v1/teams/{team}/tasks",
5237            query=query,
5238            response_type=TeamTaskListResponse,
5239        )
5240
5241    def create(self, team: str, input: TeamTaskCreateInput) -> Task:
5242        """
5243        Create a task for an owner
5244        Creates a new task owned by the specified user or team and returns the full
5245        task object. User-authenticated calls are attributed to the authenticated
5246        user or agent. App-scoped developer and server-to-server callers must provide
5247        the task's explicit `org` scope and an explicit `user` or `agent` actor for
5248        team tasks; a user-owned task reuses the user in the route unless an explicit
5249        agent is supplied. Every referenced principal is validated against the app,
5250        owner, and team membership before creation.
5251
5252        Args:
5253            team: Team ID (`tem_...`). Only tasks belonging to this team are returned.
5254            input: Request body.
5255            input.agent: Explicit acting agent (`agi_...`) for a developer or server-to-server call. Mutually exclusive with an acting `user`; the agent must belong to the task owner.
5256            input.org: Explicit organization (`org_...`) for developer and server-to-server calls. Pass null when the owner is not organization-scoped. The value must match the selected user or team.
5257            input.task: Attributes for the task to create. `name` is required; all other fields are optional.
5258            input.user: User ID (`usr_...`). On a user route this is the task owner and creator; on a team route it is the explicit acting user for a developer or server-to-server call.
5259
5260        Returns:
5261            The newly created task.
5262        """
5263        return self._http.request(
5264            f"/api/v1/teams/{team}/tasks",
5265            method="POST",
5266            body=input,
5267            response_type=Task,
5268        )
5269
5270    def blocker_cycles(
5271        self,
5272        team: str,
5273        *,
5274        user: str | None = None,
5275        org: str | None = None,
5276        limit: int | None = None,
5277        after_cursor: str | None = None,
5278    ) -> TeamTaskBlockerCyclesResponse:
5279        """
5280        List task blocker cycles
5281        Runs an on-demand diagnostic over unfinished tasks owned by the specified
5282        team or user and returns a forward cursor-paginated page of complete cyclic
5283        blocker components. Detection is bounded to owners with at most 100
5284        unfinished tasks. This endpoint is read-only: cycles do not prevent task
5285        updates, lease acquisition, or completion.
5286
5287        Args:
5288            team: Team ID (`tem_...`). Only tasks belonging to this team are returned.
5289            user: User ID (`usr_...`) owning the tasks.
5290            org: Optional organization context for privileged callers.
5291            limit: Maximum cycle components to return. Defaults to 50; maximum is 100.
5292            after_cursor: Opaque cursor returned by the preceding page.
5293
5294        Returns:
5295            Successful response
5296        """
5297        query: dict[str, object] = {}
5298        if user is not None:
5299            query["user"] = user
5300        if org is not None:
5301            query["org"] = org
5302        if limit is not None:
5303            query["limit"] = limit
5304        if after_cursor is not None:
5305            query["after_cursor"] = after_cursor
5306        return self._http.request(
5307            f"/api/v1/teams/{team}/tasks/blocker_cycles",
5308            query=query,
5309            response_type=TeamTaskBlockerCyclesResponse,
5310        )
5311
5312    def metrics(self, team: str, *, days: int | None = None) -> TeamTaskMetricsResponse:
5313        """
5314        Get task activity metrics for a team
5315        Returns task activity metrics scoped to one team (the Network in ArchAgents).
5316        `open` counts currently open or in-progress team tasks, `created` counts
5317        tasks inserted in the UTC-day window, and `completed` counts tasks whose
5318        `closed_at` falls in that window while still in a closed status. Hard-deleted
5319        tasks are absent from the projection and therefore omitted. The daily series
5320        is zero-filled across the requested window and includes reconstructed
5321        end-of-day `open` stock (from remaining projection rows' inserted_at/closed_at).
5322        Any authenticated team member may read this count-only Network summary.
5323        Requests from callers without team access return 404 so team existence is
5324        not disclosed.
5325
5326        Args:
5327            team: Team ID (`tem_...`). Only tasks belonging to this team are returned.
5328            days: UTC-day window. One of 7, 30, 90, or 365; defaults to 30.
5329
5330        Returns:
5331            Successful response
5332        """
5333        query: dict[str, object] = {}
5334        if days is not None:
5335            query["days"] = days
5336        return self._http.request(
5337            f"/api/v1/teams/{team}/tasks/metrics",
5338            query=query,
5339            response_type=TeamTaskMetricsResponse,
5340        )
5341
5342    def ready(
5343        self,
5344        team: str,
5345        *,
5346        user: str | None = None,
5347        org: str | None = None,
5348        explain: bool | None = None,
5349        assigned_to_me: bool | None = None,
5350        source_scope: str | None = None,
5351        source_type: str | None = None,
5352        source_id: str | None = None,
5353        epic: str | None = None,
5354        limit: int | None = None,
5355        after_cursor: str | None = None,
5356    ) -> TeamTaskReadyResponse:
5357        """
5358        List an owner's ready tasks
5359        Returns open tasks with no unfinished blockers and no active session lease.
5360        Readiness is calculated by the server from the current task projection. It is
5361        a snapshot, not a reservation; claim a task lease before starting work.
5362        Pass `explain=true` to include every open task with a stable readiness reason.
5363
5364        Args:
5365            team: Team ID (`tem_...`). Only tasks belonging to this team are returned.
5366            user: User ID (`usr_...`) owning the tasks.
5367            org: Optional organization context for privileged callers.
5368            explain: Include blocked and actively leased open tasks with exclusion reasons.
5369            assigned_to_me: Only include tasks assigned to the authenticated user.
5370            source_scope: Only include tasks whose source matches this container. Must be supplied with `source_type` and `source_id`.
5371            source_type: Only include tasks whose source matches this object kind.
5372            source_id: Only include tasks whose source matches this object identity.
5373            epic: Only include tasks with this exact epic label.
5374            limit: Maximum number of readiness entries to return. Capped at 100.
5375            after_cursor: Opaque cursor returned by the previous page.
5376
5377        Returns:
5378            Successful response
5379        """
5380        query: dict[str, object] = {}
5381        if user is not None:
5382            query["user"] = user
5383        if org is not None:
5384            query["org"] = org
5385        if explain is not None:
5386            query["explain"] = explain
5387        if assigned_to_me is not None:
5388            query["assigned_to_me"] = assigned_to_me
5389        if source_scope is not None:
5390            query["source_scope"] = source_scope
5391        if source_type is not None:
5392            query["source_type"] = source_type
5393        if source_id is not None:
5394            query["source_id"] = source_id
5395        if epic is not None:
5396            query["epic"] = epic
5397        if limit is not None:
5398            query["limit"] = limit
5399        if after_cursor is not None:
5400            query["after_cursor"] = after_cursor
5401        return self._http.request(
5402            f"/api/v1/teams/{team}/tasks/ready",
5403            query=query,
5404            response_type=TeamTaskReadyResponse,
5405        )
5406
5407    def search(
5408        self,
5409        team: str,
5410        *,
5411        user: str | None = None,
5412        org: str | None = None,
5413        q: str | None = None,
5414        query: str | None = None,
5415        status: str | None = None,
5416        owner_user: str | None = None,
5417        owner_agent: str | None = None,
5418        priority: int | None = None,
5419        tag: str | None = None,
5420        parent: str | None = None,
5421        source_scope: str | None = None,
5422        source_type: str | None = None,
5423        source_id: str | None = None,
5424        epic: str | None = None,
5425        limit: int | None = None,
5426        after_cursor: str | None = None,
5427    ) -> TeamTaskSearchResponse:
5428        """
5429        Search an owner's tasks
5430        Performs a full-text search over tasks owned by the specified user or team and returns
5431        matching results. Combine `q` with the optional filters to narrow the result set
5432        further. When no query is provided, the endpoint behaves like a filtered list.
5433        The `query` field in the response echoes the effective search query.
5434        User-authenticated callers may search their personal tasks or tasks for teams
5435        they have joined. Privileged callers provide the owner in the route; the owner's
5436        organization is implied by that principal. An explicit `org` is optional and,
5437        when set, must match the owner's organization.
5438
5439        Args:
5440            team: Team ID (`tem_...`). Only tasks belonging to this team are returned.
5441            user: User ID (`usr_...`) whose tasks are searched.
5442            org: Optional organization (`org_...`) for developer and server-to-server calls. When omitted, the org is taken from the owner principal (team, user, or agent). When set, it must match that principal's org; pass null for an owner outside an organization.
5443            q: Full-text search query matched against task names and descriptions. Takes precedence over `query` when both are provided.
5444            query: Alias for `q`. Use `q` when possible; this parameter exists for compatibility.
5445            status: Filter results by status. One of `"open"`, `"in_progress"`, or `"done"`. Omit to include all statuses.
5446            owner_user: Restrict results to tasks assigned to the user with this public ID (`usr_...`).
5447            owner_agent: Restrict results to tasks assigned to the agent with this public ID (`agi_...`).
5448            priority: Filter results by priority, from 0 (highest) to 4 (lowest).
5449            tag: Return only tasks carrying this tag (matched against the canonical lowercase form).
5450            parent: Return only subtasks of the given task (`tsk_...`), or pass `none` to return only top-level tasks.
5451            source_scope: Return only tasks whose source matches this container. Must be supplied with `source_type` and `source_id`.
5452            source_type: Return only tasks whose source matches this object kind.
5453            source_id: Return only tasks whose source matches this object identity.
5454            epic: Return only tasks with this exact epic label.
5455            limit: Maximum number of tasks to return. Capped at 100.
5456            after_cursor: Opaque cursor returned by the previous page.
5457
5458        Returns:
5459            Successful response
5460        """
5461        query: dict[str, object] = {}
5462        if user is not None:
5463            query["user"] = user
5464        if org is not None:
5465            query["org"] = org
5466        if q is not None:
5467            query["q"] = q
5468        if query is not None:
5469            query["query"] = query
5470        if status is not None:
5471            query["status"] = status
5472        if owner_user is not None:
5473            query["owner_user"] = owner_user
5474        if owner_agent is not None:
5475            query["owner_agent"] = owner_agent
5476        if priority is not None:
5477            query["priority"] = priority
5478        if tag is not None:
5479            query["tag"] = tag
5480        if parent is not None:
5481            query["parent"] = parent
5482        if source_scope is not None:
5483            query["source_scope"] = source_scope
5484        if source_type is not None:
5485            query["source_type"] = source_type
5486        if source_id is not None:
5487            query["source_id"] = source_id
5488        if epic is not None:
5489            query["epic"] = epic
5490        if limit is not None:
5491            query["limit"] = limit
5492        if after_cursor is not None:
5493            query["after_cursor"] = after_cursor
5494        return self._http.request(
5495            f"/api/v1/teams/{team}/tasks/search",
5496            query=query,
5497            response_type=TeamTaskSearchResponse,
5498        )
5499
5500
5501class TeamThreadResource:
5502    def __init__(self, http: SyncHttpClient):
5503        self._http = http
5504
5505    def list(self, team: str, *, tags: builtins.list[str] | None = None) -> TeamThreadListResponse:
5506        """
5507        List threads for a team
5508        Returns all threads owned by the specified team that the authenticated caller
5509        has permission to view. The caller must have access to the team; requests
5510        without team access are rejected with 404.
5511        Threads are returned in a single `data` array, ordered with the team's
5512        default thread first, then by most recent activity (newest first). Each
5513        thread carries a `last_activity` timestamp the most recent message's
5514        creation time, falling back to the thread's own creation time. Use the
5515        team-scoped thread endpoints to create, update, or delete individual
5516        threads.
5517
5518        Args:
5519            team: Team ID (`tem_...`) whose threads should be listed.
5520            tags: Optional: only return threads tagged with at least one of these tags (OR-match). Repeated query params, e.g. `?tags[]=blocked&tags[]=needs-review`.
5521
5522        Returns:
5523            Successful response
5524        """
5525        query: dict[str, object] = {}
5526        if tags is not None:
5527            query["tags"] = tags
5528        return self._http.request(
5529            f"/api/v1/teams/{team}/threads",
5530            query=query,
5531            response_type=TeamThreadListResponse,
5532        )
5533
5534    def create(self, team: str, input: TeamThreadCreateInput) -> Thread:
5535        """
5536        Create a thread for a team
5537        Creates a new thread owned by the specified team. The authenticated caller must
5538        have access to the team; requests from callers without team access are rejected
5539        with 404.
5540        If a `profile_picture` is provided in the thread params, it must be
5541        base64-encoded image data. The image is uploaded and associated with the thread
5542        before creation completes. Omit `profile_picture` to skip this step.
5543        By default the platform sends an automatic welcome message into the new thread.
5544        Pass `skip_welcome_message: true` to suppress this behavior, for example when
5545        creating threads programmatically in bulk or seeding test data.
5546
5547        Args:
5548            team: Team ID (`tem_...`) whose threads should be listed.
5549            input: Request body.
5550            input.skip_welcome_message: When `true`, suppresses the automatic welcome message that is otherwise sent into the thread on creation. Defaults to `false`.
5551            input.thread: Attributes for the new thread. See ThreadCreateParams for available fields.
5552
5553        Returns:
5554            The newly created thread.
5555        """
5556        return self._http.request(
5557            f"/api/v1/teams/{team}/threads",
5558            method="POST",
5559            body=input,
5560            response_type=Thread,
5561        )
5562
5563    def metrics(self, team: str, *, days: int | None = None) -> TeamThreadMetricsResponse:
5564        """
5565        Get threads-created count for a team
5566        Returns how many **network-public** team threads were created in the UTC-day
5567        window. Counts come from realtime SQL aggregation over append-only
5568        `network_activity_events` (`thread.created` rows co-committed with create):
5569        team- or restricted-visibility threads (plus legacy open-team rows), never
5570        private or mirror. Every Network member sees the same number. Hard-delete
5571        co-commits a separate `thread.deleted` transition event and does not remove
5572        create events (metric is "created", not "still present"). Visibility flips
5573        after insert are ignored in v1.
5574        Any authenticated team member may read this count-only Network summary.
5575        Requests from callers without team access return 404 so team existence is
5576        not disclosed.
5577
5578        Args:
5579            team: Team ID (`tem_...`) whose threads should be listed.
5580            days: UTC-day window. One of 7, 30, 90, or 365; defaults to 30.
5581
5582        Returns:
5583            Successful response
5584        """
5585        query: dict[str, object] = {}
5586        if days is not None:
5587            query["days"] = days
5588        return self._http.request(
5589            f"/api/v1/teams/{team}/threads/metrics",
5590            query=query,
5591            response_type=TeamThreadMetricsResponse,
5592        )
5593
5594
5595class TeamResource:
5596    def __init__(self, http: SyncHttpClient):
5597        self._http = http
5598        self.custom_objects = TeamCustomObjectResource(http)
5599        self.members = MemberResource(http)
5600        self.tasks = TeamTaskResource(http)
5601        self.threads = TeamThreadResource(http)
5602
5603    def list(
5604        self,
5605        *,
5606        page: int | None = None,
5607        page_size: int | None = None,
5608        search: str | None = None,
5609        metadata: dict[str, Any] | None = None,
5610        membership: str | None = None,
5611    ) -> TeamListResponse:
5612        """
5613        List teams
5614        Returns a paginated list of teams visible to the authenticated user, ordered
5615        by creation time descending. Use `membership` to narrow results to teams the
5616        caller has joined or teams they are eligible to join based on their ACL
5617        visibility.
5618        Supports full-text search across team name and description via `search`, and
5619        structured metadata filtering via `metadata`. When `app` is present, results
5620        are scoped to that app and the caller must hold the corresponding app scope.
5621
5622        Args:
5623            page: Page number to retrieve, starting at 1. Defaults to 1.
5624            page_size: Number of teams to return per page. Defaults to 25.
5625            search: Full-text search string matched against team name and description.
5626            metadata: Structured metadata filter expression. Only teams whose metadata satisfies the expression are returned.
5627            membership: Filter teams by membership status. `"joined"` returns only teams the caller is a member of. `"joinable"` returns ACL-visible teams the caller has not yet joined. Omit to return all visible teams.
5628
5629        Returns:
5630            Successful response
5631        """
5632        query: dict[str, object] = {}
5633        if page is not None:
5634            query["page"] = page
5635        if page_size is not None:
5636            query["page_size"] = page_size
5637        if search is not None:
5638            query["search"] = search
5639        if metadata is not None:
5640            query["metadata"] = metadata
5641        if membership is not None:
5642            query["membership"] = membership
5643        return self._http.request("/api/v1/teams", query=query, response_type=TeamListResponse)
5644
5645    def create(self, input: TeamCreateInput) -> Team:
5646        """
5647        Create a team
5648        Creates a new team and returns the created team object. The authenticated
5649        user becomes the team's owner.
5650        When `app` is supplied, the request is scoped to that app and the caller
5651        must hold the corresponding app scope. Omit `org` unless you want the team
5652        pinned to a specific organization. A default chat thread is provisioned for
5653        the team automatically after creation.
5654
5655        Args:
5656            input: Request body.
5657            input.acl: Access control configuration for the team. Controls who can discover and join the team.
5658            input.description: Optional human-readable description of the team's purpose.
5659            input.idempotency_key: Optional retry key. Replays in the same app, organization, and sandbox return the original team.
5660            input.metadata: Arbitrary key-value pairs you can attach to the team for your own use. Values must be strings.
5661            input.name: Display name for the team.
5662            input.org: Organization ID (`org_...`) to associate the team with. Omit to create the team without an org affiliation.
5663
5664        Returns:
5665            The newly created team.
5666        """
5667        return self._http.request("/api/v1/teams", method="POST", body=input, response_type=Team)
5668
5669    def join_by_code(self, input: TeamJoinByCodeInput) -> Team:
5670        """
5671        Join a team with an invite code
5672        Adds a principal to a team using a 12-character invite code. The invite
5673        code can be supplied as either `join_code` or `invite_code`; both are
5674        accepted for backwards compatibility.
5675        For user-authenticated requests, the currently authenticated user is added
5676        to the team. For server-to-server requests, you must supply either `agent`
5677        (to add an agent) or `user` (to add a specific user by ID). If the user
5678        is already a member of the team, the request succeeds without creating a
5679        duplicate membership.
5680        This endpoint is rate-limited to 10 requests per minute per IP address to
5681        prevent invite-code enumeration.
5682
5683        Args:
5684            input: Request body.
5685            input.agent: Agent ID (`agent_...`) to add to the team. When provided, the agent is joined instead of the authenticated user. Requires a server-to-server session.
5686            input.invite_code: 12-character invite code alias for `join_code` accepted for backwards compatibility.
5687            input.join_code: 12-character invite code that identifies the team. Mutually usable with `invite_code`.
5688            input.user: User ID (`user_...`) to add to the team. Required for server-to-server requests when `agent` is not supplied.
5689
5690        Returns:
5691            The team the principal has joined.
5692        """
5693        return self._http.request(
5694            "/api/v1/teams/join_by_code",
5695            method="POST",
5696            body=input,
5697            response_type=Team,
5698        )
5699
5700    def delete(self, team: str) -> None:
5701        """
5702        Delete a team
5703        Permanently deletes the team identified by `team`. This action is
5704        irreversible all team memberships, settings, and associated data are
5705        removed.
5706        The caller must be the team owner or an org admin. When `app` is present,
5707        the caller must also hold the corresponding app scope.
5708
5709        Args:
5710            team: Team ID (`team_...`) of the team to delete.
5711
5712        Returns:
5713            Empty response the team has been deleted.
5714        """
5715        self._http.request(f"/api/v1/teams/{team}", method="DELETE")
5716
5717    def get(self, team: str) -> Team:
5718        """
5719        Retrieve a team
5720        Returns the full team object for the given `team` ID, including its current
5721        member list and all associated threads.
5722        The authenticated user must be a member of the team or hold a role that
5723        grants visibility (org admin, app scope). When `app` is supplied, the
5724        caller must hold the corresponding app scope.
5725
5726        Args:
5727            team: Team ID (`team_...`) of the team to retrieve.
5728
5729        Returns:
5730            The requested team, including its members and threads.
5731        """
5732        return self._http.request(f"/api/v1/teams/{team}", response_type=Team)
5733
5734    def update(self, team: str, input: TeamUpdateInput) -> Team:
5735        """
5736        Update a team
5737        Updates one or more attributes of the team identified by `team`. Only the
5738        fields you provide are changed; omitted fields are left as-is.
5739        To replace the team's profile picture, supply the `profile_picture` object
5740        with base64-encoded image data. The previous picture is deleted after the
5741        new one is successfully uploaded. When `app` is present, the caller must hold
5742        the corresponding app scope. The caller must be a team owner or org admin.
5743
5744        Args:
5745            team: Team ID (`team_...`) of the team to update.
5746            input: Request body.
5747            input.acl: New access control configuration for the team. Replaces the existing ACL.
5748            input.description: New human-readable description of the team's purpose.
5749            input.metadata: Arbitrary key-value pairs to set on the team. Replaces the existing metadata map entirely.
5750            input.name: New display name for the team.
5751            input.profile_picture: New profile picture for the team. Provide this object to upload and replace the current picture.
5752
5753        Returns:
5754            The updated team with all changes applied.
5755        """
5756        return self._http.request(
5757            f"/api/v1/teams/{team}",
5758            method="PATCH",
5759            body=input,
5760            response_type=Team,
5761        )
5762
5763    def artifacts(self, team: str) -> TeamArtifactsResponse:
5764        """
5765        List a team's artifacts
5766        Returns all artifacts owned by the specified team. Artifacts represent
5767        AI-generated or user-uploaded files associated with agent sessions,
5768        threads, or sandboxes such as images, documents, and code outputs.
5769        The authenticated user must be a member of the team. Attempting to list
5770        artifacts for a team the caller does not have access to returns 404
5771        rather than 403 to avoid leaking team existence.
5772        Results are returned in a single page without cursor pagination. Each
5773        artifact in the response reflects the state of its current version,
5774        including a short-lived signed `file_url` for direct download.
5775
5776        Args:
5777            team: Team ID (`tea_...`). The authenticated user must be a member of this team.
5778
5779        Returns:
5780            Successful response
5781        """
5782        return self._http.request(
5783            f"/api/v1/teams/{team}/artifacts",
5784            response_type=TeamArtifactsResponse,
5785        )
5786
5787    def invite(self, team: str) -> TeamInvite:
5788        """
5789        Create a team invite
5790        Generates a new invite code for the specified team. The authenticated user
5791        must be a member of the team with the `owner` or `admin` role.
5792        The returned code is a short alphanumeric string that other users can
5793        present to join the team. Each call produces a new code; previously issued
5794        codes are not invalidated by this request.
5795
5796        Args:
5797            team: Team ID (`tm_...`) identifying the team for which to generate the invite code.
5798
5799        Returns:
5800            The newly created team invite containing the join code.
5801        """
5802        return self._http.request(
5803            f"/api/v1/teams/{team}/invite",
5804            method="POST",
5805            response_type=TeamInvite,
5806        )
5807
5808    def invites(self, team: str) -> TeamInvitesResponse:
5809        """
5810        Create a team invite (server-to-server)
5811        Generates a new invite code for the specified team using server-to-server
5812        authentication. Unlike the user-facing create endpoint, this variant does not
5813        require the caller to be a team member it is intended for privileged
5814        back-end services acting on behalf of your platform.
5815        The returned code is a short alphanumeric string that users can present to
5816        join the team. Each call produces a new code; previously issued codes are
5817        not invalidated by this request.
5818
5819        Args:
5820            team: Team ID (`tm_...`) identifying the team for which to generate the invite code.
5821
5822        Returns:
5823            Successful response
5824        """
5825        return self._http.request(
5826            f"/api/v1/teams/{team}/invites",
5827            method="POST",
5828            response_type=TeamInvitesResponse,
5829        )
5830
5831    def join(self, team: str, input: TeamJoinInput) -> None:
5832        """
5833        Join a team
5834        Adds a principal to a team that is visible to the authenticated user.
5835        By default, the currently authenticated user joins the team. Provide `agent`
5836        to add an agent to the team instead the caller must already be a member of
5837        the team to do so. Provide `user` (by ID) or `email` to add another user from
5838        your organization the caller must be a team owner, team admin, or org admin.
5839        Only one of `agent`, `user`, or `email` may be supplied per request.
5840        If the target principal is already a member of the team, the request succeeds
5841        without creating a duplicate membership. Server-to-server callers are not
5842        permitted to use this endpoint; use the invite-code endpoint instead.
5843
5844        Args:
5845            team: Team ID (`team_...`) to join.
5846            input: Request body.
5847            input.agent: Agent ID (`agent_...`) to add to the team. The caller must already be a member of the team.
5848            input.email: Email address of a member of the caller's organization to add to the team. Requires team-owner, team-admin, or org-admin role.
5849            input.user: User ID (`user_...`) of a member of the caller's organization to add to the team. Requires team-owner, team-admin, or org-admin role.
5850
5851        Returns:
5852            Empty response the principal is now a member of the team.
5853        """
5854        self._http.request(f"/api/v1/teams/{team}/join", method="POST", body=input)
5855
5856    def leave(self, team: str) -> None:
5857        """
5858        Leave a team
5859        Removes a principal from a team. By default, the authenticated user removes
5860        themselves from the team. Provide `agent` to remove an agent instead the
5861        caller must be a member of the team to do so.
5862        Team owners cannot leave their own team. To transfer ownership first, use
5863        the update-membership endpoint, then call this endpoint.
5864        For server-to-server requests, `user` is required to identify which user
5865        should be removed.
5866
5867        Args:
5868            team: Team ID (`team_...`) to leave.
5869
5870        Returns:
5871            Empty response the principal has been removed from the team.
5872        """
5873        self._http.request(f"/api/v1/teams/{team}/leave", method="DELETE")
5874
5875    def task_assignees(self, team: str, *, org: str | None = None) -> TeamTaskAssigneesResponse:
5876        """
5877        List task assignees for a team
5878        Returns the list of principals users and agents that can be assigned
5879        to tasks within the team. Results include both human members and AI agents
5880        and are sorted alphabetically by display name.
5881        This endpoint is only available for team-scoped contexts. Calling it with a
5882        user-scoped owner returns a 400 error. The authenticated user must be a
5883        member of the team or hold org-admin access. App-scoped developer and
5884        server-to-server callers may list assignees for teams in their app so they
5885        can select the explicit user or agent actor required by privileged task
5886        mutations.
5887
5888        Args:
5889            team: Team ID (`tem_...`).
5890            org: Explicit organization (`org_...`) for developer and server-to-server calls. Pass null for a team outside an organization.
5891
5892        Returns:
5893            Successful response
5894        """
5895        query: dict[str, object] = {}
5896        if org is not None:
5897            query["org"] = org
5898        return self._http.request(
5899            f"/api/v1/teams/{team}/task_assignees",
5900            query=query,
5901            response_type=TeamTaskAssigneesResponse,
5902        )
class TeamCustomObjectCreateInput(typing.TypedDict):
21class TeamCustomObjectCreateInput(TypedDict):
22    "Create a team custom object"
23
24    fields: dict[str, Any]
25    "Map of field values to set on the new object. Keys and value types must conform to the schema identified by `type`."
26    type: str
27    "Schema type identifier (`lookup_key`) that defines the object's fields and validation rules."

Create a team custom object

fields: dict[str, typing.Any]

Map of field values to set on the new object. Keys and value types must conform to the schema identified by type.

type: str

Schema type identifier (lookup_key) that defines the object's fields and validation rules.

class MemberCreateInput(typing.TypedDict):
30class MemberCreateInput(TypedDict, total=False):
31    "Add a member to a team"
32
33    agent: str | None
34    "Agent ID (`agt_...`) to add as a member. Provide exactly one of `user` or `agent`."
35    role: str | None
36    'Role to assign. One of `"owner"`, `"admin"`, or `"member"`. Defaults to `"member"` when omitted.'
37    user: str | None
38    "User ID (`usr_...`) to add as a member. Provide exactly one of `user` or `agent`."

Add a member to a team

agent: str | None

Agent ID (agt_...) to add as a member. Provide exactly one of user or agent.

role: str | None

Role to assign. One of "owner", "admin", or "member". Defaults to "member" when omitted.

user: str | None

User ID (usr_...) to add as a member. Provide exactly one of user or agent.

class MemberUpdateInput(typing.TypedDict):
41class MemberUpdateInput(TypedDict):
42    "Update a team member's role"
43
44    role: str
45    'New role to assign. One of `"owner"`, `"admin"`, or `"member"`.'

Update a team member's role

role: str

New role to assign. One of "owner", "admin", or "member".

class TeamTaskCreateInputTask(typing.TypedDict):
48class TeamTaskCreateInputTask(TypedDict, total=False):
49    description: str | None
50    "Optional long-form description or notes for the task. Supports plain text."
51    due_date: datetime | None
52    "Date and time by which the task should be completed (ISO 8601). Omit to create the task without a due date."
53    epic: str | None
54    "Optional free-form grouping label."
55    links: dict[str, Any] | None
56    "Arbitrary key-value map of named URLs or references associated with the task (e.g. external ticket links)."
57    metadata: dict[str, Any] | None
58    "Arbitrary key-value map for storing application-specific data alongside the task. Omit to create the task with no metadata."
59    name: Required[str]
60    "Human-readable title for the task."
61    owner_agent: str | None
62    "ID of the agent to assign as owner (`agi_...`). Mutually exclusive with `owner_user`; omit to leave the task unassigned."
63    owner_user: str | None
64    "ID of the user to assign as owner (`usr_...`). Mutually exclusive with `owner_agent`; omit to leave the task unassigned."
65    parent: str | None
66    "Create this task as a subtask of an existing top-level task (`tsk_...`). Subtasks nest exactly one level."
67    priority: int | None
68    "Priority level from `0` (highest) to `4` (lowest). Defaults to `2` (medium) when omitted."
69    source_id: str | None
70    "Source object identity (for example `ArchAstro/firstlanding`)."
71    source_scope: str | None
72    "Container of the work this task is about (for example `github.com`). Must be supplied with `source_type` and `source_id`."
73    source_type: str | None
74    "Kind of source object (for example `repository`)."
75    status: str | None
76    'Initial status for the task. One of `"open"`, `"in_progress"`, or `"done"`. Defaults to `"open"` when omitted.'
77    tags: list[str] | None
78    "Labels for grouping and filtering (max 20, each up to 40 characters). Stored canonically: lowercase, trimmed, de-duplicated."
79    thread: str | None
80    "Bind the task to a thread (`thr_...`) owned by the same team or user as the task. A bound task appears in that thread's task scope, exactly like a task filed from inside the conversation. Omit for a task not tied to a conversation."
description: str | None

Optional long-form description or notes for the task. Supports plain text.

due_date: datetime.datetime | None

Date and time by which the task should be completed (ISO 8601). Omit to create the task without a due date.

epic: str | None

Optional free-form grouping label.

metadata: dict[str, typing.Any] | None

Arbitrary key-value map for storing application-specific data alongside the task. Omit to create the task with no metadata.

name: Required[str]

Human-readable title for the task.

owner_agent: str | None

ID of the agent to assign as owner (agi_...). Mutually exclusive with owner_user; omit to leave the task unassigned.

owner_user: str | None

ID of the user to assign as owner (usr_...). Mutually exclusive with owner_agent; omit to leave the task unassigned.

parent: str | None

Create this task as a subtask of an existing top-level task (tsk_...). Subtasks nest exactly one level.

priority: int | None

Priority level from 0 (highest) to 4 (lowest). Defaults to 2 (medium) when omitted.

source_id: str | None

Source object identity (for example ArchAstro/firstlanding).

source_scope: str | None

Container of the work this task is about (for example github.com). Must be supplied with source_type and source_id.

source_type: str | None

Kind of source object (for example repository).

status: str | None

Initial status for the task. One of "open", "in_progress", or "done". Defaults to "open" when omitted.

tags: list[str] | None

Labels for grouping and filtering (max 20, each up to 40 characters). Stored canonically: lowercase, trimmed, de-duplicated.

thread: str | None

Bind the task to a thread (thr_...) owned by the same team or user as the task. A bound task appears in that thread's task scope, exactly like a task filed from inside the conversation. Omit for a task not tied to a conversation.

class TeamTaskCreateInput(typing.TypedDict):
83class TeamTaskCreateInput(TypedDict, total=False):
84    "Create a task for an owner"
85
86    agent: str | None
87    "Explicit acting agent (`agi_...`) for a developer or server-to-server call. Mutually exclusive with an acting `user`; the agent must belong to the task owner."
88    org: str | None
89    "Explicit organization (`org_...`) for developer and server-to-server calls. Pass null when the owner is not organization-scoped. The value must match the selected user or team."
90    task: Required[TeamTaskCreateInputTask]
91    "Attributes for the task to create. `name` is required; all other fields are optional."
92    user: str | None
93    "User ID (`usr_...`). On a user route this is the task owner and creator; on a team route it is the explicit acting user for a developer or server-to-server call."

Create a task for an owner

agent: str | None

Explicit acting agent (agi_...) for a developer or server-to-server call. Mutually exclusive with an acting user; the agent must belong to the task owner.

org: str | None

Explicit organization (org_...) for developer and server-to-server calls. Pass null when the owner is not organization-scoped. The value must match the selected user or team.

task: Required[TeamTaskCreateInputTask]

Attributes for the task to create. name is required; all other fields are optional.

user: str | None

User ID (usr_...). On a user route this is the task owner and creator; on a team route it is the explicit acting user for a developer or server-to-server call.

class TeamThreadCreateInputThreadMembersItem(typing.TypedDict):
 96class TeamThreadCreateInputThreadMembersItem(TypedDict):
 97    id: str
 98    "Public user (`usr_...`) or agent (`agt_...`) ID matching `type`."
 99    type: Literal["user", "agent"]
100    "Member kind. Use `user` for a user ID or `agent` for an agent ID."
id: str

Public user (usr_...) or agent (agt_...) ID matching type.

type: Literal['user', 'agent']

Member kind. Use user for a user ID or agent for an agent ID.

class TeamThreadCreateInputThreadProfilePicture(typing.TypedDict):
103class TeamThreadCreateInputThreadProfilePicture(TypedDict, total=False):
104    data: str | None
105    "Base64-encoded image bytes."
106    filename: str | None
107    "Original filename of the uploaded image, used for display and content-type inference."
108    mime_type: str | None
109    'MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`.'
data: str | None

Base64-encoded image bytes.

filename: str | None

Original filename of the uploaded image, used for display and content-type inference.

mime_type: str | None

MIME type of the image, e.g. "image/png" or "image/jpeg".

class TeamThreadCreateInputThreadSettings(typing.TypedDict):
112class TeamThreadCreateInputThreadSettings(TypedDict, total=False):
113    agent_enabled: bool | None
114    "Whether the AI agent is active for this thread. `true` enables AI responses; `false` disables them. Defaults to `true` when settings have not been explicitly configured. `null` when a client explicitly cleared the setting."
agent_enabled: bool | None

Whether the AI agent is active for this thread. true enables AI responses; false disables them. Defaults to true when settings have not been explicitly configured. null when a client explicitly cleared the setting.

class TeamThreadCreateInputThread(typing.TypedDict):
117class TeamThreadCreateInputThread(TypedDict, total=False):
118    create_legacy_agent: bool | None
119    "When `true`, provisions a legacy chat agent alongside the thread. Only needed for integrations that depend on the pre-v2 agent model."
120    description: str | None
121    "Optional longer description of the thread's purpose. `null` if not provided."
122    is_unlisted: bool | None
123    "When `true`, the thread is hidden from the default thread list and accessible only by direct link or ID."
124    key: str | None
125    "Client-assigned unique key for idempotent creation or later lookup. Must be unique within the owning organization."
126    kind: Literal["personal"] | None
127    "Optional behavioral subtype. `personal` is accepted only for a user-owned thread and limits membership to that user and agents currently owned by them. Mirror kinds remain server-derived and cannot be selected by callers."
128    members: list[TeamThreadCreateInputThreadMembersItem] | None
129    "Users and agents to add atomically when the thread is created. Each target must pass the same authorization rules as a post-creation member add. Slack mirror threads reject non-empty caller-supplied rosters because their membership is sync-owned."
130    metadata: dict[str, Any] | None
131    "Arbitrary key-value pairs stored alongside the thread. Values must be strings or numbers."
132    muted: bool | None
133    "When `true`, push and in-app notifications for this thread are suppressed for the creating user."
134    org_id: str | None
135    "ID of the organization to create the thread under. Defaults to the authenticated user's primary organization when omitted."
136    profile_picture: TeamThreadCreateInputThreadProfilePicture | None
137    "Optional profile image for the thread, provided as a base64-encoded payload."
138    settings: TeamThreadCreateInputThreadSettings | None
139    "Configuration overrides for the thread, such as AI model selection and context window settings."
140    slug: str | None
141    "Optional URL-safe identifier. Derived from the title when omitted and unique within the thread owner."
142    title: str | None
143    "Display name for the thread. `null` if omitted, which causes the thread to be untitled."
144    visibility: Literal["team", "restricted", "private"] | None
145    "Thread visibility. A team-owned thread with members must explicitly use `restricted` or `private`. User- and agent-owned threads with members default to `private` and reject every other value."
create_legacy_agent: bool | None

When true, provisions a legacy chat agent alongside the thread. Only needed for integrations that depend on the pre-v2 agent model.

description: str | None

Optional longer description of the thread's purpose. null if not provided.

is_unlisted: bool | None

When true, the thread is hidden from the default thread list and accessible only by direct link or ID.

key: str | None

Client-assigned unique key for idempotent creation or later lookup. Must be unique within the owning organization.

kind: Optional[Literal['personal']]

Optional behavioral subtype. personal is accepted only for a user-owned thread and limits membership to that user and agents currently owned by them. Mirror kinds remain server-derived and cannot be selected by callers.

Users and agents to add atomically when the thread is created. Each target must pass the same authorization rules as a post-creation member add. Slack mirror threads reject non-empty caller-supplied rosters because their membership is sync-owned.

metadata: dict[str, typing.Any] | None

Arbitrary key-value pairs stored alongside the thread. Values must be strings or numbers.

muted: bool | None

When true, push and in-app notifications for this thread are suppressed for the creating user.

org_id: str | None

ID of the organization to create the thread under. Defaults to the authenticated user's primary organization when omitted.

Optional profile image for the thread, provided as a base64-encoded payload.

Configuration overrides for the thread, such as AI model selection and context window settings.

slug: str | None

Optional URL-safe identifier. Derived from the title when omitted and unique within the thread owner.

title: str | None

Display name for the thread. null if omitted, which causes the thread to be untitled.

visibility: Optional[Literal['team', 'restricted', 'private']]

Thread visibility. A team-owned thread with members must explicitly use restricted or private. User- and agent-owned threads with members default to private and reject every other value.

class TeamThreadCreateInput(typing.TypedDict):
148class TeamThreadCreateInput(TypedDict, total=False):
149    "Create a thread for a team"
150
151    skip_welcome_message: bool | None
152    "When `true`, suppresses the automatic welcome message that is otherwise sent into the thread on creation. Defaults to `false`."
153    thread: Required[TeamThreadCreateInputThread]
154    "Attributes for the new thread. See ThreadCreateParams for available fields."

Create a thread for a team

skip_welcome_message: bool | None

When true, suppresses the automatic welcome message that is otherwise sent into the thread on creation. Defaults to false.

thread: Required[TeamThreadCreateInputThread]

Attributes for the new thread. See ThreadCreateParams for available fields.

class TeamCreateInputAclAddItem(typing.TypedDict):
157class TeamCreateInputAclAddItem(TypedDict, total=False):
158    actions: Required[list[str]]
159    'Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.'
160    principal: str | None
161    'The identifier of the principal. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`; omit entirely when `principal_type` is `"everyone"`.'
162    principal_type: Required[str]
163    'The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.'
actions: Required[list[str]]

Array of action strings the principal is permitted to perform, e.g. ["read", "write"]. Must contain at least one entry.

principal: str | None

The identifier of the principal. A string ID for "user", "team", "org", and "agent" types; one of "admin", "member", or "viewer" for "org_role"; omit entirely when principal_type is "everyone".

principal_type: Required[str]

The kind of principal receiving the grant. One of "user", "team", "org", "org_role", "agent", or "everyone".

class TeamCreateInputAclGrantsItem(typing.TypedDict):
166class TeamCreateInputAclGrantsItem(TypedDict, total=False):
167    actions: Required[list[str]]
168    'Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.'
169    principal: str | None
170    'The identifier of the principal. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`; omit entirely when `principal_type` is `"everyone"`.'
171    principal_type: Required[str]
172    'The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.'
actions: Required[list[str]]

Array of action strings the principal is permitted to perform, e.g. ["read", "write"]. Must contain at least one entry.

principal: str | None

The identifier of the principal. A string ID for "user", "team", "org", and "agent" types; one of "admin", "member", or "viewer" for "org_role"; omit entirely when principal_type is "everyone".

principal_type: Required[str]

The kind of principal receiving the grant. One of "user", "team", "org", "org_role", "agent", or "everyone".

class TeamCreateInputAclRemoveItem(typing.TypedDict):
175class TeamCreateInputAclRemoveItem(TypedDict, total=False):
176    principal: str | None
177    'The identifier of the principal to remove. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`. Omit when `principal_type` is `"everyone"`.'
178    principal_type: Required[str]
179    'The kind of principal to remove. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.'
principal: str | None

The identifier of the principal to remove. A string ID for "user", "team", "org", and "agent" types; one of "admin", "member", or "viewer" for "org_role". Omit when principal_type is "everyone".

principal_type: Required[str]

The kind of principal to remove. One of "user", "team", "org", "org_role", "agent", or "everyone".

class TeamCreateInputAcl(typing.TypedDict):
182class TeamCreateInputAcl(TypedDict, total=False):
183    add: list[TeamCreateInputAclAddItem] | None
184    "Patch mode: grants to add or merge into the existing list. Cannot be combined with `grants`."
185    grants: list[TeamCreateInputAclGrantsItem] | None
186    "Replace mode: the complete new list of grants that replaces all existing entries. Send an empty array (`[]`) to clear all grants. Cannot be combined with `add` or `remove`."
187    remove: list[TeamCreateInputAclRemoveItem] | None
188    "Patch mode: principals whose grants should be removed from the existing list. Cannot be combined with `grants`."
add: list[TeamCreateInputAclAddItem] | None

Patch mode: grants to add or merge into the existing list. Cannot be combined with grants.

grants: list[TeamCreateInputAclGrantsItem] | None

Replace mode: the complete new list of grants that replaces all existing entries. Send an empty array ([]) to clear all grants. Cannot be combined with add or remove.

remove: list[TeamCreateInputAclRemoveItem] | None

Patch mode: principals whose grants should be removed from the existing list. Cannot be combined with grants.

class TeamCreateInput(typing.TypedDict):
191class TeamCreateInput(TypedDict, total=False):
192    "Create a team"
193
194    acl: TeamCreateInputAcl | None
195    "Access control configuration for the team. Controls who can discover and join the team."
196    description: str | None
197    "Optional human-readable description of the team's purpose."
198    idempotency_key: str | None
199    "Optional retry key. Replays in the same app, organization, and sandbox return the original team."
200    metadata: dict[str, Any] | None
201    "Arbitrary key-value pairs you can attach to the team for your own use. Values must be strings."
202    name: Required[str]
203    "Display name for the team."
204    org: str | None
205    "Organization ID (`org_...`) to associate the team with. Omit to create the team without an org affiliation."

Create a team

acl: TeamCreateInputAcl | None

Access control configuration for the team. Controls who can discover and join the team.

description: str | None

Optional human-readable description of the team's purpose.

idempotency_key: str | None

Optional retry key. Replays in the same app, organization, and sandbox return the original team.

metadata: dict[str, typing.Any] | None

Arbitrary key-value pairs you can attach to the team for your own use. Values must be strings.

name: Required[str]

Display name for the team.

org: str | None

Organization ID (org_...) to associate the team with. Omit to create the team without an org affiliation.

class TeamJoinByCodeInput(typing.TypedDict):
208class TeamJoinByCodeInput(TypedDict, total=False):
209    "Join a team with an invite code"
210
211    agent: str | None
212    "Agent ID (`agent_...`) to add to the team. When provided, the agent is joined instead of the authenticated user. Requires a server-to-server session."
213    invite_code: str | None
214    "12-character invite code alias for `join_code` accepted for backwards compatibility."
215    join_code: str | None
216    "12-character invite code that identifies the team. Mutually usable with `invite_code`."
217    user: str | None
218    "User ID (`user_...`) to add to the team. Required for server-to-server requests when `agent` is not supplied."

Join a team with an invite code

agent: str | None

Agent ID (agent_...) to add to the team. When provided, the agent is joined instead of the authenticated user. Requires a server-to-server session.

invite_code: str | None

12-character invite code alias for join_code accepted for backwards compatibility.

join_code: str | None

12-character invite code that identifies the team. Mutually usable with invite_code.

user: str | None

User ID (user_...) to add to the team. Required for server-to-server requests when agent is not supplied.

class TeamUpdateInputAclAddItem(typing.TypedDict):
221class TeamUpdateInputAclAddItem(TypedDict, total=False):
222    actions: Required[list[str]]
223    'Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.'
224    principal: str | None
225    'The identifier of the principal. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`; omit entirely when `principal_type` is `"everyone"`.'
226    principal_type: Required[str]
227    'The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.'
actions: Required[list[str]]

Array of action strings the principal is permitted to perform, e.g. ["read", "write"]. Must contain at least one entry.

principal: str | None

The identifier of the principal. A string ID for "user", "team", "org", and "agent" types; one of "admin", "member", or "viewer" for "org_role"; omit entirely when principal_type is "everyone".

principal_type: Required[str]

The kind of principal receiving the grant. One of "user", "team", "org", "org_role", "agent", or "everyone".

class TeamUpdateInputAclGrantsItem(typing.TypedDict):
230class TeamUpdateInputAclGrantsItem(TypedDict, total=False):
231    actions: Required[list[str]]
232    'Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.'
233    principal: str | None
234    'The identifier of the principal. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`; omit entirely when `principal_type` is `"everyone"`.'
235    principal_type: Required[str]
236    'The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.'
actions: Required[list[str]]

Array of action strings the principal is permitted to perform, e.g. ["read", "write"]. Must contain at least one entry.

principal: str | None

The identifier of the principal. A string ID for "user", "team", "org", and "agent" types; one of "admin", "member", or "viewer" for "org_role"; omit entirely when principal_type is "everyone".

principal_type: Required[str]

The kind of principal receiving the grant. One of "user", "team", "org", "org_role", "agent", or "everyone".

class TeamUpdateInputAclRemoveItem(typing.TypedDict):
239class TeamUpdateInputAclRemoveItem(TypedDict, total=False):
240    principal: str | None
241    'The identifier of the principal to remove. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`. Omit when `principal_type` is `"everyone"`.'
242    principal_type: Required[str]
243    'The kind of principal to remove. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.'
principal: str | None

The identifier of the principal to remove. A string ID for "user", "team", "org", and "agent" types; one of "admin", "member", or "viewer" for "org_role". Omit when principal_type is "everyone".

principal_type: Required[str]

The kind of principal to remove. One of "user", "team", "org", "org_role", "agent", or "everyone".

class TeamUpdateInputAcl(typing.TypedDict):
246class TeamUpdateInputAcl(TypedDict, total=False):
247    add: list[TeamUpdateInputAclAddItem] | None
248    "Patch mode: grants to add or merge into the existing list. Cannot be combined with `grants`."
249    grants: list[TeamUpdateInputAclGrantsItem] | None
250    "Replace mode: the complete new list of grants that replaces all existing entries. Send an empty array (`[]`) to clear all grants. Cannot be combined with `add` or `remove`."
251    remove: list[TeamUpdateInputAclRemoveItem] | None
252    "Patch mode: principals whose grants should be removed from the existing list. Cannot be combined with `grants`."
add: list[TeamUpdateInputAclAddItem] | None

Patch mode: grants to add or merge into the existing list. Cannot be combined with grants.

grants: list[TeamUpdateInputAclGrantsItem] | None

Replace mode: the complete new list of grants that replaces all existing entries. Send an empty array ([]) to clear all grants. Cannot be combined with add or remove.

remove: list[TeamUpdateInputAclRemoveItem] | None

Patch mode: principals whose grants should be removed from the existing list. Cannot be combined with grants.

class TeamUpdateInputProfilePicture(typing.TypedDict):
255class TeamUpdateInputProfilePicture(TypedDict, total=False):
256    data: str | None
257    "Base64-encoded binary image data."
258    filename: str | None
259    "Original filename of the image, used for storage metadata."
260    mime_type: str | None
261    'MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`.'
data: str | None

Base64-encoded binary image data.

filename: str | None

Original filename of the image, used for storage metadata.

mime_type: str | None

MIME type of the image, e.g. "image/png" or "image/jpeg".

class TeamUpdateInput(typing.TypedDict):
264class TeamUpdateInput(TypedDict, total=False):
265    "Update a team"
266
267    acl: TeamUpdateInputAcl | None
268    "New access control configuration for the team. Replaces the existing ACL."
269    description: str | None
270    "New human-readable description of the team's purpose."
271    metadata: dict[str, Any] | None
272    "Arbitrary key-value pairs to set on the team. Replaces the existing metadata map entirely."
273    name: str | None
274    "New display name for the team."
275    profile_picture: TeamUpdateInputProfilePicture | None
276    "New profile picture for the team. Provide this object to upload and replace the current picture."

Update a team

acl: TeamUpdateInputAcl | None

New access control configuration for the team. Replaces the existing ACL.

description: str | None

New human-readable description of the team's purpose.

metadata: dict[str, typing.Any] | None

Arbitrary key-value pairs to set on the team. Replaces the existing metadata map entirely.

name: str | None

New display name for the team.

profile_picture: TeamUpdateInputProfilePicture | None

New profile picture for the team. Provide this object to upload and replace the current picture.

class TeamJoinInput(typing.TypedDict):
279class TeamJoinInput(TypedDict, total=False):
280    "Join a team"
281
282    agent: str | None
283    "Agent ID (`agent_...`) to add to the team. The caller must already be a member of the team."
284    email: str | None
285    "Email address of a member of the caller's organization to add to the team. Requires team-owner, team-admin, or org-admin role."
286    user: str | None
287    "User ID (`user_...`) of a member of the caller's organization to add to the team. Requires team-owner, team-admin, or org-admin role."

Join a team

agent: str | None

Agent ID (agent_...) to add to the team. The caller must already be a member of the team.

email: str | None

Email address of a member of the caller's organization to add to the team. Requires team-owner, team-admin, or org-admin role.

user: str | None

User ID (user_...) of a member of the caller's organization to add to the team. Requires team-owner, team-admin, or org-admin role.

class TeamCustomObjectListResponseDataItemAclAddItem(pydantic.main.BaseModel):
290class TeamCustomObjectListResponseDataItemAclAddItem(BaseModel):
291    actions: list[str] = Field(
292        ...,
293        description='Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.',
294    )
295    principal: str | None = Field(
296        default=None,
297        description='The identifier of the principal. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`; omit entirely when `principal_type` is `"everyone"`.',
298    )
299    principal_type: str = Field(
300        ...,
301        description='The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.',
302    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
actions: list[str] = PydanticUndefined

Array of action strings the principal is permitted to perform, e.g. ["read", "write"]. Must contain at least one entry.

principal: str | None = None

The identifier of the principal. A string ID for "user", "team", "org", and "agent" types; one of "admin", "member", or "viewer" for "org_role"; omit entirely when principal_type is "everyone".

principal_type: str = PydanticUndefined

The kind of principal receiving the grant. One of "user", "team", "org", "org_role", "agent", or "everyone".

class TeamCustomObjectListResponseDataItemAclGrantsItem(pydantic.main.BaseModel):
305class TeamCustomObjectListResponseDataItemAclGrantsItem(BaseModel):
306    actions: list[str] = Field(
307        ...,
308        description='Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.',
309    )
310    principal: str | None = Field(
311        default=None,
312        description='The identifier of the principal. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`; omit entirely when `principal_type` is `"everyone"`.',
313    )
314    principal_type: str = Field(
315        ...,
316        description='The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.',
317    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
actions: list[str] = PydanticUndefined

Array of action strings the principal is permitted to perform, e.g. ["read", "write"]. Must contain at least one entry.

principal: str | None = None

The identifier of the principal. A string ID for "user", "team", "org", and "agent" types; one of "admin", "member", or "viewer" for "org_role"; omit entirely when principal_type is "everyone".

principal_type: str = PydanticUndefined

The kind of principal receiving the grant. One of "user", "team", "org", "org_role", "agent", or "everyone".

class TeamCustomObjectListResponseDataItemAclRemoveItem(pydantic.main.BaseModel):
320class TeamCustomObjectListResponseDataItemAclRemoveItem(BaseModel):
321    principal: str | None = Field(
322        default=None,
323        description='The identifier of the principal to remove. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`. Omit when `principal_type` is `"everyone"`.',
324    )
325    principal_type: str = Field(
326        ...,
327        description='The kind of principal to remove. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.',
328    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
principal: str | None = None

The identifier of the principal to remove. A string ID for "user", "team", "org", and "agent" types; one of "admin", "member", or "viewer" for "org_role". Omit when principal_type is "everyone".

principal_type: str = PydanticUndefined

The kind of principal to remove. One of "user", "team", "org", "org_role", "agent", or "everyone".

class TeamCustomObjectListResponseDataItemAcl(pydantic.main.BaseModel):
331class TeamCustomObjectListResponseDataItemAcl(BaseModel):
332    add: list[TeamCustomObjectListResponseDataItemAclAddItem] | None = Field(
333        default=None,
334        description="Patch mode: grants to add or merge into the existing list. Cannot be combined with `grants`.",
335    )
336    grants: list[TeamCustomObjectListResponseDataItemAclGrantsItem] | None = Field(
337        default=None,
338        description="Replace mode: the complete new list of grants that replaces all existing entries. Send an empty array (`[]`) to clear all grants. Cannot be combined with `add` or `remove`.",
339    )
340    remove: list[TeamCustomObjectListResponseDataItemAclRemoveItem] | None = Field(
341        default=None,
342        description="Patch mode: principals whose grants should be removed from the existing list. Cannot be combined with `grants`.",
343    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.

Patch mode: grants to add or merge into the existing list. Cannot be combined with grants.

Replace mode: the complete new list of grants that replaces all existing entries. Send an empty array ([]) to clear all grants. Cannot be combined with add or remove.

Patch mode: principals whose grants should be removed from the existing list. Cannot be combined with grants.

class TeamCustomObjectListResponseDataItem(pydantic.main.BaseModel):
346class TeamCustomObjectListResponseDataItem(BaseModel):
347    acl: TeamCustomObjectListResponseDataItemAcl | None = Field(
348        default=None,
349        description="Access control list governing read and write access to this custom object. Only returned to resource owners and privileged or organization-admin viewers; `null` for everyone else.",
350    )
351    created_at: datetime | None = Field(
352        default=None, description="When the custom object was created (ISO 8601)."
353    )
354    fields: dict[str, Any] | None = Field(
355        default=None,
356        description="Map of field names to their current values as defined by the object's schema type.",
357    )
358    id: str = Field(..., description="Unique identifier for the custom object (`cobj_...`).")
359    org: str | None = Field(
360        default=None, description="ID of the organization this object belongs to (`org_...`)."
361    )
362    row_key: str | None = Field(
363        default=None,
364        description="An optional stable key used to identify this object by a caller-controlled string rather than its generated ID. `null` if not set.",
365    )
366    sandbox: str | None = Field(
367        default=None,
368        description="ID of the sandbox environment this object is scoped to (`dsb_...`). `null` for production objects.",
369    )
370    schema_type: str | None = Field(
371        default=None,
372        description="The lookup key of the schema type that defines this object's field structure. `null` if the schema type has not been set.",
373    )
374    team: str | None = Field(
375        default=None,
376        description="ID of the team that owns this object (`tem_...`). `null` if the object is not team-scoped.",
377    )
378    updated_at: datetime | None = Field(
379        default=None,
380        description="When the custom object was last modified (ISO 8601). `null` if the object has never been updated after creation.",
381    )
382    user: str | None = Field(
383        default=None,
384        description="ID of the user that owns this object (`usr_...`). `null` if the object is not user-scoped.",
385    )
386    version: int | None = Field(
387        default=None,
388        description="Optimistic concurrency version of the object. Increments with each successful update; pass this value in write operations to detect conflicting changes.",
389    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.

Access control list governing read and write access to this custom object. Only returned to resource owners and privileged or organization-admin viewers; null for everyone else.

created_at: datetime.datetime | None = None

When the custom object was created (ISO 8601).

fields: dict[str, typing.Any] | None = None

Map of field names to their current values as defined by the object's schema type.

id: str = PydanticUndefined

Unique identifier for the custom object (cobj_...).

org: str | None = None

ID of the organization this object belongs to (org_...).

row_key: str | None = None

An optional stable key used to identify this object by a caller-controlled string rather than its generated ID. null if not set.

sandbox: str | None = None

ID of the sandbox environment this object is scoped to (dsb_...). null for production objects.

schema_type: str | None = None

The lookup key of the schema type that defines this object's field structure. null if the schema type has not been set.

team: str | None = None

ID of the team that owns this object (tem_...). null if the object is not team-scoped.

updated_at: datetime.datetime | None = None

When the custom object was last modified (ISO 8601). null if the object has never been updated after creation.

user: str | None = None

ID of the user that owns this object (usr_...). null if the object is not user-scoped.

version: int | None = None

Optimistic concurrency version of the object. Increments with each successful update; pass this value in write operations to detect conflicting changes.

class TeamCustomObjectListResponse(pydantic.main.BaseModel):
392class TeamCustomObjectListResponse(BaseModel):
393    """
394    Successful response
395    """
396
397    data: list[TeamCustomObjectListResponseDataItem] = Field(
398        ..., description="Array of custom object records for the current page."
399    )
400    meta: dict[str, Any] | None = Field(
401        default=None, description="Pagination metadata for the response."
402    )

Successful response

data: list[TeamCustomObjectListResponseDataItem] = PydanticUndefined

Array of custom object records for the current page.

meta: dict[str, typing.Any] | None = None

Pagination metadata for the response.

class MemberListResponseDataItemAgentAclAddItem(pydantic.main.BaseModel):
405class MemberListResponseDataItemAgentAclAddItem(BaseModel):
406    actions: list[str] = Field(
407        ...,
408        description='Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.',
409    )
410    principal: str | None = Field(
411        default=None,
412        description='The identifier of the principal. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`; omit entirely when `principal_type` is `"everyone"`.',
413    )
414    principal_type: str = Field(
415        ...,
416        description='The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.',
417    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
actions: list[str] = PydanticUndefined

Array of action strings the principal is permitted to perform, e.g. ["read", "write"]. Must contain at least one entry.

principal: str | None = None

The identifier of the principal. A string ID for "user", "team", "org", and "agent" types; one of "admin", "member", or "viewer" for "org_role"; omit entirely when principal_type is "everyone".

principal_type: str = PydanticUndefined

The kind of principal receiving the grant. One of "user", "team", "org", "org_role", "agent", or "everyone".

class MemberListResponseDataItemAgentAclGrantsItem(pydantic.main.BaseModel):
420class MemberListResponseDataItemAgentAclGrantsItem(BaseModel):
421    actions: list[str] = Field(
422        ...,
423        description='Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.',
424    )
425    principal: str | None = Field(
426        default=None,
427        description='The identifier of the principal. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`; omit entirely when `principal_type` is `"everyone"`.',
428    )
429    principal_type: str = Field(
430        ...,
431        description='The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.',
432    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
actions: list[str] = PydanticUndefined

Array of action strings the principal is permitted to perform, e.g. ["read", "write"]. Must contain at least one entry.

principal: str | None = None

The identifier of the principal. A string ID for "user", "team", "org", and "agent" types; one of "admin", "member", or "viewer" for "org_role"; omit entirely when principal_type is "everyone".

principal_type: str = PydanticUndefined

The kind of principal receiving the grant. One of "user", "team", "org", "org_role", "agent", or "everyone".

class MemberListResponseDataItemAgentAclRemoveItem(pydantic.main.BaseModel):
435class MemberListResponseDataItemAgentAclRemoveItem(BaseModel):
436    principal: str | None = Field(
437        default=None,
438        description='The identifier of the principal to remove. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`. Omit when `principal_type` is `"everyone"`.',
439    )
440    principal_type: str = Field(
441        ...,
442        description='The kind of principal to remove. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.',
443    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
principal: str | None = None

The identifier of the principal to remove. A string ID for "user", "team", "org", and "agent" types; one of "admin", "member", or "viewer" for "org_role". Omit when principal_type is "everyone".

principal_type: str = PydanticUndefined

The kind of principal to remove. One of "user", "team", "org", "org_role", "agent", or "everyone".

class MemberListResponseDataItemAgentAcl(pydantic.main.BaseModel):
446class MemberListResponseDataItemAgentAcl(BaseModel):
447    add: list[MemberListResponseDataItemAgentAclAddItem] | None = Field(
448        default=None,
449        description="Patch mode: grants to add or merge into the existing list. Cannot be combined with `grants`.",
450    )
451    grants: list[MemberListResponseDataItemAgentAclGrantsItem] | None = Field(
452        default=None,
453        description="Replace mode: the complete new list of grants that replaces all existing entries. Send an empty array (`[]`) to clear all grants. Cannot be combined with `add` or `remove`.",
454    )
455    remove: list[MemberListResponseDataItemAgentAclRemoveItem] | None = Field(
456        default=None,
457        description="Patch mode: principals whose grants should be removed from the existing list. Cannot be combined with `grants`.",
458    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.

Patch mode: grants to add or merge into the existing list. Cannot be combined with grants.

grants: list[MemberListResponseDataItemAgentAclGrantsItem] | None = None

Replace mode: the complete new list of grants that replaces all existing entries. Send an empty array ([]) to clear all grants. Cannot be combined with add or remove.

remove: list[MemberListResponseDataItemAgentAclRemoveItem] | None = None

Patch mode: principals whose grants should be removed from the existing list. Cannot be combined with grants.

class MemberListResponseDataItemAgentSourceSolutionCurrentSolutionTemplatesItemDetailsInvokeContractParticipantsItem(pydantic.main.BaseModel):
490class MemberListResponseDataItemAgentSourceSolutionCurrentSolutionTemplatesItemDetailsInvokeContractParticipantsItem(
491    BaseModel
492):
493    description: str | None = Field(
494        default=None,
495        description="Workflow-authored explanation of the slot's role. `null` when the workflow declares none.",
496    )
497    name: str = Field(
498        ...,
499        description="The slot's name, as referenced by the workflow. Supply the chosen agent under the top-level `participants[name]` field when invoking.",
500    )
501    required: bool = Field(
502        ...,
503        description="Whether the workflow requires this slot to be filled for the run to complete its embedded stages.",
504    )
505    type: str = Field(
506        ...,
507        description='The kind of principal the slot accepts. Currently always `"agent_user"` the value supplied at invoke is an agent ID (`agi_...`).',
508    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
description: str | None = None

Workflow-authored explanation of the slot's role. null when the workflow declares none.

name: str = PydanticUndefined

The slot's name, as referenced by the workflow. Supply the chosen agent under the top-level participants[name] field when invoking.

required: bool = PydanticUndefined

Whether the workflow requires this slot to be filled for the run to complete its embedded stages.

type: str = PydanticUndefined

The kind of principal the slot accepts. Currently always "agent_user" the value supplied at invoke is an agent ID (agi_...).

class MemberListResponseDataItemAgentSourceSolutionCurrentSolutionTemplatesItemDetailsInvokeContractPrefills(pydantic.main.BaseModel):
511class MemberListResponseDataItemAgentSourceSolutionCurrentSolutionTemplatesItemDetailsInvokeContractPrefills(
512    BaseModel
513):
514    participants: dict[str, Any] | None = Field(
515        default=None,
516        description="Participant slot-to-agent mappings applied by the platform. Caller values at these slots must match exactly.",
517    )
518    payload: dict[str, Any] | None = Field(
519        default=None,
520        description="Partial invocation payload applied by the platform. A caller may omit these values, but supplying a different value at any locked path is rejected.",
521    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
participants: dict[str, typing.Any] | None = None

Participant slot-to-agent mappings applied by the platform. Caller values at these slots must match exactly.

payload: dict[str, typing.Any] | None = None

Partial invocation payload applied by the platform. A caller may omit these values, but supplying a different value at any locked path is rejected.

class MemberListResponseDataItemAgentSourceSolutionCurrentSolutionTemplatesItemDetailsInvokeContract(pydantic.main.BaseModel):
524class MemberListResponseDataItemAgentSourceSolutionCurrentSolutionTemplatesItemDetailsInvokeContract(
525    BaseModel
526):
527    input_schema: dict[str, Any] | None = Field(
528        default=None,
529        description="JSON Schema validated against the whole invoke payload, from the automation's `input_schema_config`. `null` when none is configured.",
530    )
531    participants: (
532        list[
533            MemberListResponseDataItemAgentSourceSolutionCurrentSolutionTemplatesItemDetailsInvokeContractParticipantsItem
534        ]
535        | None
536    ) = Field(
537        default=None,
538        description="Named participant slots declared by the workflow, sorted by name. `null` when the workflow declares none. Values supplied under the top-level `participants` field are agent IDs.",
539    )
540    prefills: MemberListResponseDataItemAgentSourceSolutionCurrentSolutionTemplatesItemDetailsInvokeContractPrefills = Field(
541        ...,
542        description="Owner-controlled payload and participant values the platform applies to every invocation. Supplying a conflicting value is rejected.",
543    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
input_schema: dict[str, typing.Any] | None = None

JSON Schema validated against the whole invoke payload, from the automation's input_schema_config. null when none is configured.

Named participant slots declared by the workflow, sorted by name. null when the workflow declares none. Values supplied under the top-level participants field are agent IDs.

Owner-controlled payload and participant values the platform applies to every invocation. Supplying a conflicting value is rejected.

class MemberListResponseDataItemAgentSourceSolutionCurrentSolutionTemplatesItemDetails(pydantic.main.BaseModel):
546class MemberListResponseDataItemAgentSourceSolutionCurrentSolutionTemplatesItemDetails(BaseModel):
547    automation_type: str | None = Field(
548        default=None,
549        description="Automation execution type (`invoked`, `scheduled`, or `trigger`). `null` when the template body does not declare one.",
550    )
551    invoke_contract: (
552        MemberListResponseDataItemAgentSourceSolutionCurrentSolutionTemplatesItemDetailsInvokeContract
553        | None
554    ) = Field(
555        default=None,
556        description="Schema-driven payload and participant inputs for an invoked automation. Used by installation clients to collect locked prefills before provisioning. `null` for non-invoked automation types.",
557    )
558    type: Literal["automation"] = Field(
559        default="automation",
560        description="Template-details discriminator. Always `automation` for this variant.",
561    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
automation_type: str | None = None

Automation execution type (invoked, scheduled, or trigger). null when the template body does not declare one.

Schema-driven payload and participant inputs for an invoked automation. Used by installation clients to collect locked prefills before provisioning. null for non-invoked automation types.

type: Literal['automation'] = 'automation'

Template-details discriminator. Always automation for this variant.

class MemberListResponseDataItemAgentSourceSolutionCurrentSolutionTemplatesItem(pydantic.main.BaseModel):
564class MemberListResponseDataItemAgentSourceSolutionCurrentSolutionTemplatesItem(BaseModel):
565    description: str | None = Field(
566        default=None,
567        description="Short prose blurb from the template body's `description:` field. `null` when the body doesn't set one. Used as the card subhead in the Library carousel.",
568    )
569    details: (
570        MemberListResponseDataItemAgentSourceSolutionCurrentSolutionTemplatesItemDetails | None
571    ) = Field(
572        default=None,
573        description="Template-kind-specific details selected by the `type` discriminator. `null` when this template kind has no additional details.",
574    )
575    display_name: str | None = Field(
576        default=None,
577        description="Human-facing label from the template body's `display_name:` field. `null` when the body doesn't set one. Library carousels use this for the card title, falling back to a humanized `name`.",
578    )
579    id: str | None = Field(
580        default=None,
581        description="Template config ID (`cfg_...`). `null` for inline-only templates.",
582    )
583    kind: str = Field(
584        ...,
585        description="Template config kind, or `SolutionTemplateRef` / `SolutionTemplatePath` when unresolved.",
586    )
587    lookup_key: str | None = Field(
588        default=None,
589        description="Lookup key stamped on the template config at import time. `null` when no lookup key was assigned.",
590    )
591    name: str | None = Field(
592        default=None,
593        description="Canonical name from the template body. For `AgentTemplate` this doubles as the human-facing label; for `AgentToolTemplate` it's the LLM-facing tool function identifier (snake_case); for `AgentRoutineTemplate` it's the routine identifier (kebab-case). Clients rendering carousels should prefer `display_name` and fall back to humanizing `name`.",
594    )
595    readme_url: str | None = Field(
596        default=None,
597        description="Relative path to the public README endpoint with a signed token already embedded, scoped to this template's bundled markdown asset. `null` when the Solution body's `templates[].readme_path` is unset for this entry. Token expires in 1 hour refresh via `GET /api/v1/solutions/:solution`.",
598    )
599    virtual_path: str | None = Field(
600        default=None,
601        description="Stable virtual path assigned to the template config. `null` when no virtual path was set.",
602    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
description: str | None = None

Short prose blurb from the template body's description: field. null when the body doesn't set one. Used as the card subhead in the Library carousel.

Template-kind-specific details selected by the type discriminator. null when this template kind has no additional details.

display_name: str | None = None

Human-facing label from the template body's display_name: field. null when the body doesn't set one. Library carousels use this for the card title, falling back to a humanized name.

id: str | None = None

Template config ID (cfg_...). null for inline-only templates.

kind: str = PydanticUndefined

Template config kind, or SolutionTemplateRef / SolutionTemplatePath when unresolved.

lookup_key: str | None = None

Lookup key stamped on the template config at import time. null when no lookup key was assigned.

name: str | None = None

Canonical name from the template body. For AgentTemplate this doubles as the human-facing label; for AgentToolTemplate it's the LLM-facing tool function identifier (snake_case); for AgentRoutineTemplate it's the routine identifier (kebab-case). Clients rendering carousels should prefer display_name and fall back to humanizing name.

readme_url: str | None = None

Relative path to the public README endpoint with a signed token already embedded, scoped to this template's bundled markdown asset. null when the Solution body's templates[].readme_path is unset for this entry. Token expires in 1 hour refresh via GET /api/v1/solutions/:solution.

virtual_path: str | None = None

Stable virtual path assigned to the template config. null when no virtual path was set.

class MemberListResponseDataItemAgentSourceSolutionCurrentSolution(pydantic.main.BaseModel):
605class MemberListResponseDataItemAgentSourceSolutionCurrentSolution(BaseModel):
606    category_keys: list[str] | None = Field(
607        default=None,
608        description="Category tag keys declared in the Solution body, used to group Solutions in the catalog. An empty array when the body declares none.",
609    )
610    created_at: str | None = Field(
611        default=None, description="When the Solution config was first imported (ISO 8601)."
612    )
613    description: str | None = Field(
614        default=None,
615        description="Short tagline or summary declared in the Solution body, used as the card subhead in catalog UIs. `null` when the Solution body does not set one.",
616    )
617    events: dict[str, Any] | None = Field(
618        default=None,
619        description="Custom analytics events declared in the Solution body's `events:` manifest a map of event key (snake_case) to its definition (`label`, optional `description`, optional typed `fields`). Dashboards use the `label` as the event's display name. Present as an empty object when the body declares none.",
620    )
621    id: str = Field(..., description="Solution config ID (`cfg_...`).")
622    image_url: str | None = Field(
623        default=None,
624        description="Absolute URL of the Solution's cover image the bundled asset the body's `image:` field names. A stable, non-expiring capability URL (like `org_logo.url`), safe to hold in caches and OpenGraph tags; it 404s if the Solution stops declaring a cover. `null` when the Solution has no cover image, and always `null` for org-scoped rows the permanent URL is minted for system-scope (catalog) Solutions only.",
625    )
626    kind: str = Field(..., description='Resource type. Always `"Solution"`.')
627    latest_solution: str | None = Field(
628        default=None,
629        description="When `upgrade_available` is `true`, the system-scope Solution config ID (`cfg_...`) that should be used as the upgrade source. `null` otherwise.",
630    )
631    latest_version: str | None = Field(
632        default=None,
633        description="When `upgrade_available` is `true`, the higher system-scope `solution_version` available to upgrade to. `null` otherwise.",
634    )
635    lookup_key: str | None = Field(
636        default=None,
637        description="The lookup key stored on the Solution config, if one was assigned during import. `null` when no lookup key was set.",
638    )
639    metadata: dict[str, Any] | None = Field(
640        default=None,
641        description="Arbitrary key-value metadata declared in the Solution body (e.g. category or display hints). Present as an empty object when the body declares none.",
642    )
643    name: str | None = Field(
644        default=None,
645        description="Human-facing display name declared in the Solution body. `null` when the Solution body does not set one.",
646    )
647    org: str | None = Field(
648        default=None,
649        description="Organization ID (`org_...`) that owns this Solution config, when the Solution is scoped to a specific org. `null` for system-scope (app-level) Solutions.",
650    )
651    org_logo: MemberListResponseDataItemAgentSourceSolutionCurrentSolutionOrgLogo | None = Field(
652        default=None,
653        description="Canonical image-source object for the resolved `org`'s logo, used as the principal category section glyph. The `url` is a stable, non-expiring capability URL (`refresh_url` is `null` there is nothing to refresh). `null` when `org_slug` is `null` or the org has no logo.",
654    )
655    org_name: str | None = Field(
656        default=None,
657        description="Display name of the resolved `org`. Pairs with `org_slug` as the principal catalog category's label. `null` when `org_slug` is `null`.",
658    )
659    org_slug: str | None = Field(
660        default=None,
661        description="Resolved slug of the Solution body's `org` (the publishing organization), when set and it resolves to a real org visible to the viewer. When present this is the Solution's principal catalog category key clients group the Solution under this org ahead of `category_keys`. `null` when the body has no `org` or it doesn't resolve.",
662    )
663    owners: list[str] = Field(
664        ...,
665        description='Owner scopes this Solution appears under. Members: `"system"` (app-level system scope) and/or `"org"` (viewer\'s org scope).',
666    )
667    readme_url: str | None = Field(
668        default=None,
669        description="Relative path to the public README endpoint with a signed token already embedded. `null` when the Solution has no README. Token expires in 1 hour refresh via `GET /api/v1/solutions/:solution`.",
670    )
671    screenshot_urls: list[str] | None = Field(
672        default=None,
673        description="Absolute URLs of the Solution's gallery screenshots the bundled assets the body's `screenshots:` field names, in declared order. Each is a stable, non-expiring capability URL with the same cacheability contract as `image_url` (one shared token, a `v` cache key, and a `file` param selecting the screenshot); a URL 404s if the Solution stops declaring its screenshot. An empty array when the Solution declares none, and always empty for org-scoped rows the permanent URLs are minted for system-scope (catalog) Solutions only.",
674    )
675    solution_id: str | None = Field(
676        default=None,
677        description="Stable UUID declared in the Solution body, used to identify the same logical Solution across multiple installed copies and owner scopes. `null` when the body omits it.",
678    )
679    solution_version: str | None = Field(
680        default=None,
681        description='Semver string declared in the Solution body (e.g. `"1.2.0"`). `null` when the body does not declare a version.',
682    )
683    tag_keys: list[str] | None = Field(
684        default=None,
685        description="Freeform tag keys declared in the Solution body. An empty array when the body declares none.",
686    )
687    template_kind: str | None = Field(
688        default=None,
689        description='Wrapped template kind `"AgentTemplate"`, `"AutomationTemplate"`, `"AgentRoutineTemplate"`, `"AgentToolTemplate"`, `"AgentComputerTemplate"`, or `"SolutionTemplateRef"` for ref-mode bundles.',
690    )
691    templates: list[MemberListResponseDataItemAgentSourceSolutionCurrentSolutionTemplatesItem] = (
692        Field(
693            ...,
694            description="Template configs bundled by this Solution, in declaration order the first entry is the deployable template the Solution wraps; the rest are sibling templates the wrapped template references.",
695        )
696    )
697    updated_at: str | None = Field(
698        default=None, description="When the Solution config was last modified (ISO 8601)."
699    )
700    upgrade_available: bool = Field(
701        ...,
702        description="`true` when this Solution is installed at the viewer's org scope and the app-level system scope carries a higher `solution_version`. Always `false` for system-only rows.",
703    )
704    virtual_path: str | None = Field(
705        default=None,
706        description="The stable virtual path assigned to this Solution config, used as the deduplication key when the same Solution appears under multiple owner scopes. `null` when unset.",
707    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
category_keys: list[str] | None = None

Category tag keys declared in the Solution body, used to group Solutions in the catalog. An empty array when the body declares none.

created_at: str | None = None

When the Solution config was first imported (ISO 8601).

description: str | None = None

Short tagline or summary declared in the Solution body, used as the card subhead in catalog UIs. null when the Solution body does not set one.

events: dict[str, typing.Any] | None = None

Custom analytics events declared in the Solution body's events: manifest a map of event key (snake_case) to its definition (label, optional description, optional typed fields). Dashboards use the label as the event's display name. Present as an empty object when the body declares none.

id: str = PydanticUndefined

Solution config ID (cfg_...).

image_url: str | None = None

Absolute URL of the Solution's cover image the bundled asset the body's image: field names. A stable, non-expiring capability URL (like org_logo.url), safe to hold in caches and OpenGraph tags; it 404s if the Solution stops declaring a cover. null when the Solution has no cover image, and always null for org-scoped rows the permanent URL is minted for system-scope (catalog) Solutions only.

kind: str = PydanticUndefined

Resource type. Always "Solution".

latest_solution: str | None = None

When upgrade_available is true, the system-scope Solution config ID (cfg_...) that should be used as the upgrade source. null otherwise.

latest_version: str | None = None

When upgrade_available is true, the higher system-scope solution_version available to upgrade to. null otherwise.

lookup_key: str | None = None

The lookup key stored on the Solution config, if one was assigned during import. null when no lookup key was set.

metadata: dict[str, typing.Any] | None = None

Arbitrary key-value metadata declared in the Solution body (e.g. category or display hints). Present as an empty object when the body declares none.

name: str | None = None

Human-facing display name declared in the Solution body. null when the Solution body does not set one.

org: str | None = None

Organization ID (org_...) that owns this Solution config, when the Solution is scoped to a specific org. null for system-scope (app-level) Solutions.

org_name: str | None = None

Display name of the resolved org. Pairs with org_slug as the principal catalog category's label. null when org_slug is null.

org_slug: str | None = None

Resolved slug of the Solution body's org (the publishing organization), when set and it resolves to a real org visible to the viewer. When present this is the Solution's principal catalog category key clients group the Solution under this org ahead of category_keys. null when the body has no org or it doesn't resolve.

owners: list[str] = PydanticUndefined

Owner scopes this Solution appears under. Members: "system" (app-level system scope) and/or "org" (viewer's org scope).

readme_url: str | None = None

Relative path to the public README endpoint with a signed token already embedded. null when the Solution has no README. Token expires in 1 hour refresh via GET /api/v1/solutions/:solution.

screenshot_urls: list[str] | None = None

Absolute URLs of the Solution's gallery screenshots the bundled assets the body's screenshots: field names, in declared order. Each is a stable, non-expiring capability URL with the same cacheability contract as image_url (one shared token, a v cache key, and a file param selecting the screenshot); a URL 404s if the Solution stops declaring its screenshot. An empty array when the Solution declares none, and always empty for org-scoped rows the permanent URLs are minted for system-scope (catalog) Solutions only.

solution_id: str | None = None

Stable UUID declared in the Solution body, used to identify the same logical Solution across multiple installed copies and owner scopes. null when the body omits it.

solution_version: str | None = None

Semver string declared in the Solution body (e.g. "1.2.0"). null when the body does not declare a version.

tag_keys: list[str] | None = None

Freeform tag keys declared in the Solution body. An empty array when the body declares none.

template_kind: str | None = None

Wrapped template kind "AgentTemplate", "AutomationTemplate", "AgentRoutineTemplate", "AgentToolTemplate", "AgentComputerTemplate", or "SolutionTemplateRef" for ref-mode bundles.

Template configs bundled by this Solution, in declaration order the first entry is the deployable template the Solution wraps; the rest are sibling templates the wrapped template references.

updated_at: str | None = None

When the Solution config was last modified (ISO 8601).

upgrade_available: bool = PydanticUndefined

true when this Solution is installed at the viewer's org scope and the app-level system scope carries a higher solution_version. Always false for system-only rows.

virtual_path: str | None = None

The stable virtual path assigned to this Solution config, used as the deduplication key when the same Solution appears under multiple owner scopes. null when unset.

class MemberListResponseDataItemAgentSourceSolutionSolutionTemplatesItemDetailsInvokeContractParticipantsItem(pydantic.main.BaseModel):
739class MemberListResponseDataItemAgentSourceSolutionSolutionTemplatesItemDetailsInvokeContractParticipantsItem(
740    BaseModel
741):
742    description: str | None = Field(
743        default=None,
744        description="Workflow-authored explanation of the slot's role. `null` when the workflow declares none.",
745    )
746    name: str = Field(
747        ...,
748        description="The slot's name, as referenced by the workflow. Supply the chosen agent under the top-level `participants[name]` field when invoking.",
749    )
750    required: bool = Field(
751        ...,
752        description="Whether the workflow requires this slot to be filled for the run to complete its embedded stages.",
753    )
754    type: str = Field(
755        ...,
756        description='The kind of principal the slot accepts. Currently always `"agent_user"` the value supplied at invoke is an agent ID (`agi_...`).',
757    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
description: str | None = None

Workflow-authored explanation of the slot's role. null when the workflow declares none.

name: str = PydanticUndefined

The slot's name, as referenced by the workflow. Supply the chosen agent under the top-level participants[name] field when invoking.

required: bool = PydanticUndefined

Whether the workflow requires this slot to be filled for the run to complete its embedded stages.

type: str = PydanticUndefined

The kind of principal the slot accepts. Currently always "agent_user" the value supplied at invoke is an agent ID (agi_...).

class MemberListResponseDataItemAgentSourceSolutionSolutionTemplatesItemDetailsInvokeContractPrefills(pydantic.main.BaseModel):
760class MemberListResponseDataItemAgentSourceSolutionSolutionTemplatesItemDetailsInvokeContractPrefills(
761    BaseModel
762):
763    participants: dict[str, Any] | None = Field(
764        default=None,
765        description="Participant slot-to-agent mappings applied by the platform. Caller values at these slots must match exactly.",
766    )
767    payload: dict[str, Any] | None = Field(
768        default=None,
769        description="Partial invocation payload applied by the platform. A caller may omit these values, but supplying a different value at any locked path is rejected.",
770    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
participants: dict[str, typing.Any] | None = None

Participant slot-to-agent mappings applied by the platform. Caller values at these slots must match exactly.

payload: dict[str, typing.Any] | None = None

Partial invocation payload applied by the platform. A caller may omit these values, but supplying a different value at any locked path is rejected.

class MemberListResponseDataItemAgentSourceSolutionSolutionTemplatesItemDetailsInvokeContract(pydantic.main.BaseModel):
773class MemberListResponseDataItemAgentSourceSolutionSolutionTemplatesItemDetailsInvokeContract(
774    BaseModel
775):
776    input_schema: dict[str, Any] | None = Field(
777        default=None,
778        description="JSON Schema validated against the whole invoke payload, from the automation's `input_schema_config`. `null` when none is configured.",
779    )
780    participants: (
781        list[
782            MemberListResponseDataItemAgentSourceSolutionSolutionTemplatesItemDetailsInvokeContractParticipantsItem
783        ]
784        | None
785    ) = Field(
786        default=None,
787        description="Named participant slots declared by the workflow, sorted by name. `null` when the workflow declares none. Values supplied under the top-level `participants` field are agent IDs.",
788    )
789    prefills: MemberListResponseDataItemAgentSourceSolutionSolutionTemplatesItemDetailsInvokeContractPrefills = Field(
790        ...,
791        description="Owner-controlled payload and participant values the platform applies to every invocation. Supplying a conflicting value is rejected.",
792    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
input_schema: dict[str, typing.Any] | None = None

JSON Schema validated against the whole invoke payload, from the automation's input_schema_config. null when none is configured.

Named participant slots declared by the workflow, sorted by name. null when the workflow declares none. Values supplied under the top-level participants field are agent IDs.

Owner-controlled payload and participant values the platform applies to every invocation. Supplying a conflicting value is rejected.

class MemberListResponseDataItemAgentSourceSolutionSolutionTemplatesItemDetails(pydantic.main.BaseModel):
795class MemberListResponseDataItemAgentSourceSolutionSolutionTemplatesItemDetails(BaseModel):
796    automation_type: str | None = Field(
797        default=None,
798        description="Automation execution type (`invoked`, `scheduled`, or `trigger`). `null` when the template body does not declare one.",
799    )
800    invoke_contract: (
801        MemberListResponseDataItemAgentSourceSolutionSolutionTemplatesItemDetailsInvokeContract
802        | None
803    ) = Field(
804        default=None,
805        description="Schema-driven payload and participant inputs for an invoked automation. Used by installation clients to collect locked prefills before provisioning. `null` for non-invoked automation types.",
806    )
807    type: Literal["automation"] = Field(
808        default="automation",
809        description="Template-details discriminator. Always `automation` for this variant.",
810    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
automation_type: str | None = None

Automation execution type (invoked, scheduled, or trigger). null when the template body does not declare one.

Schema-driven payload and participant inputs for an invoked automation. Used by installation clients to collect locked prefills before provisioning. null for non-invoked automation types.

type: Literal['automation'] = 'automation'

Template-details discriminator. Always automation for this variant.

class MemberListResponseDataItemAgentSourceSolutionSolutionTemplatesItem(pydantic.main.BaseModel):
813class MemberListResponseDataItemAgentSourceSolutionSolutionTemplatesItem(BaseModel):
814    description: str | None = Field(
815        default=None,
816        description="Short prose blurb from the template body's `description:` field. `null` when the body doesn't set one. Used as the card subhead in the Library carousel.",
817    )
818    details: MemberListResponseDataItemAgentSourceSolutionSolutionTemplatesItemDetails | None = (
819        Field(
820            default=None,
821            description="Template-kind-specific details selected by the `type` discriminator. `null` when this template kind has no additional details.",
822        )
823    )
824    display_name: str | None = Field(
825        default=None,
826        description="Human-facing label from the template body's `display_name:` field. `null` when the body doesn't set one. Library carousels use this for the card title, falling back to a humanized `name`.",
827    )
828    id: str | None = Field(
829        default=None,
830        description="Template config ID (`cfg_...`). `null` for inline-only templates.",
831    )
832    kind: str = Field(
833        ...,
834        description="Template config kind, or `SolutionTemplateRef` / `SolutionTemplatePath` when unresolved.",
835    )
836    lookup_key: str | None = Field(
837        default=None,
838        description="Lookup key stamped on the template config at import time. `null` when no lookup key was assigned.",
839    )
840    name: str | None = Field(
841        default=None,
842        description="Canonical name from the template body. For `AgentTemplate` this doubles as the human-facing label; for `AgentToolTemplate` it's the LLM-facing tool function identifier (snake_case); for `AgentRoutineTemplate` it's the routine identifier (kebab-case). Clients rendering carousels should prefer `display_name` and fall back to humanizing `name`.",
843    )
844    readme_url: str | None = Field(
845        default=None,
846        description="Relative path to the public README endpoint with a signed token already embedded, scoped to this template's bundled markdown asset. `null` when the Solution body's `templates[].readme_path` is unset for this entry. Token expires in 1 hour refresh via `GET /api/v1/solutions/:solution`.",
847    )
848    virtual_path: str | None = Field(
849        default=None,
850        description="Stable virtual path assigned to the template config. `null` when no virtual path was set.",
851    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
description: str | None = None

Short prose blurb from the template body's description: field. null when the body doesn't set one. Used as the card subhead in the Library carousel.

Template-kind-specific details selected by the type discriminator. null when this template kind has no additional details.

display_name: str | None = None

Human-facing label from the template body's display_name: field. null when the body doesn't set one. Library carousels use this for the card title, falling back to a humanized name.

id: str | None = None

Template config ID (cfg_...). null for inline-only templates.

kind: str = PydanticUndefined

Template config kind, or SolutionTemplateRef / SolutionTemplatePath when unresolved.

lookup_key: str | None = None

Lookup key stamped on the template config at import time. null when no lookup key was assigned.

name: str | None = None

Canonical name from the template body. For AgentTemplate this doubles as the human-facing label; for AgentToolTemplate it's the LLM-facing tool function identifier (snake_case); for AgentRoutineTemplate it's the routine identifier (kebab-case). Clients rendering carousels should prefer display_name and fall back to humanizing name.

readme_url: str | None = None

Relative path to the public README endpoint with a signed token already embedded, scoped to this template's bundled markdown asset. null when the Solution body's templates[].readme_path is unset for this entry. Token expires in 1 hour refresh via GET /api/v1/solutions/:solution.

virtual_path: str | None = None

Stable virtual path assigned to the template config. null when no virtual path was set.

class MemberListResponseDataItemAgentSourceSolutionSolution(pydantic.main.BaseModel):
854class MemberListResponseDataItemAgentSourceSolutionSolution(BaseModel):
855    category_keys: list[str] | None = Field(
856        default=None,
857        description="Category tag keys declared in the Solution body, used to group Solutions in the catalog. An empty array when the body declares none.",
858    )
859    created_at: str | None = Field(
860        default=None, description="When the Solution config was first imported (ISO 8601)."
861    )
862    description: str | None = Field(
863        default=None,
864        description="Short tagline or summary declared in the Solution body, used as the card subhead in catalog UIs. `null` when the Solution body does not set one.",
865    )
866    events: dict[str, Any] | None = Field(
867        default=None,
868        description="Custom analytics events declared in the Solution body's `events:` manifest a map of event key (snake_case) to its definition (`label`, optional `description`, optional typed `fields`). Dashboards use the `label` as the event's display name. Present as an empty object when the body declares none.",
869    )
870    id: str = Field(..., description="Solution config ID (`cfg_...`).")
871    image_url: str | None = Field(
872        default=None,
873        description="Absolute URL of the Solution's cover image the bundled asset the body's `image:` field names. A stable, non-expiring capability URL (like `org_logo.url`), safe to hold in caches and OpenGraph tags; it 404s if the Solution stops declaring a cover. `null` when the Solution has no cover image, and always `null` for org-scoped rows the permanent URL is minted for system-scope (catalog) Solutions only.",
874    )
875    kind: str = Field(..., description='Resource type. Always `"Solution"`.')
876    latest_solution: str | None = Field(
877        default=None,
878        description="When `upgrade_available` is `true`, the system-scope Solution config ID (`cfg_...`) that should be used as the upgrade source. `null` otherwise.",
879    )
880    latest_version: str | None = Field(
881        default=None,
882        description="When `upgrade_available` is `true`, the higher system-scope `solution_version` available to upgrade to. `null` otherwise.",
883    )
884    lookup_key: str | None = Field(
885        default=None,
886        description="The lookup key stored on the Solution config, if one was assigned during import. `null` when no lookup key was set.",
887    )
888    metadata: dict[str, Any] | None = Field(
889        default=None,
890        description="Arbitrary key-value metadata declared in the Solution body (e.g. category or display hints). Present as an empty object when the body declares none.",
891    )
892    name: str | None = Field(
893        default=None,
894        description="Human-facing display name declared in the Solution body. `null` when the Solution body does not set one.",
895    )
896    org: str | None = Field(
897        default=None,
898        description="Organization ID (`org_...`) that owns this Solution config, when the Solution is scoped to a specific org. `null` for system-scope (app-level) Solutions.",
899    )
900    org_logo: MemberListResponseDataItemAgentSourceSolutionSolutionOrgLogo | None = Field(
901        default=None,
902        description="Canonical image-source object for the resolved `org`'s logo, used as the principal category section glyph. The `url` is a stable, non-expiring capability URL (`refresh_url` is `null` there is nothing to refresh). `null` when `org_slug` is `null` or the org has no logo.",
903    )
904    org_name: str | None = Field(
905        default=None,
906        description="Display name of the resolved `org`. Pairs with `org_slug` as the principal catalog category's label. `null` when `org_slug` is `null`.",
907    )
908    org_slug: str | None = Field(
909        default=None,
910        description="Resolved slug of the Solution body's `org` (the publishing organization), when set and it resolves to a real org visible to the viewer. When present this is the Solution's principal catalog category key clients group the Solution under this org ahead of `category_keys`. `null` when the body has no `org` or it doesn't resolve.",
911    )
912    owners: list[str] = Field(
913        ...,
914        description='Owner scopes this Solution appears under. Members: `"system"` (app-level system scope) and/or `"org"` (viewer\'s org scope).',
915    )
916    readme_url: str | None = Field(
917        default=None,
918        description="Relative path to the public README endpoint with a signed token already embedded. `null` when the Solution has no README. Token expires in 1 hour refresh via `GET /api/v1/solutions/:solution`.",
919    )
920    screenshot_urls: list[str] | None = Field(
921        default=None,
922        description="Absolute URLs of the Solution's gallery screenshots the bundled assets the body's `screenshots:` field names, in declared order. Each is a stable, non-expiring capability URL with the same cacheability contract as `image_url` (one shared token, a `v` cache key, and a `file` param selecting the screenshot); a URL 404s if the Solution stops declaring its screenshot. An empty array when the Solution declares none, and always empty for org-scoped rows the permanent URLs are minted for system-scope (catalog) Solutions only.",
923    )
924    solution_id: str | None = Field(
925        default=None,
926        description="Stable UUID declared in the Solution body, used to identify the same logical Solution across multiple installed copies and owner scopes. `null` when the body omits it.",
927    )
928    solution_version: str | None = Field(
929        default=None,
930        description='Semver string declared in the Solution body (e.g. `"1.2.0"`). `null` when the body does not declare a version.',
931    )
932    tag_keys: list[str] | None = Field(
933        default=None,
934        description="Freeform tag keys declared in the Solution body. An empty array when the body declares none.",
935    )
936    template_kind: str | None = Field(
937        default=None,
938        description='Wrapped template kind `"AgentTemplate"`, `"AutomationTemplate"`, `"AgentRoutineTemplate"`, `"AgentToolTemplate"`, `"AgentComputerTemplate"`, or `"SolutionTemplateRef"` for ref-mode bundles.',
939    )
940    templates: list[MemberListResponseDataItemAgentSourceSolutionSolutionTemplatesItem] = Field(
941        ...,
942        description="Template configs bundled by this Solution, in declaration order the first entry is the deployable template the Solution wraps; the rest are sibling templates the wrapped template references.",
943    )
944    updated_at: str | None = Field(
945        default=None, description="When the Solution config was last modified (ISO 8601)."
946    )
947    upgrade_available: bool = Field(
948        ...,
949        description="`true` when this Solution is installed at the viewer's org scope and the app-level system scope carries a higher `solution_version`. Always `false` for system-only rows.",
950    )
951    virtual_path: str | None = Field(
952        default=None,
953        description="The stable virtual path assigned to this Solution config, used as the deduplication key when the same Solution appears under multiple owner scopes. `null` when unset.",
954    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
category_keys: list[str] | None = None

Category tag keys declared in the Solution body, used to group Solutions in the catalog. An empty array when the body declares none.

created_at: str | None = None

When the Solution config was first imported (ISO 8601).

description: str | None = None

Short tagline or summary declared in the Solution body, used as the card subhead in catalog UIs. null when the Solution body does not set one.

events: dict[str, typing.Any] | None = None

Custom analytics events declared in the Solution body's events: manifest a map of event key (snake_case) to its definition (label, optional description, optional typed fields). Dashboards use the label as the event's display name. Present as an empty object when the body declares none.

id: str = PydanticUndefined

Solution config ID (cfg_...).

image_url: str | None = None

Absolute URL of the Solution's cover image the bundled asset the body's image: field names. A stable, non-expiring capability URL (like org_logo.url), safe to hold in caches and OpenGraph tags; it 404s if the Solution stops declaring a cover. null when the Solution has no cover image, and always null for org-scoped rows the permanent URL is minted for system-scope (catalog) Solutions only.

kind: str = PydanticUndefined

Resource type. Always "Solution".

latest_solution: str | None = None

When upgrade_available is true, the system-scope Solution config ID (cfg_...) that should be used as the upgrade source. null otherwise.

latest_version: str | None = None

When upgrade_available is true, the higher system-scope solution_version available to upgrade to. null otherwise.

lookup_key: str | None = None

The lookup key stored on the Solution config, if one was assigned during import. null when no lookup key was set.

metadata: dict[str, typing.Any] | None = None

Arbitrary key-value metadata declared in the Solution body (e.g. category or display hints). Present as an empty object when the body declares none.

name: str | None = None

Human-facing display name declared in the Solution body. null when the Solution body does not set one.

org: str | None = None

Organization ID (org_...) that owns this Solution config, when the Solution is scoped to a specific org. null for system-scope (app-level) Solutions.

org_name: str | None = None

Display name of the resolved org. Pairs with org_slug as the principal catalog category's label. null when org_slug is null.

org_slug: str | None = None

Resolved slug of the Solution body's org (the publishing organization), when set and it resolves to a real org visible to the viewer. When present this is the Solution's principal catalog category key clients group the Solution under this org ahead of category_keys. null when the body has no org or it doesn't resolve.

owners: list[str] = PydanticUndefined

Owner scopes this Solution appears under. Members: "system" (app-level system scope) and/or "org" (viewer's org scope).

readme_url: str | None = None

Relative path to the public README endpoint with a signed token already embedded. null when the Solution has no README. Token expires in 1 hour refresh via GET /api/v1/solutions/:solution.

screenshot_urls: list[str] | None = None

Absolute URLs of the Solution's gallery screenshots the bundled assets the body's screenshots: field names, in declared order. Each is a stable, non-expiring capability URL with the same cacheability contract as image_url (one shared token, a v cache key, and a file param selecting the screenshot); a URL 404s if the Solution stops declaring its screenshot. An empty array when the Solution declares none, and always empty for org-scoped rows the permanent URLs are minted for system-scope (catalog) Solutions only.

solution_id: str | None = None

Stable UUID declared in the Solution body, used to identify the same logical Solution across multiple installed copies and owner scopes. null when the body omits it.

solution_version: str | None = None

Semver string declared in the Solution body (e.g. "1.2.0"). null when the body does not declare a version.

tag_keys: list[str] | None = None

Freeform tag keys declared in the Solution body. An empty array when the body declares none.

template_kind: str | None = None

Wrapped template kind "AgentTemplate", "AutomationTemplate", "AgentRoutineTemplate", "AgentToolTemplate", "AgentComputerTemplate", or "SolutionTemplateRef" for ref-mode bundles.

Template configs bundled by this Solution, in declaration order the first entry is the deployable template the Solution wraps; the rest are sibling templates the wrapped template references.

updated_at: str | None = None

When the Solution config was last modified (ISO 8601).

upgrade_available: bool = PydanticUndefined

true when this Solution is installed at the viewer's org scope and the app-level system scope carries a higher solution_version. Always false for system-only rows.

virtual_path: str | None = None

The stable virtual path assigned to this Solution config, used as the deduplication key when the same Solution appears under multiple owner scopes. null when unset.

class MemberListResponseDataItemAgentSourceSolutionTemplate(pydantic.main.BaseModel):
957class MemberListResponseDataItemAgentSourceSolutionTemplate(BaseModel):
958    created_at: datetime | None = Field(
959        default=None, description="When this template config was created (ISO 8601)."
960    )
961    description: str | None = Field(
962        default=None,
963        description="Description of the template from the config body. `null` if the current version has no `description` field.",
964    )
965    display_name: str | None = Field(
966        default=None,
967        description="Human-readable display name from the config body. `null` if the current version has no `display_name` field.",
968    )
969    id: str = Field(..., description="Template config ID (`cfg_...`).")
970    kind: str = Field(
971        ..., description='Config kind identifier for this template (e.g. `"agent_tool_template"`).'
972    )
973    lookup_key: str | None = Field(
974        default=None,
975        description="Stable lookup key assigned to this template config. `null` if no lookup key is set.",
976    )
977    name: str | None = Field(
978        default=None,
979        description="Template name as stored in the config body. `null` if the current version has no `name` field.",
980    )
981    updated_at: datetime | None = Field(
982        default=None, description="When this template config was last modified (ISO 8601)."
983    )
984    virtual_path: str | None = Field(
985        default=None,
986        description="Virtual filesystem path for this template config. `null` if not set.",
987    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
created_at: datetime.datetime | None = None

When this template config was created (ISO 8601).

description: str | None = None

Description of the template from the config body. null if the current version has no description field.

display_name: str | None = None

Human-readable display name from the config body. null if the current version has no display_name field.

id: str = PydanticUndefined

Template config ID (cfg_...).

kind: str = PydanticUndefined

Config kind identifier for this template (e.g. "agent_tool_template").

lookup_key: str | None = None

Stable lookup key assigned to this template config. null if no lookup key is set.

name: str | None = None

Template name as stored in the config body. null if the current version has no name field.

updated_at: datetime.datetime | None = None

When this template config was last modified (ISO 8601).

virtual_path: str | None = None

Virtual filesystem path for this template config. null if not set.

class MemberListResponseDataItemAgentSourceSolution(pydantic.main.BaseModel):
 990class MemberListResponseDataItemAgentSourceSolution(BaseModel):
 991    current_solution: MemberListResponseDataItemAgentSourceSolutionCurrentSolution | None = Field(
 992        default=None,
 993        description="Summary of the current parent Solution config row. `solution` is the pinned Solution version the agent points at; `current_solution` is the source Solution config row as it exists now.",
 994    )
 995    solution: MemberListResponseDataItemAgentSourceSolutionSolution = Field(
 996        ...,
 997        description="Summary of the parent Solution, including `upgrade_available`, `latest_version`, and `latest_solution` when a newer system-scoped version is available for the agent's org-scoped Solution.",
 998    )
 999    template: MemberListResponseDataItemAgentSourceSolutionTemplate = Field(
1000        ...,
1001        description="Summary of the AgentTemplate config (`cfg_...`) the agent was last provisioned or updated from.",
1002    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.

Summary of the current parent Solution config row. solution is the pinned Solution version the agent points at; current_solution is the source Solution config row as it exists now.

Summary of the parent Solution, including upgrade_available, latest_version, and latest_solution when a newer system-scoped version is available for the agent's org-scoped Solution.

Summary of the AgentTemplate config (cfg_...) the agent was last provisioned or updated from.

class MemberListResponseDataItemAgent(pydantic.main.BaseModel):
1005class MemberListResponseDataItemAgent(BaseModel):
1006    acl: MemberListResponseDataItemAgentAcl | None = Field(
1007        default=None,
1008        description="Access control list for the agent. Contains a `grants` array where each entry specifies `principal_type`, `principal`, and `actions`. `null` when no ACL restrictions are applied and the agent is accessible to all members of its scope.",
1009    )
1010    app: str | None = Field(
1011        default=None, description="ID of the application that owns this agent (`dap_...`)."
1012    )
1013    created_at: str | None = Field(
1014        default=None, description="When the agent was created (ISO 8601)."
1015    )
1016    default_model: str | None = Field(
1017        default=None,
1018        description='Default LLM model identifier used by this agent when no model is specified at runtime (e.g. `"claude-3-7-sonnet-latest"`).',
1019    )
1020    description: str | None = Field(
1021        default=None,
1022        description="Human-readable description of what the agent does. `null` if not set.",
1023    )
1024    email: str | None = Field(
1025        default=None,
1026        description="Email address provisioned for this agent. `null` if email delivery is not configured.",
1027    )
1028    id: str = Field(..., description="Agent ID (`agi_...`).")
1029    identity: str | None = Field(
1030        default=None,
1031        description="System-level identity prompt that shapes the agent's persona and behavior.",
1032    )
1033    last_applied_template_config: str | None = Field(
1034        default=None,
1035        description="ID of the AgentTemplate config (`cfg_...`) this agent was last provisioned or updated from. `null` for manually created agents.",
1036    )
1037    lookup_key: str | None = Field(
1038        default=None,
1039        description="Stable, user-defined identifier for this agent within the application. Unique per app.",
1040    )
1041    metadata: dict[str, Any] | None = Field(
1042        default=None,
1043        description="Arbitrary key-value metadata attached to the agent. Not interpreted by the platform.",
1044    )
1045    name: str | None = Field(
1046        default=None, description="Human-readable display name for the agent. `null` if not set."
1047    )
1048    org: str | None = Field(
1049        default=None,
1050        description="ID of the organization this agent belongs to (`org_...`). `null` if the agent is not org-scoped.",
1051    )
1052    org_name: str | None = Field(
1053        default=None,
1054        description="Display name of the organization this agent belongs to. `null` when the agent is not org-scoped or when the org association was not preloaded.",
1055    )
1056    originator: str | None = Field(
1057        default=None,
1058        description="Free-form label identifying the source or author that created this agent (e.g. a username or pipeline name).",
1059    )
1060    phone_number: str | None = Field(
1061        default=None,
1062        description="Phone number provisioned for this agent. `null` if SMS is not configured.",
1063    )
1064    sandbox: str | None = Field(
1065        default=None,
1066        description="ID of the sandbox environment this agent is scoped to (`dsb_...`). `null` in production deployments.",
1067    )
1068    source_solution: MemberListResponseDataItemAgentSourceSolution | None = Field(
1069        default=None,
1070        description="Source Solution and AgentTemplate summary for agents provisioned from a Solution. Includes `upgrade_available`, `latest_version`, and `latest_solution` so you can render an upgrade badge without a separate dry-run call. `null` for hand-built agents and agents whose tracked template or parent Solution has been deleted. Populated only on single-agent GET responses, never on list endpoints.",
1071    )
1072    team: str | None = Field(
1073        default=None,
1074        description="ID of the team that owns this agent (`tem_...`). `null` if the agent is not team-scoped.",
1075    )
1076    template_upgrade_available: bool | None = Field(
1077        default=None,
1078        description="True when the agent's last-applied template version is behind the current version of its AgentTemplate config i.e. reapplying the template (a per-agent upgrade) would bring it newer Solution content. Self-clears once the agent is reapplied. Computed on both the list endpoints and single-agent GET. Distinct from `source_solution.upgrade_available`, which compares Solution *versions*: an agent can lag its template (`template_upgrade_available: true`) while the org already holds the latest Solution version (`upgrade_available: false`).",
1079    )
1080    updated_at: str | None = Field(
1081        default=None, description="When the agent was last modified (ISO 8601)."
1082    )
1083    user: str | None = Field(
1084        default=None,
1085        description="ID of the user that owns this agent (`usr_...`). `null` if the agent is not user-scoped.",
1086    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.

Access control list for the agent. Contains a grants array where each entry specifies principal_type, principal, and actions. null when no ACL restrictions are applied and the agent is accessible to all members of its scope.

app: str | None = None

ID of the application that owns this agent (dap_...).

created_at: str | None = None

When the agent was created (ISO 8601).

default_model: str | None = None

Default LLM model identifier used by this agent when no model is specified at runtime (e.g. "claude-3-7-sonnet-latest").

description: str | None = None

Human-readable description of what the agent does. null if not set.

email: str | None = None

Email address provisioned for this agent. null if email delivery is not configured.

id: str = PydanticUndefined

Agent ID (agi_...).

identity: str | None = None

System-level identity prompt that shapes the agent's persona and behavior.

last_applied_template_config: str | None = None

ID of the AgentTemplate config (cfg_...) this agent was last provisioned or updated from. null for manually created agents.

lookup_key: str | None = None

Stable, user-defined identifier for this agent within the application. Unique per app.

metadata: dict[str, typing.Any] | None = None

Arbitrary key-value metadata attached to the agent. Not interpreted by the platform.

name: str | None = None

Human-readable display name for the agent. null if not set.

org: str | None = None

ID of the organization this agent belongs to (org_...). null if the agent is not org-scoped.

org_name: str | None = None

Display name of the organization this agent belongs to. null when the agent is not org-scoped or when the org association was not preloaded.

originator: str | None = None

Free-form label identifying the source or author that created this agent (e.g. a username or pipeline name).

phone_number: str | None = None

Phone number provisioned for this agent. null if SMS is not configured.

sandbox: str | None = None

ID of the sandbox environment this agent is scoped to (dsb_...). null in production deployments.

source_solution: MemberListResponseDataItemAgentSourceSolution | None = None

Source Solution and AgentTemplate summary for agents provisioned from a Solution. Includes upgrade_available, latest_version, and latest_solution so you can render an upgrade badge without a separate dry-run call. null for hand-built agents and agents whose tracked template or parent Solution has been deleted. Populated only on single-agent GET responses, never on list endpoints.

team: str | None = None

ID of the team that owns this agent (tem_...). null if the agent is not team-scoped.

template_upgrade_available: bool | None = None

True when the agent's last-applied template version is behind the current version of its AgentTemplate config i.e. reapplying the template (a per-agent upgrade) would bring it newer Solution content. Self-clears once the agent is reapplied. Computed on both the list endpoints and single-agent GET. Distinct from source_solution.upgrade_available, which compares Solution versions: an agent can lag its template (template_upgrade_available: true) while the org already holds the latest Solution version (upgrade_available: false).

updated_at: str | None = None

When the agent was last modified (ISO 8601).

user: str | None = None

ID of the user that owns this agent (usr_...). null if the agent is not user-scoped.

class MemberListResponseDataItemProfilePicture(pydantic.main.BaseModel):
1089class MemberListResponseDataItemProfilePicture(BaseModel):
1090    file: str | None = Field(
1091        default=None,
1092        description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.",
1093    )
1094    height: int | None = Field(
1095        default=None, description="Height of the image in pixels. `null` if not known."
1096    )
1097    media: str | None = Field(
1098        default=None,
1099        description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.",
1100    )
1101    mime_type: str | None = Field(
1102        default=None,
1103        description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.',
1104    )
1105    refresh_url: str | None = Field(
1106        default=None,
1107        description="Endpoint URL you can call to obtain a fresh signed `url` when the current one has expired. `null` if the URL does not require refreshing.",
1108    )
1109    url: str | None = Field(
1110        default=None,
1111        description="Signed or public URL for downloading the image. May be time-limited; use `refresh_url` to obtain a new URL when this one expires.",
1112    )
1113    width: int | None = Field(
1114        default=None, description="Width of the image in pixels. `null` if not known."
1115    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
file: str | None = None

ID of the underlying storage file (fil_...). null when the image is not backed by a platform storage file.

height: int | None = None

Height of the image in pixels. null if not known.

media: str | None = None

ID of the associated media record (med_...). null when the image is not linked to a media entity.

mime_type: str | None = None

MIME type of the image, e.g. "image/png" or "image/jpeg". null if not known.

refresh_url: str | None = None

Endpoint URL you can call to obtain a fresh signed url when the current one has expired. null if the URL does not require refreshing.

url: str | None = None

Signed or public URL for downloading the image. May be time-limited; use refresh_url to obtain a new URL when this one expires.

width: int | None = None

Width of the image in pixels. null if not known.

class MemberListResponseDataItemUser(pydantic.main.BaseModel):
1118class MemberListResponseDataItemUser(BaseModel):
1119    alias: str | None = Field(
1120        default=None, description="Short handle or alias for the user. `null` if not set."
1121    )
1122    app: str | None = Field(
1123        default=None,
1124        description="ID of the app this user (and their access token) is scoped to (`dap_...`). `null` if the user is not scoped to an app.",
1125    )
1126    app_name: str | None = Field(
1127        default=None,
1128        description="Display name of the user's app. `null` when the app association was not preloaded by the caller.",
1129    )
1130    created_by_agent_user: str | None = Field(
1131        default=None,
1132        description="Agent user that created this account (`usr_...`). `null` unless an agent created it.",
1133    )
1134    created_by_developer: str | None = Field(
1135        default=None,
1136        description="Developer account that created this user (`dva_...`). `null` unless created via a developer token.",
1137    )
1138    created_by_org: str | None = Field(
1139        default=None,
1140        description="Org of the principal that created this user (`org_...`). `null` on legacy rows.",
1141    )
1142    created_by_team: str | None = Field(
1143        default=None,
1144        description="Team that created this user (`tem_...`). `null` unless created as a team.",
1145    )
1146    created_by_user: str | None = Field(
1147        default=None,
1148        description="User who created this account (`usr_...`). `null` on self-signup or legacy rows.",
1149    )
1150    email: str | None = Field(default=None, description="Email address of the user.")
1151    id: str = Field(..., description="User ID (`usr_...`).")
1152    is_system_user: bool | None = Field(
1153        default=None,
1154        description="`true` if this account is an internal system user rather than a human. System users are created automatically by the platform.",
1155    )
1156    metadata: dict[str, Any] | None = Field(
1157        default=None,
1158        description="Arbitrary key-value metadata attached to the user. Defaults to an empty object.",
1159    )
1160    name: str | None = Field(
1161        default=None,
1162        description="Full display name of the user. `null` if the user has not set a name.",
1163    )
1164    org: str | None = Field(
1165        default=None,
1166        description="ID of the organization this user belongs to (`org_...`). `null` if the user is not a member of any organization.",
1167    )
1168    org_name: str | None = Field(
1169        default=None,
1170        description="Display name of the user's organization. `null` when the user is not in an org, or when the org association was not preloaded by the caller.",
1171    )
1172    org_role: str | None = Field(
1173        default=None,
1174        description='Role of the user within their organization. One of `"admin"`, `"member"`, or `"viewer"`. `null` when the user is not a member of any organization.',
1175    )
1176    org_slug: str | None = Field(
1177        default=None,
1178        description="Stable workspace slug for the user's organization. `null` when the user is not in an org, or when the org association was not preloaded by the caller.",
1179    )
1180    sandbox: str | None = Field(
1181        default=None,
1182        description="ID of the sandbox environment this user is scoped to (`sbx_...`). `null` for production users.",
1183    )
1184    sandbox_name: str | None = Field(
1185        default=None,
1186        description="Display name of the user's sandbox environment. `null` for production users, or when the sandbox association was not preloaded by the caller.",
1187    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
alias: str | None = None

Short handle or alias for the user. null if not set.

app: str | None = None

ID of the app this user (and their access token) is scoped to (dap_...). null if the user is not scoped to an app.

app_name: str | None = None

Display name of the user's app. null when the app association was not preloaded by the caller.

created_by_agent_user: str | None = None

Agent user that created this account (usr_...). null unless an agent created it.

created_by_developer: str | None = None

Developer account that created this user (dva_...). null unless created via a developer token.

created_by_org: str | None = None

Org of the principal that created this user (org_...). null on legacy rows.

created_by_team: str | None = None

Team that created this user (tem_...). null unless created as a team.

created_by_user: str | None = None

User who created this account (usr_...). null on self-signup or legacy rows.

email: str | None = None

Email address of the user.

id: str = PydanticUndefined

User ID (usr_...).

is_system_user: bool | None = None

true if this account is an internal system user rather than a human. System users are created automatically by the platform.

metadata: dict[str, typing.Any] | None = None

Arbitrary key-value metadata attached to the user. Defaults to an empty object.

name: str | None = None

Full display name of the user. null if the user has not set a name.

org: str | None = None

ID of the organization this user belongs to (org_...). null if the user is not a member of any organization.

org_name: str | None = None

Display name of the user's organization. null when the user is not in an org, or when the org association was not preloaded by the caller.

org_role: str | None = None

Role of the user within their organization. One of "admin", "member", or "viewer". null when the user is not a member of any organization.

org_slug: str | None = None

Stable workspace slug for the user's organization. null when the user is not in an org, or when the org association was not preloaded by the caller.

sandbox: str | None = None

ID of the sandbox environment this user is scoped to (sbx_...). null for production users.

sandbox_name: str | None = None

Display name of the user's sandbox environment. null for production users, or when the sandbox association was not preloaded by the caller.

class MemberListResponseDataItem(pydantic.main.BaseModel):
1190class MemberListResponseDataItem(BaseModel):
1191    agent: MemberListResponseDataItemAgent | None = Field(
1192        default=None,
1193        description="The agent associated with this membership, as an expanded agent object. `null` when the member is a user, the type is unknown, or the association is not preloaded.",
1194    )
1195    created_at: datetime | None = Field(
1196        default=None, description="When this membership record was created (ISO 8601)."
1197    )
1198    id: str = Field(..., description="Team membership ID (`tmb_...`).")
1199    joined_at: datetime | None = Field(
1200        default=None, description="When the principal joined the team (ISO 8601)."
1201    )
1202    metadata: dict[str, Any] | None = Field(
1203        default=None,
1204        description="Arbitrary key-value metadata attached to this membership record. `null` if no metadata has been set.",
1205    )
1206    name: str | None = Field(
1207        default=None,
1208        description="Display name of the member, derived from the associated user or agent. `null` if the principal is unknown.",
1209    )
1210    profile_picture: MemberListResponseDataItemProfilePicture | None = Field(
1211        default=None,
1212        description="Profile picture of the member, derived from the associated user or agent. `null` if not set or principal is unknown.",
1213    )
1214    role: str | None = Field(
1215        default=None,
1216        description='The member\'s role within the team. One of `"owner"`, `"admin"`, or `"member"`.',
1217    )
1218    team: dict[str, Any] | None = Field(
1219        default=None,
1220        description="The team this membership belongs to, as an expanded team object. `null` when the team association is not preloaded.",
1221    )
1222    type: str | None = Field(
1223        default=None,
1224        description='Resolved principal type. One of `"user"`, `"agent"`, or `"unknown"` when the principal cannot be determined.',
1225    )
1226    updated_at: datetime | None = Field(
1227        default=None, description="When this membership record was last updated (ISO 8601)."
1228    )
1229    user: MemberListResponseDataItemUser | None = Field(
1230        default=None,
1231        description="The user associated with this membership, as an expanded user object. `null` when the member is an agent, the type is unknown, or the association is not preloaded.",
1232    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
agent: MemberListResponseDataItemAgent | None = None

The agent associated with this membership, as an expanded agent object. null when the member is a user, the type is unknown, or the association is not preloaded.

created_at: datetime.datetime | None = None

When this membership record was created (ISO 8601).

id: str = PydanticUndefined

Team membership ID (tmb_...).

joined_at: datetime.datetime | None = None

When the principal joined the team (ISO 8601).

metadata: dict[str, typing.Any] | None = None

Arbitrary key-value metadata attached to this membership record. null if no metadata has been set.

name: str | None = None

Display name of the member, derived from the associated user or agent. null if the principal is unknown.

profile_picture: MemberListResponseDataItemProfilePicture | None = None

Profile picture of the member, derived from the associated user or agent. null if not set or principal is unknown.

role: str | None = None

The member's role within the team. One of "owner", "admin", or "member".

team: dict[str, typing.Any] | None = None

The team this membership belongs to, as an expanded team object. null when the team association is not preloaded.

type: str | None = None

Resolved principal type. One of "user", "agent", or "unknown" when the principal cannot be determined.

updated_at: datetime.datetime | None = None

When this membership record was last updated (ISO 8601).

user: MemberListResponseDataItemUser | None = None

The user associated with this membership, as an expanded user object. null when the member is an agent, the type is unknown, or the association is not preloaded.

class MemberListResponse(pydantic.main.BaseModel):
1235class MemberListResponse(BaseModel):
1236    """
1237    Successful response
1238    """
1239
1240    data: list[MemberListResponseDataItem] = Field(
1241        ..., description="Array of team membership objects, including both user and agent members."
1242    )

Successful response

data: list[MemberListResponseDataItem] = PydanticUndefined

Array of team membership objects, including both user and agent members.

class TeamTaskListResponseDataItemCreatedByActorProfilePicture(pydantic.main.BaseModel):
1245class TeamTaskListResponseDataItemCreatedByActorProfilePicture(BaseModel):
1246    file: str | None = Field(
1247        default=None,
1248        description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.",
1249    )
1250    height: int | None = Field(
1251        default=None, description="Height of the image in pixels. `null` if not known."
1252    )
1253    media: str | None = Field(
1254        default=None,
1255        description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.",
1256    )
1257    mime_type: str | None = Field(
1258        default=None,
1259        description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.',
1260    )
1261    refresh_url: str | None = Field(
1262        default=None,
1263        description="Endpoint URL you can call to obtain a fresh signed `url` when the current one has expired. `null` if the URL does not require refreshing.",
1264    )
1265    url: str | None = Field(
1266        default=None,
1267        description="Signed or public URL for downloading the image. May be time-limited; use `refresh_url` to obtain a new URL when this one expires.",
1268    )
1269    width: int | None = Field(
1270        default=None, description="Width of the image in pixels. `null` if not known."
1271    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
file: str | None = None

ID of the underlying storage file (fil_...). null when the image is not backed by a platform storage file.

height: int | None = None

Height of the image in pixels. null if not known.

media: str | None = None

ID of the associated media record (med_...). null when the image is not linked to a media entity.

mime_type: str | None = None

MIME type of the image, e.g. "image/png" or "image/jpeg". null if not known.

refresh_url: str | None = None

Endpoint URL you can call to obtain a fresh signed url when the current one has expired. null if the URL does not require refreshing.

url: str | None = None

Signed or public URL for downloading the image. May be time-limited; use refresh_url to obtain a new URL when this one expires.

width: int | None = None

Width of the image in pixels. null if not known.

class TeamTaskListResponseDataItemCreatedByActor(pydantic.main.BaseModel):
1274class TeamTaskListResponseDataItemCreatedByActor(BaseModel):
1275    alias: str | None = Field(
1276        default=None,
1277        description="Short handle or alias for the actor, used as an alternate display identifier. `null` if not configured.",
1278    )
1279    id: str | None = Field(
1280        default=None,
1281        description='Composite actor identifier. Format is `"user-<usr_...>"` for human users or `"agent-<agi_...>"` for agents.',
1282    )
1283    name: str | None = Field(
1284        default=None,
1285        description="Display name of the actor shown in the UI. `null` if no name is set.",
1286    )
1287    profile_picture: TeamTaskListResponseDataItemCreatedByActorProfilePicture | None = Field(
1288        default=None,
1289        description="Profile picture for the actor. `null` if the actor has no profile picture.",
1290    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
alias: str | None = None

Short handle or alias for the actor, used as an alternate display identifier. null if not configured.

id: str | None = None

Composite actor identifier. Format is "user-<usr_...>" for human users or "agent-<agi_...>" for agents.

name: str | None = None

Display name of the actor shown in the UI. null if no name is set.

Profile picture for the actor. null if the actor has no profile picture.

class TeamTaskListResponseDataItemCurrentLease(pydantic.main.BaseModel):
1293class TeamTaskListResponseDataItemCurrentLease(BaseModel):
1294    expires_at: datetime = Field(
1295        ..., description="Server-calculated lease expiry in ISO 8601 format."
1296    )
1297    harness: str = Field(..., description="Bounded harness identifier for the coding session.")
1298    session_name: str = Field(
1299        ..., description="Display name supplied by the coding session that holds the lease."
1300    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
expires_at: datetime.datetime = PydanticUndefined

Server-calculated lease expiry in ISO 8601 format.

harness: str = PydanticUndefined

Bounded harness identifier for the coding session.

session_name: str = PydanticUndefined

Display name supplied by the coding session that holds the lease.

class TeamTaskListResponseDataItemOwnerActorProfilePicture(pydantic.main.BaseModel):
1303class TeamTaskListResponseDataItemOwnerActorProfilePicture(BaseModel):
1304    file: str | None = Field(
1305        default=None,
1306        description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.",
1307    )
1308    height: int | None = Field(
1309        default=None, description="Height of the image in pixels. `null` if not known."
1310    )
1311    media: str | None = Field(
1312        default=None,
1313        description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.",
1314    )
1315    mime_type: str | None = Field(
1316        default=None,
1317        description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.',
1318    )
1319    refresh_url: str | None = Field(
1320        default=None,
1321        description="Endpoint URL you can call to obtain a fresh signed `url` when the current one has expired. `null` if the URL does not require refreshing.",
1322    )
1323    url: str | None = Field(
1324        default=None,
1325        description="Signed or public URL for downloading the image. May be time-limited; use `refresh_url` to obtain a new URL when this one expires.",
1326    )
1327    width: int | None = Field(
1328        default=None, description="Width of the image in pixels. `null` if not known."
1329    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
file: str | None = None

ID of the underlying storage file (fil_...). null when the image is not backed by a platform storage file.

height: int | None = None

Height of the image in pixels. null if not known.

media: str | None = None

ID of the associated media record (med_...). null when the image is not linked to a media entity.

mime_type: str | None = None

MIME type of the image, e.g. "image/png" or "image/jpeg". null if not known.

refresh_url: str | None = None

Endpoint URL you can call to obtain a fresh signed url when the current one has expired. null if the URL does not require refreshing.

url: str | None = None

Signed or public URL for downloading the image. May be time-limited; use refresh_url to obtain a new URL when this one expires.

width: int | None = None

Width of the image in pixels. null if not known.

class TeamTaskListResponseDataItemOwnerActor(pydantic.main.BaseModel):
1332class TeamTaskListResponseDataItemOwnerActor(BaseModel):
1333    alias: str | None = Field(
1334        default=None,
1335        description="Short handle or alias for the actor, used as an alternate display identifier. `null` if not configured.",
1336    )
1337    id: str | None = Field(
1338        default=None,
1339        description='Composite actor identifier. Format is `"user-<usr_...>"` for human users or `"agent-<agi_...>"` for agents.',
1340    )
1341    name: str | None = Field(
1342        default=None,
1343        description="Display name of the actor shown in the UI. `null` if no name is set.",
1344    )
1345    profile_picture: TeamTaskListResponseDataItemOwnerActorProfilePicture | None = Field(
1346        default=None,
1347        description="Profile picture for the actor. `null` if the actor has no profile picture.",
1348    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
alias: str | None = None

Short handle or alias for the actor, used as an alternate display identifier. null if not configured.

id: str | None = None

Composite actor identifier. Format is "user-<usr_...>" for human users or "agent-<agi_...>" for agents.

name: str | None = None

Display name of the actor shown in the UI. null if no name is set.

Profile picture for the actor. null if the actor has no profile picture.

class TeamTaskListResponseDataItem(pydantic.main.BaseModel):
1351class TeamTaskListResponseDataItem(BaseModel):
1352    agent: str | None = Field(
1353        default=None,
1354        description="ID of the agent that owns this task (`agi_...`). `null` if the task is scoped to a team or user.",
1355    )
1356    blocked_by_count: int | None = Field(
1357        default=None,
1358        description="Number of tasks marked as blocking this task, whether or not they are done (see `GET /tasks/{task}/blockers`). Computed on list/show reads; create/update responses may lag one read behind.",
1359    )
1360    closed_at: datetime | None = Field(
1361        default=None,
1362        description="When the task was marked as done or otherwise closed (ISO 8601). `null` if the task is still open.",
1363    )
1364    comments_count: int | None = Field(
1365        default=None, description="Total number of comments posted on this task."
1366    )
1367    created_at: datetime | None = Field(
1368        default=None, description="When the task was created (ISO 8601)."
1369    )
1370    created_by_actor: TeamTaskListResponseDataItemCreatedByActor | None = Field(
1371        default=None,
1372        description="Resolved creator details including `id`, `name`, `alias`, and `profile_picture`. `null` if no creator is set or the creator cannot be resolved (e.g. creating agent was deleted).",
1373    )
1374    created_by_agent: str | None = Field(
1375        default=None,
1376        description="ID of the agent that created this task (`agi_...`). `null` if the task was created by a human user, or if the creating agent was later deleted.",
1377    )
1378    created_by_user: str | None = Field(
1379        default=None,
1380        description="ID of the user who created this task (`usr_...`). `null` if the task was created by an agent, or if creator provenance was cleared after the creator was deleted.",
1381    )
1382    current_lease: TeamTaskListResponseDataItemCurrentLease | None = Field(
1383        default=None,
1384        description="Viewer-safe live coding-session lease summary. `null` when the task is unleased or the projected lease has expired. Fencing identifiers are never included.",
1385    )
1386    description: str | None = Field(
1387        default=None,
1388        description="Long-form description or notes for the task. `null` if no description has been provided.",
1389    )
1390    due_date: datetime | None = Field(
1391        default=None,
1392        description="Date and time by which the task should be completed (ISO 8601). `null` if no due date is set.",
1393    )
1394    epic: str | None = Field(
1395        default=None,
1396        description="Free-form grouping label. `null` when the task is not in an epic.",
1397    )
1398    id: str = Field(..., description="Task ID (`tsk_...`).")
1399    is_blocked: bool | None = Field(
1400        default=None,
1401        description="`true` while at least one blocking task is not yet done. Informational only a blocked task can still change status and derived at read time, so the task un-blocks automatically when its last open blocker completes. Computed on list/show reads; create/update responses report `false` until the next read.",
1402    )
1403    links: dict[str, Any] | None = Field(
1404        default=None,
1405        description="Key-value map of named URLs or references associated with the task. Returns an empty object when no links have been set.",
1406    )
1407    metadata: dict[str, Any] | None = Field(
1408        default=None,
1409        description="Arbitrary key-value map of application-specific data stored alongside the task. Returns an empty object when no metadata has been set.",
1410    )
1411    name: str = Field(..., description="Human-readable title of the task.")
1412    org: str | None = Field(
1413        default=None,
1414        description="ID of the organization this task belongs to (`org_...`). `null` for tasks outside an org context.",
1415    )
1416    owner_actor: TeamTaskListResponseDataItemOwnerActor | None = Field(
1417        default=None,
1418        description="Resolved owner details including `id`, `name`, `alias`, and `profile_picture`. `null` if the task is unassigned or the owner cannot be resolved (e.g. assigned agent was deleted).",
1419    )
1420    owner_agent: str | None = Field(
1421        default=None,
1422        description="ID of the agent assigned as owner (`agi_...`). `null` if the owner is a human user, the task is unassigned, or the assigned agent was deleted.",
1423    )
1424    owner_user: str | None = Field(
1425        default=None,
1426        description="ID of the user assigned as owner (`usr_...`). `null` if the owner is an agent, the task is unassigned, or the assigned agent was deleted.",
1427    )
1428    parent: str | None = Field(
1429        default=None,
1430        description="ID of the parent task when this task is a subtask (`tsk_...`). `null` for top-level tasks. Subtasks nest exactly one level.",
1431    )
1432    priority: int | None = Field(
1433        default=None,
1434        description="Priority level of the task from `0` (highest) to `4` (lowest). Defaults to `2` (medium) when not explicitly set.",
1435    )
1436    sandbox: str | None = Field(
1437        default=None,
1438        description="ID of the developer sandbox this task is scoped to (`dsb_...`). `null` for tasks outside a sandbox environment.",
1439    )
1440    source_id: str | None = Field(
1441        default=None,
1442        description="Source object identity (for example `ArchAstro/firstlanding`). `null` when the task has no source.",
1443    )
1444    source_scope: str | None = Field(
1445        default=None,
1446        description="Container of the work this task is about (for example `github.com`). `null` when the task has no source. Set together with `source_type` and `source_id`.",
1447    )
1448    source_type: str | None = Field(
1449        default=None,
1450        description="Kind of source object (for example `repository`). `null` when the task has no source.",
1451    )
1452    status: str = Field(
1453        ...,
1454        description='Current status of the task. One of `"open"`, `"in_progress"`, or `"done"`.',
1455    )
1456    subtasks_count: int | None = Field(
1457        default=None,
1458        description="Number of subtasks under this task. Computed on list/show reads; create/update responses may report 0 until the next read. Always 0 for subtasks.",
1459    )
1460    tags: list[str] | None = Field(
1461        default=None,
1462        description="Labels for grouping and filtering, stored lowercase and de-duplicated. Empty array when untagged.",
1463    )
1464    team: str | None = Field(
1465        default=None,
1466        description="ID of the team that owns this task (`tem_...`). `null` if the task is not scoped to a team.",
1467    )
1468    thread: str | None = Field(
1469        default=None,
1470        description="ID of the thread this task is bound to (`thr_...`) the conversation it was filed from, or the thread passed at creation. `null` for tasks not tied to a thread.",
1471    )
1472    updated_at: datetime | None = Field(
1473        default=None, description="When the task was last modified (ISO 8601)."
1474    )
1475    user: str | None = Field(
1476        default=None,
1477        description="ID of the user that owns this task (`usr_...`). `null` if the task is scoped to a team.",
1478    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
agent: str | None = None

ID of the agent that owns this task (agi_...). null if the task is scoped to a team or user.

blocked_by_count: int | None = None

Number of tasks marked as blocking this task, whether or not they are done (see GET /tasks/{task}/blockers). Computed on list/show reads; create/update responses may lag one read behind.

closed_at: datetime.datetime | None = None

When the task was marked as done or otherwise closed (ISO 8601). null if the task is still open.

comments_count: int | None = None

Total number of comments posted on this task.

created_at: datetime.datetime | None = None

When the task was created (ISO 8601).

created_by_actor: TeamTaskListResponseDataItemCreatedByActor | None = None

Resolved creator details including id, name, alias, and profile_picture. null if no creator is set or the creator cannot be resolved (e.g. creating agent was deleted).

created_by_agent: str | None = None

ID of the agent that created this task (agi_...). null if the task was created by a human user, or if the creating agent was later deleted.

created_by_user: str | None = None

ID of the user who created this task (usr_...). null if the task was created by an agent, or if creator provenance was cleared after the creator was deleted.

current_lease: TeamTaskListResponseDataItemCurrentLease | None = None

Viewer-safe live coding-session lease summary. null when the task is unleased or the projected lease has expired. Fencing identifiers are never included.

description: str | None = None

Long-form description or notes for the task. null if no description has been provided.

due_date: datetime.datetime | None = None

Date and time by which the task should be completed (ISO 8601). null if no due date is set.

epic: str | None = None

Free-form grouping label. null when the task is not in an epic.

id: str = PydanticUndefined

Task ID (tsk_...).

is_blocked: bool | None = None

true while at least one blocking task is not yet done. Informational only a blocked task can still change status and derived at read time, so the task un-blocks automatically when its last open blocker completes. Computed on list/show reads; create/update responses report false until the next read.

metadata: dict[str, typing.Any] | None = None

Arbitrary key-value map of application-specific data stored alongside the task. Returns an empty object when no metadata has been set.

name: str = PydanticUndefined

Human-readable title of the task.

org: str | None = None

ID of the organization this task belongs to (org_...). null for tasks outside an org context.

owner_actor: TeamTaskListResponseDataItemOwnerActor | None = None

Resolved owner details including id, name, alias, and profile_picture. null if the task is unassigned or the owner cannot be resolved (e.g. assigned agent was deleted).

owner_agent: str | None = None

ID of the agent assigned as owner (agi_...). null if the owner is a human user, the task is unassigned, or the assigned agent was deleted.

owner_user: str | None = None

ID of the user assigned as owner (usr_...). null if the owner is an agent, the task is unassigned, or the assigned agent was deleted.

parent: str | None = None

ID of the parent task when this task is a subtask (tsk_...). null for top-level tasks. Subtasks nest exactly one level.

priority: int | None = None

Priority level of the task from 0 (highest) to 4 (lowest). Defaults to 2 (medium) when not explicitly set.

sandbox: str | None = None

ID of the developer sandbox this task is scoped to (dsb_...). null for tasks outside a sandbox environment.

source_id: str | None = None

Source object identity (for example ArchAstro/firstlanding). null when the task has no source.

source_scope: str | None = None

Container of the work this task is about (for example github.com). null when the task has no source. Set together with source_type and source_id.

source_type: str | None = None

Kind of source object (for example repository). null when the task has no source.

status: str = PydanticUndefined

Current status of the task. One of "open", "in_progress", or "done".

subtasks_count: int | None = None

Number of subtasks under this task. Computed on list/show reads; create/update responses may report 0 until the next read. Always 0 for subtasks.

tags: list[str] | None = None

Labels for grouping and filtering, stored lowercase and de-duplicated. Empty array when untagged.

team: str | None = None

ID of the team that owns this task (tem_...). null if the task is not scoped to a team.

thread: str | None = None

ID of the thread this task is bound to (thr_...) the conversation it was filed from, or the thread passed at creation. null for tasks not tied to a thread.

updated_at: datetime.datetime | None = None

When the task was last modified (ISO 8601).

user: str | None = None

ID of the user that owns this task (usr_...). null if the task is scoped to a team.

class TeamTaskListResponse(pydantic.main.BaseModel):
1481class TeamTaskListResponse(BaseModel):
1482    """
1483    Successful response
1484    """
1485
1486    after_cursor: str | None = None
1487    before_cursor: str | None = None
1488    data: list[TeamTaskListResponseDataItem] = Field(
1489        ..., description="Array of task objects matching the requested filters."
1490    )
1491    has_more: bool

Successful response

after_cursor: str | None = None
before_cursor: str | None = None
data: list[TeamTaskListResponseDataItem] = PydanticUndefined

Array of task objects matching the requested filters.

has_more: bool = PydanticUndefined
class TeamTaskBlockerCyclesResponseDataItemTasksItemCreatedByActorProfilePicture(pydantic.main.BaseModel):
1494class TeamTaskBlockerCyclesResponseDataItemTasksItemCreatedByActorProfilePicture(BaseModel):
1495    file: str | None = Field(
1496        default=None,
1497        description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.",
1498    )
1499    height: int | None = Field(
1500        default=None, description="Height of the image in pixels. `null` if not known."
1501    )
1502    media: str | None = Field(
1503        default=None,
1504        description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.",
1505    )
1506    mime_type: str | None = Field(
1507        default=None,
1508        description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.',
1509    )
1510    refresh_url: str | None = Field(
1511        default=None,
1512        description="Endpoint URL you can call to obtain a fresh signed `url` when the current one has expired. `null` if the URL does not require refreshing.",
1513    )
1514    url: str | None = Field(
1515        default=None,
1516        description="Signed or public URL for downloading the image. May be time-limited; use `refresh_url` to obtain a new URL when this one expires.",
1517    )
1518    width: int | None = Field(
1519        default=None, description="Width of the image in pixels. `null` if not known."
1520    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
file: str | None = None

ID of the underlying storage file (fil_...). null when the image is not backed by a platform storage file.

height: int | None = None

Height of the image in pixels. null if not known.

media: str | None = None

ID of the associated media record (med_...). null when the image is not linked to a media entity.

mime_type: str | None = None

MIME type of the image, e.g. "image/png" or "image/jpeg". null if not known.

refresh_url: str | None = None

Endpoint URL you can call to obtain a fresh signed url when the current one has expired. null if the URL does not require refreshing.

url: str | None = None

Signed or public URL for downloading the image. May be time-limited; use refresh_url to obtain a new URL when this one expires.

width: int | None = None

Width of the image in pixels. null if not known.

class TeamTaskBlockerCyclesResponseDataItemTasksItemCreatedByActor(pydantic.main.BaseModel):
1523class TeamTaskBlockerCyclesResponseDataItemTasksItemCreatedByActor(BaseModel):
1524    alias: str | None = Field(
1525        default=None,
1526        description="Short handle or alias for the actor, used as an alternate display identifier. `null` if not configured.",
1527    )
1528    id: str | None = Field(
1529        default=None,
1530        description='Composite actor identifier. Format is `"user-<usr_...>"` for human users or `"agent-<agi_...>"` for agents.',
1531    )
1532    name: str | None = Field(
1533        default=None,
1534        description="Display name of the actor shown in the UI. `null` if no name is set.",
1535    )
1536    profile_picture: (
1537        TeamTaskBlockerCyclesResponseDataItemTasksItemCreatedByActorProfilePicture | None
1538    ) = Field(
1539        default=None,
1540        description="Profile picture for the actor. `null` if the actor has no profile picture.",
1541    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
alias: str | None = None

Short handle or alias for the actor, used as an alternate display identifier. null if not configured.

id: str | None = None

Composite actor identifier. Format is "user-<usr_...>" for human users or "agent-<agi_...>" for agents.

name: str | None = None

Display name of the actor shown in the UI. null if no name is set.

Profile picture for the actor. null if the actor has no profile picture.

class TeamTaskBlockerCyclesResponseDataItemTasksItemCurrentLease(pydantic.main.BaseModel):
1544class TeamTaskBlockerCyclesResponseDataItemTasksItemCurrentLease(BaseModel):
1545    expires_at: datetime = Field(
1546        ..., description="Server-calculated lease expiry in ISO 8601 format."
1547    )
1548    harness: str = Field(..., description="Bounded harness identifier for the coding session.")
1549    session_name: str = Field(
1550        ..., description="Display name supplied by the coding session that holds the lease."
1551    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
expires_at: datetime.datetime = PydanticUndefined

Server-calculated lease expiry in ISO 8601 format.

harness: str = PydanticUndefined

Bounded harness identifier for the coding session.

session_name: str = PydanticUndefined

Display name supplied by the coding session that holds the lease.

class TeamTaskBlockerCyclesResponseDataItemTasksItemOwnerActorProfilePicture(pydantic.main.BaseModel):
1554class TeamTaskBlockerCyclesResponseDataItemTasksItemOwnerActorProfilePicture(BaseModel):
1555    file: str | None = Field(
1556        default=None,
1557        description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.",
1558    )
1559    height: int | None = Field(
1560        default=None, description="Height of the image in pixels. `null` if not known."
1561    )
1562    media: str | None = Field(
1563        default=None,
1564        description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.",
1565    )
1566    mime_type: str | None = Field(
1567        default=None,
1568        description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.',
1569    )
1570    refresh_url: str | None = Field(
1571        default=None,
1572        description="Endpoint URL you can call to obtain a fresh signed `url` when the current one has expired. `null` if the URL does not require refreshing.",
1573    )
1574    url: str | None = Field(
1575        default=None,
1576        description="Signed or public URL for downloading the image. May be time-limited; use `refresh_url` to obtain a new URL when this one expires.",
1577    )
1578    width: int | None = Field(
1579        default=None, description="Width of the image in pixels. `null` if not known."
1580    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
file: str | None = None

ID of the underlying storage file (fil_...). null when the image is not backed by a platform storage file.

height: int | None = None

Height of the image in pixels. null if not known.

media: str | None = None

ID of the associated media record (med_...). null when the image is not linked to a media entity.

mime_type: str | None = None

MIME type of the image, e.g. "image/png" or "image/jpeg". null if not known.

refresh_url: str | None = None

Endpoint URL you can call to obtain a fresh signed url when the current one has expired. null if the URL does not require refreshing.

url: str | None = None

Signed or public URL for downloading the image. May be time-limited; use refresh_url to obtain a new URL when this one expires.

width: int | None = None

Width of the image in pixels. null if not known.

class TeamTaskBlockerCyclesResponseDataItemTasksItemOwnerActor(pydantic.main.BaseModel):
1583class TeamTaskBlockerCyclesResponseDataItemTasksItemOwnerActor(BaseModel):
1584    alias: str | None = Field(
1585        default=None,
1586        description="Short handle or alias for the actor, used as an alternate display identifier. `null` if not configured.",
1587    )
1588    id: str | None = Field(
1589        default=None,
1590        description='Composite actor identifier. Format is `"user-<usr_...>"` for human users or `"agent-<agi_...>"` for agents.',
1591    )
1592    name: str | None = Field(
1593        default=None,
1594        description="Display name of the actor shown in the UI. `null` if no name is set.",
1595    )
1596    profile_picture: (
1597        TeamTaskBlockerCyclesResponseDataItemTasksItemOwnerActorProfilePicture | None
1598    ) = Field(
1599        default=None,
1600        description="Profile picture for the actor. `null` if the actor has no profile picture.",
1601    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
alias: str | None = None

Short handle or alias for the actor, used as an alternate display identifier. null if not configured.

id: str | None = None

Composite actor identifier. Format is "user-<usr_...>" for human users or "agent-<agi_...>" for agents.

name: str | None = None

Display name of the actor shown in the UI. null if no name is set.

Profile picture for the actor. null if the actor has no profile picture.

class TeamTaskBlockerCyclesResponseDataItemTasksItem(pydantic.main.BaseModel):
1604class TeamTaskBlockerCyclesResponseDataItemTasksItem(BaseModel):
1605    agent: str | None = Field(
1606        default=None,
1607        description="ID of the agent that owns this task (`agi_...`). `null` if the task is scoped to a team or user.",
1608    )
1609    blocked_by_count: int | None = Field(
1610        default=None,
1611        description="Number of tasks marked as blocking this task, whether or not they are done (see `GET /tasks/{task}/blockers`). Computed on list/show reads; create/update responses may lag one read behind.",
1612    )
1613    closed_at: datetime | None = Field(
1614        default=None,
1615        description="When the task was marked as done or otherwise closed (ISO 8601). `null` if the task is still open.",
1616    )
1617    comments_count: int | None = Field(
1618        default=None, description="Total number of comments posted on this task."
1619    )
1620    created_at: datetime | None = Field(
1621        default=None, description="When the task was created (ISO 8601)."
1622    )
1623    created_by_actor: TeamTaskBlockerCyclesResponseDataItemTasksItemCreatedByActor | None = Field(
1624        default=None,
1625        description="Resolved creator details including `id`, `name`, `alias`, and `profile_picture`. `null` if no creator is set or the creator cannot be resolved (e.g. creating agent was deleted).",
1626    )
1627    created_by_agent: str | None = Field(
1628        default=None,
1629        description="ID of the agent that created this task (`agi_...`). `null` if the task was created by a human user, or if the creating agent was later deleted.",
1630    )
1631    created_by_user: str | None = Field(
1632        default=None,
1633        description="ID of the user who created this task (`usr_...`). `null` if the task was created by an agent, or if creator provenance was cleared after the creator was deleted.",
1634    )
1635    current_lease: TeamTaskBlockerCyclesResponseDataItemTasksItemCurrentLease | None = Field(
1636        default=None,
1637        description="Viewer-safe live coding-session lease summary. `null` when the task is unleased or the projected lease has expired. Fencing identifiers are never included.",
1638    )
1639    description: str | None = Field(
1640        default=None,
1641        description="Long-form description or notes for the task. `null` if no description has been provided.",
1642    )
1643    due_date: datetime | None = Field(
1644        default=None,
1645        description="Date and time by which the task should be completed (ISO 8601). `null` if no due date is set.",
1646    )
1647    epic: str | None = Field(
1648        default=None,
1649        description="Free-form grouping label. `null` when the task is not in an epic.",
1650    )
1651    id: str = Field(..., description="Task ID (`tsk_...`).")
1652    is_blocked: bool | None = Field(
1653        default=None,
1654        description="`true` while at least one blocking task is not yet done. Informational only a blocked task can still change status and derived at read time, so the task un-blocks automatically when its last open blocker completes. Computed on list/show reads; create/update responses report `false` until the next read.",
1655    )
1656    links: dict[str, Any] | None = Field(
1657        default=None,
1658        description="Key-value map of named URLs or references associated with the task. Returns an empty object when no links have been set.",
1659    )
1660    metadata: dict[str, Any] | None = Field(
1661        default=None,
1662        description="Arbitrary key-value map of application-specific data stored alongside the task. Returns an empty object when no metadata has been set.",
1663    )
1664    name: str = Field(..., description="Human-readable title of the task.")
1665    org: str | None = Field(
1666        default=None,
1667        description="ID of the organization this task belongs to (`org_...`). `null` for tasks outside an org context.",
1668    )
1669    owner_actor: TeamTaskBlockerCyclesResponseDataItemTasksItemOwnerActor | None = Field(
1670        default=None,
1671        description="Resolved owner details including `id`, `name`, `alias`, and `profile_picture`. `null` if the task is unassigned or the owner cannot be resolved (e.g. assigned agent was deleted).",
1672    )
1673    owner_agent: str | None = Field(
1674        default=None,
1675        description="ID of the agent assigned as owner (`agi_...`). `null` if the owner is a human user, the task is unassigned, or the assigned agent was deleted.",
1676    )
1677    owner_user: str | None = Field(
1678        default=None,
1679        description="ID of the user assigned as owner (`usr_...`). `null` if the owner is an agent, the task is unassigned, or the assigned agent was deleted.",
1680    )
1681    parent: str | None = Field(
1682        default=None,
1683        description="ID of the parent task when this task is a subtask (`tsk_...`). `null` for top-level tasks. Subtasks nest exactly one level.",
1684    )
1685    priority: int | None = Field(
1686        default=None,
1687        description="Priority level of the task from `0` (highest) to `4` (lowest). Defaults to `2` (medium) when not explicitly set.",
1688    )
1689    sandbox: str | None = Field(
1690        default=None,
1691        description="ID of the developer sandbox this task is scoped to (`dsb_...`). `null` for tasks outside a sandbox environment.",
1692    )
1693    source_id: str | None = Field(
1694        default=None,
1695        description="Source object identity (for example `ArchAstro/firstlanding`). `null` when the task has no source.",
1696    )
1697    source_scope: str | None = Field(
1698        default=None,
1699        description="Container of the work this task is about (for example `github.com`). `null` when the task has no source. Set together with `source_type` and `source_id`.",
1700    )
1701    source_type: str | None = Field(
1702        default=None,
1703        description="Kind of source object (for example `repository`). `null` when the task has no source.",
1704    )
1705    status: str = Field(
1706        ...,
1707        description='Current status of the task. One of `"open"`, `"in_progress"`, or `"done"`.',
1708    )
1709    subtasks_count: int | None = Field(
1710        default=None,
1711        description="Number of subtasks under this task. Computed on list/show reads; create/update responses may report 0 until the next read. Always 0 for subtasks.",
1712    )
1713    tags: list[str] | None = Field(
1714        default=None,
1715        description="Labels for grouping and filtering, stored lowercase and de-duplicated. Empty array when untagged.",
1716    )
1717    team: str | None = Field(
1718        default=None,
1719        description="ID of the team that owns this task (`tem_...`). `null` if the task is not scoped to a team.",
1720    )
1721    thread: str | None = Field(
1722        default=None,
1723        description="ID of the thread this task is bound to (`thr_...`) the conversation it was filed from, or the thread passed at creation. `null` for tasks not tied to a thread.",
1724    )
1725    updated_at: datetime | None = Field(
1726        default=None, description="When the task was last modified (ISO 8601)."
1727    )
1728    user: str | None = Field(
1729        default=None,
1730        description="ID of the user that owns this task (`usr_...`). `null` if the task is scoped to a team.",
1731    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
agent: str | None = None

ID of the agent that owns this task (agi_...). null if the task is scoped to a team or user.

blocked_by_count: int | None = None

Number of tasks marked as blocking this task, whether or not they are done (see GET /tasks/{task}/blockers). Computed on list/show reads; create/update responses may lag one read behind.

closed_at: datetime.datetime | None = None

When the task was marked as done or otherwise closed (ISO 8601). null if the task is still open.

comments_count: int | None = None

Total number of comments posted on this task.

created_at: datetime.datetime | None = None

When the task was created (ISO 8601).

Resolved creator details including id, name, alias, and profile_picture. null if no creator is set or the creator cannot be resolved (e.g. creating agent was deleted).

created_by_agent: str | None = None

ID of the agent that created this task (agi_...). null if the task was created by a human user, or if the creating agent was later deleted.

created_by_user: str | None = None

ID of the user who created this task (usr_...). null if the task was created by an agent, or if creator provenance was cleared after the creator was deleted.

Viewer-safe live coding-session lease summary. null when the task is unleased or the projected lease has expired. Fencing identifiers are never included.

description: str | None = None

Long-form description or notes for the task. null if no description has been provided.

due_date: datetime.datetime | None = None

Date and time by which the task should be completed (ISO 8601). null if no due date is set.

epic: str | None = None

Free-form grouping label. null when the task is not in an epic.

id: str = PydanticUndefined

Task ID (tsk_...).

is_blocked: bool | None = None

true while at least one blocking task is not yet done. Informational only a blocked task can still change status and derived at read time, so the task un-blocks automatically when its last open blocker completes. Computed on list/show reads; create/update responses report false until the next read.

metadata: dict[str, typing.Any] | None = None

Arbitrary key-value map of application-specific data stored alongside the task. Returns an empty object when no metadata has been set.

name: str = PydanticUndefined

Human-readable title of the task.

org: str | None = None

ID of the organization this task belongs to (org_...). null for tasks outside an org context.

Resolved owner details including id, name, alias, and profile_picture. null if the task is unassigned or the owner cannot be resolved (e.g. assigned agent was deleted).

owner_agent: str | None = None

ID of the agent assigned as owner (agi_...). null if the owner is a human user, the task is unassigned, or the assigned agent was deleted.

owner_user: str | None = None

ID of the user assigned as owner (usr_...). null if the owner is an agent, the task is unassigned, or the assigned agent was deleted.

parent: str | None = None

ID of the parent task when this task is a subtask (tsk_...). null for top-level tasks. Subtasks nest exactly one level.

priority: int | None = None

Priority level of the task from 0 (highest) to 4 (lowest). Defaults to 2 (medium) when not explicitly set.

sandbox: str | None = None

ID of the developer sandbox this task is scoped to (dsb_...). null for tasks outside a sandbox environment.

source_id: str | None = None

Source object identity (for example ArchAstro/firstlanding). null when the task has no source.

source_scope: str | None = None

Container of the work this task is about (for example github.com). null when the task has no source. Set together with source_type and source_id.

source_type: str | None = None

Kind of source object (for example repository). null when the task has no source.

status: str = PydanticUndefined

Current status of the task. One of "open", "in_progress", or "done".

subtasks_count: int | None = None

Number of subtasks under this task. Computed on list/show reads; create/update responses may report 0 until the next read. Always 0 for subtasks.

tags: list[str] | None = None

Labels for grouping and filtering, stored lowercase and de-duplicated. Empty array when untagged.

team: str | None = None

ID of the team that owns this task (tem_...). null if the task is not scoped to a team.

thread: str | None = None

ID of the thread this task is bound to (thr_...) the conversation it was filed from, or the thread passed at creation. null for tasks not tied to a thread.

updated_at: datetime.datetime | None = None

When the task was last modified (ISO 8601).

user: str | None = None

ID of the user that owns this task (usr_...). null if the task is scoped to a team.

class TeamTaskBlockerCyclesResponseDataItem(pydantic.main.BaseModel):
1734class TeamTaskBlockerCyclesResponseDataItem(BaseModel):
1735    tasks: list[TeamTaskBlockerCyclesResponseDataItemTasksItem] = Field(
1736        ..., description="Every unfinished task in this cyclic blocker component."
1737    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
tasks: list[TeamTaskBlockerCyclesResponseDataItemTasksItem] = PydanticUndefined

Every unfinished task in this cyclic blocker component.

class TeamTaskBlockerCyclesResponse(pydantic.main.BaseModel):
1740class TeamTaskBlockerCyclesResponse(BaseModel):
1741    """
1742    Successful response
1743    """
1744
1745    after_cursor: str | None = None
1746    before_cursor: str | None = None
1747    data: list[TeamTaskBlockerCyclesResponseDataItem]
1748    has_more: bool

Successful response

after_cursor: str | None = None
before_cursor: str | None = None
data: list[TeamTaskBlockerCyclesResponseDataItem] = PydanticUndefined
has_more: bool = PydanticUndefined
class TeamTaskMetricsResponse(pydantic.main.BaseModel):
1751class TeamTaskMetricsResponse(BaseModel):
1752    """
1753    Successful response
1754    """
1755
1756    completed: int
1757    created: int
1758    days: int
1759    end_at: datetime
1760    open: int
1761    series: list[dict[str, Any]] = Field(
1762        ...,
1763        description="Zero-filled UTC-day buckets with `date`, end-of-day `open`, `created`, and `completed`.",
1764    )
1765    start_at: datetime

Successful response

completed: int = PydanticUndefined
created: int = PydanticUndefined
days: int = PydanticUndefined
end_at: datetime.datetime = PydanticUndefined
open: int = PydanticUndefined
series: list[dict[str, typing.Any]] = PydanticUndefined

Zero-filled UTC-day buckets with date, end-of-day open, created, and completed.

start_at: datetime.datetime = PydanticUndefined
class TeamTaskReadyResponseDataItemTaskCreatedByActorProfilePicture(pydantic.main.BaseModel):
1768class TeamTaskReadyResponseDataItemTaskCreatedByActorProfilePicture(BaseModel):
1769    file: str | None = Field(
1770        default=None,
1771        description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.",
1772    )
1773    height: int | None = Field(
1774        default=None, description="Height of the image in pixels. `null` if not known."
1775    )
1776    media: str | None = Field(
1777        default=None,
1778        description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.",
1779    )
1780    mime_type: str | None = Field(
1781        default=None,
1782        description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.',
1783    )
1784    refresh_url: str | None = Field(
1785        default=None,
1786        description="Endpoint URL you can call to obtain a fresh signed `url` when the current one has expired. `null` if the URL does not require refreshing.",
1787    )
1788    url: str | None = Field(
1789        default=None,
1790        description="Signed or public URL for downloading the image. May be time-limited; use `refresh_url` to obtain a new URL when this one expires.",
1791    )
1792    width: int | None = Field(
1793        default=None, description="Width of the image in pixels. `null` if not known."
1794    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
file: str | None = None

ID of the underlying storage file (fil_...). null when the image is not backed by a platform storage file.

height: int | None = None

Height of the image in pixels. null if not known.

media: str | None = None

ID of the associated media record (med_...). null when the image is not linked to a media entity.

mime_type: str | None = None

MIME type of the image, e.g. "image/png" or "image/jpeg". null if not known.

refresh_url: str | None = None

Endpoint URL you can call to obtain a fresh signed url when the current one has expired. null if the URL does not require refreshing.

url: str | None = None

Signed or public URL for downloading the image. May be time-limited; use refresh_url to obtain a new URL when this one expires.

width: int | None = None

Width of the image in pixels. null if not known.

class TeamTaskReadyResponseDataItemTaskCreatedByActor(pydantic.main.BaseModel):
1797class TeamTaskReadyResponseDataItemTaskCreatedByActor(BaseModel):
1798    alias: str | None = Field(
1799        default=None,
1800        description="Short handle or alias for the actor, used as an alternate display identifier. `null` if not configured.",
1801    )
1802    id: str | None = Field(
1803        default=None,
1804        description='Composite actor identifier. Format is `"user-<usr_...>"` for human users or `"agent-<agi_...>"` for agents.',
1805    )
1806    name: str | None = Field(
1807        default=None,
1808        description="Display name of the actor shown in the UI. `null` if no name is set.",
1809    )
1810    profile_picture: TeamTaskReadyResponseDataItemTaskCreatedByActorProfilePicture | None = Field(
1811        default=None,
1812        description="Profile picture for the actor. `null` if the actor has no profile picture.",
1813    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
alias: str | None = None

Short handle or alias for the actor, used as an alternate display identifier. null if not configured.

id: str | None = None

Composite actor identifier. Format is "user-<usr_...>" for human users or "agent-<agi_...>" for agents.

name: str | None = None

Display name of the actor shown in the UI. null if no name is set.

Profile picture for the actor. null if the actor has no profile picture.

class TeamTaskReadyResponseDataItemTaskCurrentLease(pydantic.main.BaseModel):
1816class TeamTaskReadyResponseDataItemTaskCurrentLease(BaseModel):
1817    expires_at: datetime = Field(
1818        ..., description="Server-calculated lease expiry in ISO 8601 format."
1819    )
1820    harness: str = Field(..., description="Bounded harness identifier for the coding session.")
1821    session_name: str = Field(
1822        ..., description="Display name supplied by the coding session that holds the lease."
1823    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
expires_at: datetime.datetime = PydanticUndefined

Server-calculated lease expiry in ISO 8601 format.

harness: str = PydanticUndefined

Bounded harness identifier for the coding session.

session_name: str = PydanticUndefined

Display name supplied by the coding session that holds the lease.

class TeamTaskReadyResponseDataItemTaskOwnerActorProfilePicture(pydantic.main.BaseModel):
1826class TeamTaskReadyResponseDataItemTaskOwnerActorProfilePicture(BaseModel):
1827    file: str | None = Field(
1828        default=None,
1829        description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.",
1830    )
1831    height: int | None = Field(
1832        default=None, description="Height of the image in pixels. `null` if not known."
1833    )
1834    media: str | None = Field(
1835        default=None,
1836        description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.",
1837    )
1838    mime_type: str | None = Field(
1839        default=None,
1840        description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.',
1841    )
1842    refresh_url: str | None = Field(
1843        default=None,
1844        description="Endpoint URL you can call to obtain a fresh signed `url` when the current one has expired. `null` if the URL does not require refreshing.",
1845    )
1846    url: str | None = Field(
1847        default=None,
1848        description="Signed or public URL for downloading the image. May be time-limited; use `refresh_url` to obtain a new URL when this one expires.",
1849    )
1850    width: int | None = Field(
1851        default=None, description="Width of the image in pixels. `null` if not known."
1852    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
file: str | None = None

ID of the underlying storage file (fil_...). null when the image is not backed by a platform storage file.

height: int | None = None

Height of the image in pixels. null if not known.

media: str | None = None

ID of the associated media record (med_...). null when the image is not linked to a media entity.

mime_type: str | None = None

MIME type of the image, e.g. "image/png" or "image/jpeg". null if not known.

refresh_url: str | None = None

Endpoint URL you can call to obtain a fresh signed url when the current one has expired. null if the URL does not require refreshing.

url: str | None = None

Signed or public URL for downloading the image. May be time-limited; use refresh_url to obtain a new URL when this one expires.

width: int | None = None

Width of the image in pixels. null if not known.

class TeamTaskReadyResponseDataItemTaskOwnerActor(pydantic.main.BaseModel):
1855class TeamTaskReadyResponseDataItemTaskOwnerActor(BaseModel):
1856    alias: str | None = Field(
1857        default=None,
1858        description="Short handle or alias for the actor, used as an alternate display identifier. `null` if not configured.",
1859    )
1860    id: str | None = Field(
1861        default=None,
1862        description='Composite actor identifier. Format is `"user-<usr_...>"` for human users or `"agent-<agi_...>"` for agents.',
1863    )
1864    name: str | None = Field(
1865        default=None,
1866        description="Display name of the actor shown in the UI. `null` if no name is set.",
1867    )
1868    profile_picture: TeamTaskReadyResponseDataItemTaskOwnerActorProfilePicture | None = Field(
1869        default=None,
1870        description="Profile picture for the actor. `null` if the actor has no profile picture.",
1871    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
alias: str | None = None

Short handle or alias for the actor, used as an alternate display identifier. null if not configured.

id: str | None = None

Composite actor identifier. Format is "user-<usr_...>" for human users or "agent-<agi_...>" for agents.

name: str | None = None

Display name of the actor shown in the UI. null if no name is set.

Profile picture for the actor. null if the actor has no profile picture.

class TeamTaskReadyResponseDataItemTask(pydantic.main.BaseModel):
1874class TeamTaskReadyResponseDataItemTask(BaseModel):
1875    agent: str | None = Field(
1876        default=None,
1877        description="ID of the agent that owns this task (`agi_...`). `null` if the task is scoped to a team or user.",
1878    )
1879    blocked_by_count: int | None = Field(
1880        default=None,
1881        description="Number of tasks marked as blocking this task, whether or not they are done (see `GET /tasks/{task}/blockers`). Computed on list/show reads; create/update responses may lag one read behind.",
1882    )
1883    closed_at: datetime | None = Field(
1884        default=None,
1885        description="When the task was marked as done or otherwise closed (ISO 8601). `null` if the task is still open.",
1886    )
1887    comments_count: int | None = Field(
1888        default=None, description="Total number of comments posted on this task."
1889    )
1890    created_at: datetime | None = Field(
1891        default=None, description="When the task was created (ISO 8601)."
1892    )
1893    created_by_actor: TeamTaskReadyResponseDataItemTaskCreatedByActor | None = Field(
1894        default=None,
1895        description="Resolved creator details including `id`, `name`, `alias`, and `profile_picture`. `null` if no creator is set or the creator cannot be resolved (e.g. creating agent was deleted).",
1896    )
1897    created_by_agent: str | None = Field(
1898        default=None,
1899        description="ID of the agent that created this task (`agi_...`). `null` if the task was created by a human user, or if the creating agent was later deleted.",
1900    )
1901    created_by_user: str | None = Field(
1902        default=None,
1903        description="ID of the user who created this task (`usr_...`). `null` if the task was created by an agent, or if creator provenance was cleared after the creator was deleted.",
1904    )
1905    current_lease: TeamTaskReadyResponseDataItemTaskCurrentLease | None = Field(
1906        default=None,
1907        description="Viewer-safe live coding-session lease summary. `null` when the task is unleased or the projected lease has expired. Fencing identifiers are never included.",
1908    )
1909    description: str | None = Field(
1910        default=None,
1911        description="Long-form description or notes for the task. `null` if no description has been provided.",
1912    )
1913    due_date: datetime | None = Field(
1914        default=None,
1915        description="Date and time by which the task should be completed (ISO 8601). `null` if no due date is set.",
1916    )
1917    epic: str | None = Field(
1918        default=None,
1919        description="Free-form grouping label. `null` when the task is not in an epic.",
1920    )
1921    id: str = Field(..., description="Task ID (`tsk_...`).")
1922    is_blocked: bool | None = Field(
1923        default=None,
1924        description="`true` while at least one blocking task is not yet done. Informational only a blocked task can still change status and derived at read time, so the task un-blocks automatically when its last open blocker completes. Computed on list/show reads; create/update responses report `false` until the next read.",
1925    )
1926    links: dict[str, Any] | None = Field(
1927        default=None,
1928        description="Key-value map of named URLs or references associated with the task. Returns an empty object when no links have been set.",
1929    )
1930    metadata: dict[str, Any] | None = Field(
1931        default=None,
1932        description="Arbitrary key-value map of application-specific data stored alongside the task. Returns an empty object when no metadata has been set.",
1933    )
1934    name: str = Field(..., description="Human-readable title of the task.")
1935    org: str | None = Field(
1936        default=None,
1937        description="ID of the organization this task belongs to (`org_...`). `null` for tasks outside an org context.",
1938    )
1939    owner_actor: TeamTaskReadyResponseDataItemTaskOwnerActor | None = Field(
1940        default=None,
1941        description="Resolved owner details including `id`, `name`, `alias`, and `profile_picture`. `null` if the task is unassigned or the owner cannot be resolved (e.g. assigned agent was deleted).",
1942    )
1943    owner_agent: str | None = Field(
1944        default=None,
1945        description="ID of the agent assigned as owner (`agi_...`). `null` if the owner is a human user, the task is unassigned, or the assigned agent was deleted.",
1946    )
1947    owner_user: str | None = Field(
1948        default=None,
1949        description="ID of the user assigned as owner (`usr_...`). `null` if the owner is an agent, the task is unassigned, or the assigned agent was deleted.",
1950    )
1951    parent: str | None = Field(
1952        default=None,
1953        description="ID of the parent task when this task is a subtask (`tsk_...`). `null` for top-level tasks. Subtasks nest exactly one level.",
1954    )
1955    priority: int | None = Field(
1956        default=None,
1957        description="Priority level of the task from `0` (highest) to `4` (lowest). Defaults to `2` (medium) when not explicitly set.",
1958    )
1959    sandbox: str | None = Field(
1960        default=None,
1961        description="ID of the developer sandbox this task is scoped to (`dsb_...`). `null` for tasks outside a sandbox environment.",
1962    )
1963    source_id: str | None = Field(
1964        default=None,
1965        description="Source object identity (for example `ArchAstro/firstlanding`). `null` when the task has no source.",
1966    )
1967    source_scope: str | None = Field(
1968        default=None,
1969        description="Container of the work this task is about (for example `github.com`). `null` when the task has no source. Set together with `source_type` and `source_id`.",
1970    )
1971    source_type: str | None = Field(
1972        default=None,
1973        description="Kind of source object (for example `repository`). `null` when the task has no source.",
1974    )
1975    status: str = Field(
1976        ...,
1977        description='Current status of the task. One of `"open"`, `"in_progress"`, or `"done"`.',
1978    )
1979    subtasks_count: int | None = Field(
1980        default=None,
1981        description="Number of subtasks under this task. Computed on list/show reads; create/update responses may report 0 until the next read. Always 0 for subtasks.",
1982    )
1983    tags: list[str] | None = Field(
1984        default=None,
1985        description="Labels for grouping and filtering, stored lowercase and de-duplicated. Empty array when untagged.",
1986    )
1987    team: str | None = Field(
1988        default=None,
1989        description="ID of the team that owns this task (`tem_...`). `null` if the task is not scoped to a team.",
1990    )
1991    thread: str | None = Field(
1992        default=None,
1993        description="ID of the thread this task is bound to (`thr_...`) the conversation it was filed from, or the thread passed at creation. `null` for tasks not tied to a thread.",
1994    )
1995    updated_at: datetime | None = Field(
1996        default=None, description="When the task was last modified (ISO 8601)."
1997    )
1998    user: str | None = Field(
1999        default=None,
2000        description="ID of the user that owns this task (`usr_...`). `null` if the task is scoped to a team.",
2001    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
agent: str | None = None

ID of the agent that owns this task (agi_...). null if the task is scoped to a team or user.

blocked_by_count: int | None = None

Number of tasks marked as blocking this task, whether or not they are done (see GET /tasks/{task}/blockers). Computed on list/show reads; create/update responses may lag one read behind.

closed_at: datetime.datetime | None = None

When the task was marked as done or otherwise closed (ISO 8601). null if the task is still open.

comments_count: int | None = None

Total number of comments posted on this task.

created_at: datetime.datetime | None = None

When the task was created (ISO 8601).

created_by_actor: TeamTaskReadyResponseDataItemTaskCreatedByActor | None = None

Resolved creator details including id, name, alias, and profile_picture. null if no creator is set or the creator cannot be resolved (e.g. creating agent was deleted).

created_by_agent: str | None = None

ID of the agent that created this task (agi_...). null if the task was created by a human user, or if the creating agent was later deleted.

created_by_user: str | None = None

ID of the user who created this task (usr_...). null if the task was created by an agent, or if creator provenance was cleared after the creator was deleted.

current_lease: TeamTaskReadyResponseDataItemTaskCurrentLease | None = None

Viewer-safe live coding-session lease summary. null when the task is unleased or the projected lease has expired. Fencing identifiers are never included.

description: str | None = None

Long-form description or notes for the task. null if no description has been provided.

due_date: datetime.datetime | None = None

Date and time by which the task should be completed (ISO 8601). null if no due date is set.

epic: str | None = None

Free-form grouping label. null when the task is not in an epic.

id: str = PydanticUndefined

Task ID (tsk_...).

is_blocked: bool | None = None

true while at least one blocking task is not yet done. Informational only a blocked task can still change status and derived at read time, so the task un-blocks automatically when its last open blocker completes. Computed on list/show reads; create/update responses report false until the next read.

metadata: dict[str, typing.Any] | None = None

Arbitrary key-value map of application-specific data stored alongside the task. Returns an empty object when no metadata has been set.

name: str = PydanticUndefined

Human-readable title of the task.

org: str | None = None

ID of the organization this task belongs to (org_...). null for tasks outside an org context.

owner_actor: TeamTaskReadyResponseDataItemTaskOwnerActor | None = None

Resolved owner details including id, name, alias, and profile_picture. null if the task is unassigned or the owner cannot be resolved (e.g. assigned agent was deleted).

owner_agent: str | None = None

ID of the agent assigned as owner (agi_...). null if the owner is a human user, the task is unassigned, or the assigned agent was deleted.

owner_user: str | None = None

ID of the user assigned as owner (usr_...). null if the owner is an agent, the task is unassigned, or the assigned agent was deleted.

parent: str | None = None

ID of the parent task when this task is a subtask (tsk_...). null for top-level tasks. Subtasks nest exactly one level.

priority: int | None = None

Priority level of the task from 0 (highest) to 4 (lowest). Defaults to 2 (medium) when not explicitly set.

sandbox: str | None = None

ID of the developer sandbox this task is scoped to (dsb_...). null for tasks outside a sandbox environment.

source_id: str | None = None

Source object identity (for example ArchAstro/firstlanding). null when the task has no source.

source_scope: str | None = None

Container of the work this task is about (for example github.com). null when the task has no source. Set together with source_type and source_id.

source_type: str | None = None

Kind of source object (for example repository). null when the task has no source.

status: str = PydanticUndefined

Current status of the task. One of "open", "in_progress", or "done".

subtasks_count: int | None = None

Number of subtasks under this task. Computed on list/show reads; create/update responses may report 0 until the next read. Always 0 for subtasks.

tags: list[str] | None = None

Labels for grouping and filtering, stored lowercase and de-duplicated. Empty array when untagged.

team: str | None = None

ID of the team that owns this task (tem_...). null if the task is not scoped to a team.

thread: str | None = None

ID of the thread this task is bound to (thr_...) the conversation it was filed from, or the thread passed at creation. null for tasks not tied to a thread.

updated_at: datetime.datetime | None = None

When the task was last modified (ISO 8601).

user: str | None = None

ID of the user that owns this task (usr_...). null if the task is scoped to a team.

class TeamTaskReadyResponseDataItem(pydantic.main.BaseModel):
2004class TeamTaskReadyResponseDataItem(BaseModel):
2005    readiness: Literal["ready", "blocked", "leased"] = Field(
2006        ..., description="One of `ready`, `blocked`, or `leased`."
2007    )
2008    reason: Literal["open_blockers", "active_lease"] | None = Field(
2009        default=None,
2010        description="Stable exclusion reason: `open_blockers` or `active_lease`; omitted when ready.",
2011    )
2012    task: TeamTaskReadyResponseDataItemTask = Field(
2013        ..., description="The task evaluated for readiness."
2014    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
readiness: Literal['ready', 'blocked', 'leased'] = PydanticUndefined

One of ready, blocked, or leased.

reason: Optional[Literal['open_blockers', 'active_lease']] = None

Stable exclusion reason: open_blockers or active_lease; omitted when ready.

task: TeamTaskReadyResponseDataItemTask = PydanticUndefined

The task evaluated for readiness.

class TeamTaskReadyResponse(pydantic.main.BaseModel):
2017class TeamTaskReadyResponse(BaseModel):
2018    """
2019    Successful response
2020    """
2021
2022    after_cursor: str | None = None
2023    authoritative: bool = Field(
2024        ...,
2025        description="Always false because projections can lag writes and a later claim can race this read.",
2026    )
2027    before_cursor: str | None = None
2028    data: list[TeamTaskReadyResponseDataItem]
2029    has_more: bool

Successful response

after_cursor: str | None = None
authoritative: bool = PydanticUndefined

Always false because projections can lag writes and a later claim can race this read.

before_cursor: str | None = None
data: list[TeamTaskReadyResponseDataItem] = PydanticUndefined
has_more: bool = PydanticUndefined
class TeamTaskSearchResponseDataItemCreatedByActorProfilePicture(pydantic.main.BaseModel):
2032class TeamTaskSearchResponseDataItemCreatedByActorProfilePicture(BaseModel):
2033    file: str | None = Field(
2034        default=None,
2035        description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.",
2036    )
2037    height: int | None = Field(
2038        default=None, description="Height of the image in pixels. `null` if not known."
2039    )
2040    media: str | None = Field(
2041        default=None,
2042        description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.",
2043    )
2044    mime_type: str | None = Field(
2045        default=None,
2046        description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.',
2047    )
2048    refresh_url: str | None = Field(
2049        default=None,
2050        description="Endpoint URL you can call to obtain a fresh signed `url` when the current one has expired. `null` if the URL does not require refreshing.",
2051    )
2052    url: str | None = Field(
2053        default=None,
2054        description="Signed or public URL for downloading the image. May be time-limited; use `refresh_url` to obtain a new URL when this one expires.",
2055    )
2056    width: int | None = Field(
2057        default=None, description="Width of the image in pixels. `null` if not known."
2058    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
file: str | None = None

ID of the underlying storage file (fil_...). null when the image is not backed by a platform storage file.

height: int | None = None

Height of the image in pixels. null if not known.

media: str | None = None

ID of the associated media record (med_...). null when the image is not linked to a media entity.

mime_type: str | None = None

MIME type of the image, e.g. "image/png" or "image/jpeg". null if not known.

refresh_url: str | None = None

Endpoint URL you can call to obtain a fresh signed url when the current one has expired. null if the URL does not require refreshing.

url: str | None = None

Signed or public URL for downloading the image. May be time-limited; use refresh_url to obtain a new URL when this one expires.

width: int | None = None

Width of the image in pixels. null if not known.

class TeamTaskSearchResponseDataItemCreatedByActor(pydantic.main.BaseModel):
2061class TeamTaskSearchResponseDataItemCreatedByActor(BaseModel):
2062    alias: str | None = Field(
2063        default=None,
2064        description="Short handle or alias for the actor, used as an alternate display identifier. `null` if not configured.",
2065    )
2066    id: str | None = Field(
2067        default=None,
2068        description='Composite actor identifier. Format is `"user-<usr_...>"` for human users or `"agent-<agi_...>"` for agents.',
2069    )
2070    name: str | None = Field(
2071        default=None,
2072        description="Display name of the actor shown in the UI. `null` if no name is set.",
2073    )
2074    profile_picture: TeamTaskSearchResponseDataItemCreatedByActorProfilePicture | None = Field(
2075        default=None,
2076        description="Profile picture for the actor. `null` if the actor has no profile picture.",
2077    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
alias: str | None = None

Short handle or alias for the actor, used as an alternate display identifier. null if not configured.

id: str | None = None

Composite actor identifier. Format is "user-<usr_...>" for human users or "agent-<agi_...>" for agents.

name: str | None = None

Display name of the actor shown in the UI. null if no name is set.

Profile picture for the actor. null if the actor has no profile picture.

class TeamTaskSearchResponseDataItemCurrentLease(pydantic.main.BaseModel):
2080class TeamTaskSearchResponseDataItemCurrentLease(BaseModel):
2081    expires_at: datetime = Field(
2082        ..., description="Server-calculated lease expiry in ISO 8601 format."
2083    )
2084    harness: str = Field(..., description="Bounded harness identifier for the coding session.")
2085    session_name: str = Field(
2086        ..., description="Display name supplied by the coding session that holds the lease."
2087    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
expires_at: datetime.datetime = PydanticUndefined

Server-calculated lease expiry in ISO 8601 format.

harness: str = PydanticUndefined

Bounded harness identifier for the coding session.

session_name: str = PydanticUndefined

Display name supplied by the coding session that holds the lease.

class TeamTaskSearchResponseDataItemOwnerActorProfilePicture(pydantic.main.BaseModel):
2090class TeamTaskSearchResponseDataItemOwnerActorProfilePicture(BaseModel):
2091    file: str | None = Field(
2092        default=None,
2093        description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.",
2094    )
2095    height: int | None = Field(
2096        default=None, description="Height of the image in pixels. `null` if not known."
2097    )
2098    media: str | None = Field(
2099        default=None,
2100        description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.",
2101    )
2102    mime_type: str | None = Field(
2103        default=None,
2104        description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.',
2105    )
2106    refresh_url: str | None = Field(
2107        default=None,
2108        description="Endpoint URL you can call to obtain a fresh signed `url` when the current one has expired. `null` if the URL does not require refreshing.",
2109    )
2110    url: str | None = Field(
2111        default=None,
2112        description="Signed or public URL for downloading the image. May be time-limited; use `refresh_url` to obtain a new URL when this one expires.",
2113    )
2114    width: int | None = Field(
2115        default=None, description="Width of the image in pixels. `null` if not known."
2116    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
file: str | None = None

ID of the underlying storage file (fil_...). null when the image is not backed by a platform storage file.

height: int | None = None

Height of the image in pixels. null if not known.

media: str | None = None

ID of the associated media record (med_...). null when the image is not linked to a media entity.

mime_type: str | None = None

MIME type of the image, e.g. "image/png" or "image/jpeg". null if not known.

refresh_url: str | None = None

Endpoint URL you can call to obtain a fresh signed url when the current one has expired. null if the URL does not require refreshing.

url: str | None = None

Signed or public URL for downloading the image. May be time-limited; use refresh_url to obtain a new URL when this one expires.

width: int | None = None

Width of the image in pixels. null if not known.

class TeamTaskSearchResponseDataItemOwnerActor(pydantic.main.BaseModel):
2119class TeamTaskSearchResponseDataItemOwnerActor(BaseModel):
2120    alias: str | None = Field(
2121        default=None,
2122        description="Short handle or alias for the actor, used as an alternate display identifier. `null` if not configured.",
2123    )
2124    id: str | None = Field(
2125        default=None,
2126        description='Composite actor identifier. Format is `"user-<usr_...>"` for human users or `"agent-<agi_...>"` for agents.',
2127    )
2128    name: str | None = Field(
2129        default=None,
2130        description="Display name of the actor shown in the UI. `null` if no name is set.",
2131    )
2132    profile_picture: TeamTaskSearchResponseDataItemOwnerActorProfilePicture | None = Field(
2133        default=None,
2134        description="Profile picture for the actor. `null` if the actor has no profile picture.",
2135    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
alias: str | None = None

Short handle or alias for the actor, used as an alternate display identifier. null if not configured.

id: str | None = None

Composite actor identifier. Format is "user-<usr_...>" for human users or "agent-<agi_...>" for agents.

name: str | None = None

Display name of the actor shown in the UI. null if no name is set.

Profile picture for the actor. null if the actor has no profile picture.

class TeamTaskSearchResponseDataItem(pydantic.main.BaseModel):
2138class TeamTaskSearchResponseDataItem(BaseModel):
2139    agent: str | None = Field(
2140        default=None,
2141        description="ID of the agent that owns this task (`agi_...`). `null` if the task is scoped to a team or user.",
2142    )
2143    blocked_by_count: int | None = Field(
2144        default=None,
2145        description="Number of tasks marked as blocking this task, whether or not they are done (see `GET /tasks/{task}/blockers`). Computed on list/show reads; create/update responses may lag one read behind.",
2146    )
2147    closed_at: datetime | None = Field(
2148        default=None,
2149        description="When the task was marked as done or otherwise closed (ISO 8601). `null` if the task is still open.",
2150    )
2151    comments_count: int | None = Field(
2152        default=None, description="Total number of comments posted on this task."
2153    )
2154    created_at: datetime | None = Field(
2155        default=None, description="When the task was created (ISO 8601)."
2156    )
2157    created_by_actor: TeamTaskSearchResponseDataItemCreatedByActor | None = Field(
2158        default=None,
2159        description="Resolved creator details including `id`, `name`, `alias`, and `profile_picture`. `null` if no creator is set or the creator cannot be resolved (e.g. creating agent was deleted).",
2160    )
2161    created_by_agent: str | None = Field(
2162        default=None,
2163        description="ID of the agent that created this task (`agi_...`). `null` if the task was created by a human user, or if the creating agent was later deleted.",
2164    )
2165    created_by_user: str | None = Field(
2166        default=None,
2167        description="ID of the user who created this task (`usr_...`). `null` if the task was created by an agent, or if creator provenance was cleared after the creator was deleted.",
2168    )
2169    current_lease: TeamTaskSearchResponseDataItemCurrentLease | None = Field(
2170        default=None,
2171        description="Viewer-safe live coding-session lease summary. `null` when the task is unleased or the projected lease has expired. Fencing identifiers are never included.",
2172    )
2173    description: str | None = Field(
2174        default=None,
2175        description="Long-form description or notes for the task. `null` if no description has been provided.",
2176    )
2177    due_date: datetime | None = Field(
2178        default=None,
2179        description="Date and time by which the task should be completed (ISO 8601). `null` if no due date is set.",
2180    )
2181    epic: str | None = Field(
2182        default=None,
2183        description="Free-form grouping label. `null` when the task is not in an epic.",
2184    )
2185    id: str = Field(..., description="Task ID (`tsk_...`).")
2186    is_blocked: bool | None = Field(
2187        default=None,
2188        description="`true` while at least one blocking task is not yet done. Informational only a blocked task can still change status and derived at read time, so the task un-blocks automatically when its last open blocker completes. Computed on list/show reads; create/update responses report `false` until the next read.",
2189    )
2190    links: dict[str, Any] | None = Field(
2191        default=None,
2192        description="Key-value map of named URLs or references associated with the task. Returns an empty object when no links have been set.",
2193    )
2194    metadata: dict[str, Any] | None = Field(
2195        default=None,
2196        description="Arbitrary key-value map of application-specific data stored alongside the task. Returns an empty object when no metadata has been set.",
2197    )
2198    name: str = Field(..., description="Human-readable title of the task.")
2199    org: str | None = Field(
2200        default=None,
2201        description="ID of the organization this task belongs to (`org_...`). `null` for tasks outside an org context.",
2202    )
2203    owner_actor: TeamTaskSearchResponseDataItemOwnerActor | None = Field(
2204        default=None,
2205        description="Resolved owner details including `id`, `name`, `alias`, and `profile_picture`. `null` if the task is unassigned or the owner cannot be resolved (e.g. assigned agent was deleted).",
2206    )
2207    owner_agent: str | None = Field(
2208        default=None,
2209        description="ID of the agent assigned as owner (`agi_...`). `null` if the owner is a human user, the task is unassigned, or the assigned agent was deleted.",
2210    )
2211    owner_user: str | None = Field(
2212        default=None,
2213        description="ID of the user assigned as owner (`usr_...`). `null` if the owner is an agent, the task is unassigned, or the assigned agent was deleted.",
2214    )
2215    parent: str | None = Field(
2216        default=None,
2217        description="ID of the parent task when this task is a subtask (`tsk_...`). `null` for top-level tasks. Subtasks nest exactly one level.",
2218    )
2219    priority: int | None = Field(
2220        default=None,
2221        description="Priority level of the task from `0` (highest) to `4` (lowest). Defaults to `2` (medium) when not explicitly set.",
2222    )
2223    sandbox: str | None = Field(
2224        default=None,
2225        description="ID of the developer sandbox this task is scoped to (`dsb_...`). `null` for tasks outside a sandbox environment.",
2226    )
2227    source_id: str | None = Field(
2228        default=None,
2229        description="Source object identity (for example `ArchAstro/firstlanding`). `null` when the task has no source.",
2230    )
2231    source_scope: str | None = Field(
2232        default=None,
2233        description="Container of the work this task is about (for example `github.com`). `null` when the task has no source. Set together with `source_type` and `source_id`.",
2234    )
2235    source_type: str | None = Field(
2236        default=None,
2237        description="Kind of source object (for example `repository`). `null` when the task has no source.",
2238    )
2239    status: str = Field(
2240        ...,
2241        description='Current status of the task. One of `"open"`, `"in_progress"`, or `"done"`.',
2242    )
2243    subtasks_count: int | None = Field(
2244        default=None,
2245        description="Number of subtasks under this task. Computed on list/show reads; create/update responses may report 0 until the next read. Always 0 for subtasks.",
2246    )
2247    tags: list[str] | None = Field(
2248        default=None,
2249        description="Labels for grouping and filtering, stored lowercase and de-duplicated. Empty array when untagged.",
2250    )
2251    team: str | None = Field(
2252        default=None,
2253        description="ID of the team that owns this task (`tem_...`). `null` if the task is not scoped to a team.",
2254    )
2255    thread: str | None = Field(
2256        default=None,
2257        description="ID of the thread this task is bound to (`thr_...`) the conversation it was filed from, or the thread passed at creation. `null` for tasks not tied to a thread.",
2258    )
2259    updated_at: datetime | None = Field(
2260        default=None, description="When the task was last modified (ISO 8601)."
2261    )
2262    user: str | None = Field(
2263        default=None,
2264        description="ID of the user that owns this task (`usr_...`). `null` if the task is scoped to a team.",
2265    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
agent: str | None = None

ID of the agent that owns this task (agi_...). null if the task is scoped to a team or user.

blocked_by_count: int | None = None

Number of tasks marked as blocking this task, whether or not they are done (see GET /tasks/{task}/blockers). Computed on list/show reads; create/update responses may lag one read behind.

closed_at: datetime.datetime | None = None

When the task was marked as done or otherwise closed (ISO 8601). null if the task is still open.

comments_count: int | None = None

Total number of comments posted on this task.

created_at: datetime.datetime | None = None

When the task was created (ISO 8601).

created_by_actor: TeamTaskSearchResponseDataItemCreatedByActor | None = None

Resolved creator details including id, name, alias, and profile_picture. null if no creator is set or the creator cannot be resolved (e.g. creating agent was deleted).

created_by_agent: str | None = None

ID of the agent that created this task (agi_...). null if the task was created by a human user, or if the creating agent was later deleted.

created_by_user: str | None = None

ID of the user who created this task (usr_...). null if the task was created by an agent, or if creator provenance was cleared after the creator was deleted.

current_lease: TeamTaskSearchResponseDataItemCurrentLease | None = None

Viewer-safe live coding-session lease summary. null when the task is unleased or the projected lease has expired. Fencing identifiers are never included.

description: str | None = None

Long-form description or notes for the task. null if no description has been provided.

due_date: datetime.datetime | None = None

Date and time by which the task should be completed (ISO 8601). null if no due date is set.

epic: str | None = None

Free-form grouping label. null when the task is not in an epic.

id: str = PydanticUndefined

Task ID (tsk_...).

is_blocked: bool | None = None

true while at least one blocking task is not yet done. Informational only a blocked task can still change status and derived at read time, so the task un-blocks automatically when its last open blocker completes. Computed on list/show reads; create/update responses report false until the next read.

metadata: dict[str, typing.Any] | None = None

Arbitrary key-value map of application-specific data stored alongside the task. Returns an empty object when no metadata has been set.

name: str = PydanticUndefined

Human-readable title of the task.

org: str | None = None

ID of the organization this task belongs to (org_...). null for tasks outside an org context.

owner_actor: TeamTaskSearchResponseDataItemOwnerActor | None = None

Resolved owner details including id, name, alias, and profile_picture. null if the task is unassigned or the owner cannot be resolved (e.g. assigned agent was deleted).

owner_agent: str | None = None

ID of the agent assigned as owner (agi_...). null if the owner is a human user, the task is unassigned, or the assigned agent was deleted.

owner_user: str | None = None

ID of the user assigned as owner (usr_...). null if the owner is an agent, the task is unassigned, or the assigned agent was deleted.

parent: str | None = None

ID of the parent task when this task is a subtask (tsk_...). null for top-level tasks. Subtasks nest exactly one level.

priority: int | None = None

Priority level of the task from 0 (highest) to 4 (lowest). Defaults to 2 (medium) when not explicitly set.

sandbox: str | None = None

ID of the developer sandbox this task is scoped to (dsb_...). null for tasks outside a sandbox environment.

source_id: str | None = None

Source object identity (for example ArchAstro/firstlanding). null when the task has no source.

source_scope: str | None = None

Container of the work this task is about (for example github.com). null when the task has no source. Set together with source_type and source_id.

source_type: str | None = None

Kind of source object (for example repository). null when the task has no source.

status: str = PydanticUndefined

Current status of the task. One of "open", "in_progress", or "done".

subtasks_count: int | None = None

Number of subtasks under this task. Computed on list/show reads; create/update responses may report 0 until the next read. Always 0 for subtasks.

tags: list[str] | None = None

Labels for grouping and filtering, stored lowercase and de-duplicated. Empty array when untagged.

team: str | None = None

ID of the team that owns this task (tem_...). null if the task is not scoped to a team.

thread: str | None = None

ID of the thread this task is bound to (thr_...) the conversation it was filed from, or the thread passed at creation. null for tasks not tied to a thread.

updated_at: datetime.datetime | None = None

When the task was last modified (ISO 8601).

user: str | None = None

ID of the user that owns this task (usr_...). null if the task is scoped to a team.

class TeamTaskSearchResponse(pydantic.main.BaseModel):
2268class TeamTaskSearchResponse(BaseModel):
2269    """
2270    Successful response
2271    """
2272
2273    after_cursor: str | None = None
2274    before_cursor: str | None = None
2275    data: list[TeamTaskSearchResponseDataItem] = Field(
2276        ..., description="Array of task objects matching the query and filters."
2277    )
2278    has_more: bool
2279    query: str

Successful response

after_cursor: str | None = None
before_cursor: str | None = None
data: list[TeamTaskSearchResponseDataItem] = PydanticUndefined

Array of task objects matching the query and filters.

has_more: bool = PydanticUndefined
query: str = PydanticUndefined
class TeamThreadListResponseDataItemParentMessageAclAddItem(pydantic.main.BaseModel):
2282class TeamThreadListResponseDataItemParentMessageAclAddItem(BaseModel):
2283    actions: list[str] = Field(
2284        ...,
2285        description='Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.',
2286    )
2287    principal: str | None = Field(
2288        default=None,
2289        description='The identifier of the principal. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`; omit entirely when `principal_type` is `"everyone"`.',
2290    )
2291    principal_type: str = Field(
2292        ...,
2293        description='The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.',
2294    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
actions: list[str] = PydanticUndefined

Array of action strings the principal is permitted to perform, e.g. ["read", "write"]. Must contain at least one entry.

principal: str | None = None

The identifier of the principal. A string ID for "user", "team", "org", and "agent" types; one of "admin", "member", or "viewer" for "org_role"; omit entirely when principal_type is "everyone".

principal_type: str = PydanticUndefined

The kind of principal receiving the grant. One of "user", "team", "org", "org_role", "agent", or "everyone".

class TeamThreadListResponseDataItemParentMessageAclGrantsItem(pydantic.main.BaseModel):
2297class TeamThreadListResponseDataItemParentMessageAclGrantsItem(BaseModel):
2298    actions: list[str] = Field(
2299        ...,
2300        description='Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.',
2301    )
2302    principal: str | None = Field(
2303        default=None,
2304        description='The identifier of the principal. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`; omit entirely when `principal_type` is `"everyone"`.',
2305    )
2306    principal_type: str = Field(
2307        ...,
2308        description='The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.',
2309    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
actions: list[str] = PydanticUndefined

Array of action strings the principal is permitted to perform, e.g. ["read", "write"]. Must contain at least one entry.

principal: str | None = None

The identifier of the principal. A string ID for "user", "team", "org", and "agent" types; one of "admin", "member", or "viewer" for "org_role"; omit entirely when principal_type is "everyone".

principal_type: str = PydanticUndefined

The kind of principal receiving the grant. One of "user", "team", "org", "org_role", "agent", or "everyone".

class TeamThreadListResponseDataItemParentMessageAclRemoveItem(pydantic.main.BaseModel):
2312class TeamThreadListResponseDataItemParentMessageAclRemoveItem(BaseModel):
2313    principal: str | None = Field(
2314        default=None,
2315        description='The identifier of the principal to remove. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`. Omit when `principal_type` is `"everyone"`.',
2316    )
2317    principal_type: str = Field(
2318        ...,
2319        description='The kind of principal to remove. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.',
2320    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
principal: str | None = None

The identifier of the principal to remove. A string ID for "user", "team", "org", and "agent" types; one of "admin", "member", or "viewer" for "org_role". Omit when principal_type is "everyone".

principal_type: str = PydanticUndefined

The kind of principal to remove. One of "user", "team", "org", "org_role", "agent", or "everyone".

class TeamThreadListResponseDataItemParentMessageAcl(pydantic.main.BaseModel):
2323class TeamThreadListResponseDataItemParentMessageAcl(BaseModel):
2324    add: list[TeamThreadListResponseDataItemParentMessageAclAddItem] | None = Field(
2325        default=None,
2326        description="Patch mode: grants to add or merge into the existing list. Cannot be combined with `grants`.",
2327    )
2328    grants: list[TeamThreadListResponseDataItemParentMessageAclGrantsItem] | None = Field(
2329        default=None,
2330        description="Replace mode: the complete new list of grants that replaces all existing entries. Send an empty array (`[]`) to clear all grants. Cannot be combined with `add` or `remove`.",
2331    )
2332    remove: list[TeamThreadListResponseDataItemParentMessageAclRemoveItem] | None = Field(
2333        default=None,
2334        description="Patch mode: principals whose grants should be removed from the existing list. Cannot be combined with `grants`.",
2335    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.

Patch mode: grants to add or merge into the existing list. Cannot be combined with grants.

Replace mode: the complete new list of grants that replaces all existing entries. Send an empty array ([]) to clear all grants. Cannot be combined with add or remove.

Patch mode: principals whose grants should be removed from the existing list. Cannot be combined with grants.

class TeamThreadListResponseDataItemParentMessageActorsItemProfilePicture(pydantic.main.BaseModel):
2338class TeamThreadListResponseDataItemParentMessageActorsItemProfilePicture(BaseModel):
2339    file: str | None = Field(
2340        default=None,
2341        description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.",
2342    )
2343    height: int | None = Field(
2344        default=None, description="Height of the image in pixels. `null` if not known."
2345    )
2346    media: str | None = Field(
2347        default=None,
2348        description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.",
2349    )
2350    mime_type: str | None = Field(
2351        default=None,
2352        description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.',
2353    )
2354    refresh_url: str | None = Field(
2355        default=None,
2356        description="Endpoint URL you can call to obtain a fresh signed `url` when the current one has expired. `null` if the URL does not require refreshing.",
2357    )
2358    url: str | None = Field(
2359        default=None,
2360        description="Signed or public URL for downloading the image. May be time-limited; use `refresh_url` to obtain a new URL when this one expires.",
2361    )
2362    width: int | None = Field(
2363        default=None, description="Width of the image in pixels. `null` if not known."
2364    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
file: str | None = None

ID of the underlying storage file (fil_...). null when the image is not backed by a platform storage file.

height: int | None = None

Height of the image in pixels. null if not known.

media: str | None = None

ID of the associated media record (med_...). null when the image is not linked to a media entity.

mime_type: str | None = None

MIME type of the image, e.g. "image/png" or "image/jpeg". null if not known.

refresh_url: str | None = None

Endpoint URL you can call to obtain a fresh signed url when the current one has expired. null if the URL does not require refreshing.

url: str | None = None

Signed or public URL for downloading the image. May be time-limited; use refresh_url to obtain a new URL when this one expires.

width: int | None = None

Width of the image in pixels. null if not known.

class TeamThreadListResponseDataItemParentMessageActorsItem(pydantic.main.BaseModel):
2367class TeamThreadListResponseDataItemParentMessageActorsItem(BaseModel):
2368    alias: str | None = Field(
2369        default=None,
2370        description="Short handle or alias for the actor, used as an alternate display identifier. `null` if not configured.",
2371    )
2372    id: str | None = Field(
2373        default=None,
2374        description='Composite actor identifier. Format is `"user-<usr_...>"` for human users or `"agent-<agi_...>"` for agents.',
2375    )
2376    name: str | None = Field(
2377        default=None,
2378        description="Display name of the actor shown in the UI. `null` if no name is set.",
2379    )
2380    profile_picture: TeamThreadListResponseDataItemParentMessageActorsItemProfilePicture | None = (
2381        Field(
2382            default=None,
2383            description="Profile picture for the actor. `null` if the actor has no profile picture.",
2384        )
2385    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
alias: str | None = None

Short handle or alias for the actor, used as an alternate display identifier. null if not configured.

id: str | None = None

Composite actor identifier. Format is "user-<usr_...>" for human users or "agent-<agi_...>" for agents.

name: str | None = None

Display name of the actor shown in the UI. null if no name is set.

Profile picture for the actor. null if the actor has no profile picture.

class TeamThreadListResponseDataItemParentMessageAttachmentsItemImageSource(pydantic.main.BaseModel):
2388class TeamThreadListResponseDataItemParentMessageAttachmentsItemImageSource(BaseModel):
2389    file: str | None = Field(
2390        default=None,
2391        description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.",
2392    )
2393    height: int | None = Field(
2394        default=None, description="Height of the image in pixels. `null` if not known."
2395    )
2396    media: str | None = Field(
2397        default=None,
2398        description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.",
2399    )
2400    mime_type: str | None = Field(
2401        default=None,
2402        description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.',
2403    )
2404    refresh_url: str | None = Field(
2405        default=None,
2406        description="Endpoint URL you can call to obtain a fresh signed `url` when the current one has expired. `null` if the URL does not require refreshing.",
2407    )
2408    url: str | None = Field(
2409        default=None,
2410        description="Signed or public URL for downloading the image. May be time-limited; use `refresh_url` to obtain a new URL when this one expires.",
2411    )
2412    width: int | None = Field(
2413        default=None, description="Width of the image in pixels. `null` if not known."
2414    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
file: str | None = None

ID of the underlying storage file (fil_...). null when the image is not backed by a platform storage file.

height: int | None = None

Height of the image in pixels. null if not known.

media: str | None = None

ID of the associated media record (med_...). null when the image is not linked to a media entity.

mime_type: str | None = None

MIME type of the image, e.g. "image/png" or "image/jpeg". null if not known.

refresh_url: str | None = None

Endpoint URL you can call to obtain a fresh signed url when the current one has expired. null if the URL does not require refreshing.

url: str | None = None

Signed or public URL for downloading the image. May be time-limited; use refresh_url to obtain a new URL when this one expires.

width: int | None = None

Width of the image in pixels. null if not known.

class TeamThreadListResponseDataItemParentMessageAttachmentsItemVariantsItemImageSource(pydantic.main.BaseModel):
2417class TeamThreadListResponseDataItemParentMessageAttachmentsItemVariantsItemImageSource(BaseModel):
2418    file: str | None = Field(
2419        default=None,
2420        description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.",
2421    )
2422    height: int | None = Field(
2423        default=None, description="Height of the image in pixels. `null` if not known."
2424    )
2425    media: str | None = Field(
2426        default=None,
2427        description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.",
2428    )
2429    mime_type: str | None = Field(
2430        default=None,
2431        description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.',
2432    )
2433    refresh_url: str | None = Field(
2434        default=None,
2435        description="Endpoint URL you can call to obtain a fresh signed `url` when the current one has expired. `null` if the URL does not require refreshing.",
2436    )
2437    url: str | None = Field(
2438        default=None,
2439        description="Signed or public URL for downloading the image. May be time-limited; use `refresh_url` to obtain a new URL when this one expires.",
2440    )
2441    width: int | None = Field(
2442        default=None, description="Width of the image in pixels. `null` if not known."
2443    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
file: str | None = None

ID of the underlying storage file (fil_...). null when the image is not backed by a platform storage file.

height: int | None = None

Height of the image in pixels. null if not known.

media: str | None = None

ID of the associated media record (med_...). null when the image is not linked to a media entity.

mime_type: str | None = None

MIME type of the image, e.g. "image/png" or "image/jpeg". null if not known.

refresh_url: str | None = None

Endpoint URL you can call to obtain a fresh signed url when the current one has expired. null if the URL does not require refreshing.

url: str | None = None

Signed or public URL for downloading the image. May be time-limited; use refresh_url to obtain a new URL when this one expires.

width: int | None = None

Width of the image in pixels. null if not known.

class TeamThreadListResponseDataItemParentMessageAttachmentsItemVariantsItem(pydantic.main.BaseModel):
2446class TeamThreadListResponseDataItemParentMessageAttachmentsItemVariantsItem(BaseModel):
2447    content_type: str | None = Field(
2448        default=None,
2449        description='MIME type of this variant\'s file (e.g., `"image/jpeg"`, `"video/mp4"`). `null` if the file is not loaded.',
2450    )
2451    created_at: datetime | None = Field(
2452        default=None, description="When this variant was created (ISO 8601)."
2453    )
2454    file: str | None = Field(
2455        default=None,
2456        description="ID of the underlying storage file that backs this variant (`fil_...`).",
2457    )
2458    filename: str | None = Field(
2459        default=None,
2460        description="Original filename of the uploaded file for this variant. `null` if the file is not loaded.",
2461    )
2462    height: int | None = Field(
2463        default=None, description="Height of this variant in pixels. `null` if not recorded."
2464    )
2465    id: str = Field(..., description="Media variant ID (`mvr_...`).")
2466    image_source: (
2467        TeamThreadListResponseDataItemParentMessageAttachmentsItemVariantsItemImageSource | None
2468    ) = Field(
2469        default=None,
2470        description="Resolved image delivery metadata for this variant, including dimensions and CDN URL. `null` for non-image content types.",
2471    )
2472    updated_at: datetime | None = Field(
2473        default=None, description="When this variant was last updated (ISO 8601)."
2474    )
2475    url: str | None = Field(
2476        default=None,
2477        description="Signed download URL for this variant, resolved at request time. `null` if the file is unavailable.",
2478    )
2479    variant_key: str | None = Field(
2480        default=None,
2481        description='Identifier for this variant\'s processing tier. Common values include `"original"` (the unmodified upload) and `"thumbnail"` (a resized preview).',
2482    )
2483    width: int | None = Field(
2484        default=None, description="Width of this variant in pixels. `null` if not recorded."
2485    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
content_type: str | None = None

MIME type of this variant's file (e.g., "image/jpeg", "video/mp4"). null if the file is not loaded.

created_at: datetime.datetime | None = None

When this variant was created (ISO 8601).

file: str | None = None

ID of the underlying storage file that backs this variant (fil_...).

filename: str | None = None

Original filename of the uploaded file for this variant. null if the file is not loaded.

height: int | None = None

Height of this variant in pixels. null if not recorded.

id: str = PydanticUndefined

Media variant ID (mvr_...).

Resolved image delivery metadata for this variant, including dimensions and CDN URL. null for non-image content types.

updated_at: datetime.datetime | None = None

When this variant was last updated (ISO 8601).

url: str | None = None

Signed download URL for this variant, resolved at request time. null if the file is unavailable.

variant_key: str | None = None

Identifier for this variant's processing tier. Common values include "original" (the unmodified upload) and "thumbnail" (a resized preview).

width: int | None = None

Width of this variant in pixels. null if not recorded.

class TeamThreadListResponseDataItemParentMessageAttachmentsItem(pydantic.main.BaseModel):
2488class TeamThreadListResponseDataItemParentMessageAttachmentsItem(BaseModel):
2489    content_type: str | None = Field(
2490        default=None,
2491        description='MIME type of the attached file, e.g. `"image/png"` or `"application/pdf"`. Present on `file`, `artifact`, and `media` types. `null` otherwise.',
2492    )
2493    description: str | None = Field(
2494        default=None,
2495        description="Short description. The page meta-description for `scraped_link`, the artifact description for `artifact`, and the task description for `task` types. `null` on other types.",
2496    )
2497    filename: str | None = Field(
2498        default=None,
2499        description='Original filename of the attached file, e.g. `"report.pdf"`. Present on `file`, `artifact`, and `media` types. `null` otherwise.',
2500    )
2501    height: int | None = Field(
2502        default=None,
2503        description="Height in pixels of the media item. Present on `media` type only. `null` otherwise.",
2504    )
2505    id: str = Field(..., description="Unique identifier for this attachment within the message.")
2506    image_height: int | None = Field(
2507        default=None,
2508        description="Height in pixels of the scraped preview image. Present on `scraped_link` type only. `null` otherwise.",
2509    )
2510    image_source: TeamThreadListResponseDataItemParentMessageAttachmentsItemImageSource | None = (
2511        Field(
2512            default=None,
2513            description="Image source metadata for inline rendering. Present on `file`, `scraped_link`, `artifact`, and `media` types when the content is an image. `null` otherwise.",
2514        )
2515    )
2516    image_url: str | None = Field(
2517        default=None,
2518        description="URL of the preview image extracted from the scraped page. Present on `scraped_link` type only. `null` otherwise.",
2519    )
2520    image_width: int | None = Field(
2521        default=None,
2522        description="Width in pixels of the scraped preview image. Present on `scraped_link` type only. `null` otherwise.",
2523    )
2524    media_type: str | None = Field(
2525        default=None,
2526        description='The media category, e.g. `"video"` or `"audio"`. Present on `media` type only; omitted otherwise.',
2527    )
2528    name: str | None = Field(
2529        default=None,
2530        description="Display name of the media item. Present on `media` type only. `null` otherwise.",
2531    )
2532    object: dict[str, Any] | None = Field(
2533        default=None,
2534        description="The full embedded object payload. For `task` type, contains the task record. For `action` type, contains the action definition. For `chart` type, contains the chart with its inline `spec`. Omitted on other types.",
2535    )
2536    title: str | None = Field(
2537        default=None,
2538        description="Display title. The page title for `scraped_link`, the artifact name for `artifact`, and the task title for `task` types. `null` on other types.",
2539    )
2540    type: str = Field(
2541        ...,
2542        description='The attachment type. One of `"file"`, `"scraped_link"`, `"artifact"`, `"task"`, `"media"`, `"action"`, or `"chart"`. Determines which additional fields are present.',
2543    )
2544    url: str | None = Field(
2545        default=None,
2546        description="URL to access the resource. A signed download URL for `file` and `artifact` types; the original URL for `scraped_link`; a media playback URL for `media`. `null` on `task` and `action` types.",
2547    )
2548    variants: (
2549        list[TeamThreadListResponseDataItemParentMessageAttachmentsItemVariantsItem] | None
2550    ) = Field(
2551        default=None,
2552        description="Array of available encoding variants for the media item (e.g. different resolutions). Present on `media` type only; omitted otherwise.",
2553    )
2554    version: int | None = Field(
2555        default=None,
2556        description="Version number of the attached artifact at the time of attachment. Present on `artifact` type only. `null` otherwise.",
2557    )
2558    width: int | None = Field(
2559        default=None,
2560        description="Width in pixels of the media item. Present on `media` type only. `null` otherwise.",
2561    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
content_type: str | None = None

MIME type of the attached file, e.g. "image/png" or "application/pdf". Present on file, artifact, and media types. null otherwise.

description: str | None = None

Short description. The page meta-description for scraped_link, the artifact description for artifact, and the task description for task types. null on other types.

filename: str | None = None

Original filename of the attached file, e.g. "report.pdf". Present on file, artifact, and media types. null otherwise.

height: int | None = None

Height in pixels of the media item. Present on media type only. null otherwise.

id: str = PydanticUndefined

Unique identifier for this attachment within the message.

image_height: int | None = None

Height in pixels of the scraped preview image. Present on scraped_link type only. null otherwise.

Image source metadata for inline rendering. Present on file, scraped_link, artifact, and media types when the content is an image. null otherwise.

image_url: str | None = None

URL of the preview image extracted from the scraped page. Present on scraped_link type only. null otherwise.

image_width: int | None = None

Width in pixels of the scraped preview image. Present on scraped_link type only. null otherwise.

media_type: str | None = None

The media category, e.g. "video" or "audio". Present on media type only; omitted otherwise.

name: str | None = None

Display name of the media item. Present on media type only. null otherwise.

object: dict[str, typing.Any] | None = None

The full embedded object payload. For task type, contains the task record. For action type, contains the action definition. For chart type, contains the chart with its inline spec. Omitted on other types.

title: str | None = None

Display title. The page title for scraped_link, the artifact name for artifact, and the task title for task types. null on other types.

type: str = PydanticUndefined

The attachment type. One of "file", "scraped_link", "artifact", "task", "media", "action", or "chart". Determines which additional fields are present.

url: str | None = None

URL to access the resource. A signed download URL for file and artifact types; the original URL for scraped_link; a media playback URL for media. null on task and action types.

Array of available encoding variants for the media item (e.g. different resolutions). Present on media type only; omitted otherwise.

version: int | None = None

Version number of the attached artifact at the time of attachment. Present on artifact type only. null otherwise.

width: int | None = None

Width in pixels of the media item. Present on media type only. null otherwise.

class TeamThreadListResponseDataItemParentMessageReactionsItem(pydantic.main.BaseModel):
2564class TeamThreadListResponseDataItemParentMessageReactionsItem(BaseModel):
2565    payload: dict[str, Any] | None = Field(
2566        default=None,
2567        description='Type-specific reaction data. For `"emoji_reaction"` reactions, contains an `emoji` key with the Unicode emoji string (e.g., `" "`).',
2568    )
2569    type: str = Field(
2570        ...,
2571        description='Reaction type identifier. Currently always `"emoji_reaction"` for emoji-based reactions.',
2572    )
2573    user: str | None = Field(
2574        default=None, description="Public ID of the user who added the reaction (`usr_...`)."
2575    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
payload: dict[str, typing.Any] | None = None

Type-specific reaction data. For "emoji_reaction" reactions, contains an emoji key with the Unicode emoji string (e.g., " ").

type: str = PydanticUndefined

Reaction type identifier. Currently always "emoji_reaction" for emoji-based reactions.

user: str | None = None

Public ID of the user who added the reaction (usr_...).

class TeamThreadListResponseDataItemParentMessage(pydantic.main.BaseModel):
2578class TeamThreadListResponseDataItemParentMessage(BaseModel):
2579    acl: TeamThreadListResponseDataItemParentMessageAcl | None = Field(
2580        default=None,
2581        description="Access control list for private messages (grants with `read` action). Only returned to resource owners (and privileged/org-admin viewers) via server-side `field_redactions: [acl: :owner]`; `null` for everyone else.",
2582    )
2583    actors: list[TeamThreadListResponseDataItemParentMessageActorsItem] | None = Field(
2584        default=None,
2585        description="Resolved actor descriptors for the message sender, combining identity and display metadata. Always contains exactly one entry.",
2586    )
2587    agent: str | None = Field(
2588        default=None,
2589        description="ID of the agent user that sent this message (`agi_...`). `null` for messages sent by human users.",
2590    )
2591    agent_mode: Literal["cli", "embedded"] | None = Field(
2592        default=None,
2593        description="Local agent execution mode for this message. One of `cli`, `embedded`, or `null` when the message was not created by a local agent execution path.",
2594    )
2595    attachments: list[TeamThreadListResponseDataItemParentMessageAttachmentsItem] | None = Field(
2596        default=None,
2597        description="Files, links, tasks, media, artifacts, and actions attached to this message. Empty array if there are no attachments.",
2598    )
2599    branched_thread: str | None = Field(
2600        default=None,
2601        description="ID of the thread that was branched from this message (`thr_...`). `null` if this message has not spawned a branch thread.",
2602    )
2603    content: str | None = Field(
2604        default=None,
2605        description="Text content of the message. `null` for messages that contain only attachments.",
2606    )
2607    created_at: str | None = Field(
2608        default=None, description="When the message was posted (ISO 8601)."
2609    )
2610    has_replies: bool | None = Field(
2611        default=None,
2612        description="Whether this message has at least one reply. Only present when explicitly requested or computed by the server.",
2613    )
2614    id: str = Field(..., description="Message ID (`msg_...`).")
2615    idempotency_key: str | None = Field(
2616        default=None,
2617        description="Client-supplied idempotency key used to deduplicate message sends. `null` if the sender did not provide one.",
2618    )
2619    is_deleted: bool | None = Field(
2620        default=None,
2621        description="Whether this message is a deletion tombstone. `true` only on the `message_updated` broadcast emitted when a message is deleted: the original content is replaced with a placeholder and the message no longer exists on the server. Always `false` for live messages.",
2622    )
2623    legacy_agent: str | None = Field(
2624        default=None,
2625        description="Identifier of the legacy chat agent that sent this message, if applicable. `null` for messages sent by users or modern agent users.",
2626    )
2627    metadata: dict[str, Any] | None = Field(
2628        default=None,
2629        description="Arbitrary key-value metadata attached to the message. Always present; defaults to an empty object when no metadata has been set.",
2630    )
2631    org: str | None = Field(
2632        default=None, description="ID of the organization that owns this message (`org_...`)."
2633    )
2634    reactions: list[TeamThreadListResponseDataItemParentMessageReactionsItem] | None = Field(
2635        default=None,
2636        description="Emoji and other reactions added to this message by users. Empty array if no reactions have been added or the association is not preloaded.",
2637    )
2638    rendering_mode: str | None = Field(
2639        default=None,
2640        description='Display hint for how the message should be rendered. One of `"reply"`, `"direct"`, or `"inline"`. `null` for user-authored messages, which are always rendered as standard replies.',
2641    )
2642    replies: list[dict[str, Any]] | None = Field(
2643        default=None,
2644        description="Inline array of reply messages, each serialized as a full message object. Only present when the server has preloaded replies for this message.",
2645    )
2646    replies_after_cursor: str | None = Field(
2647        default=None,
2648        description="Opaque pagination cursor to fetch replies posted after the current page. Only present when inline replies are included in the response.",
2649    )
2650    replies_before_cursor: str | None = Field(
2651        default=None,
2652        description="Opaque pagination cursor to fetch replies posted before the current page. Only present when inline replies are included in the response.",
2653    )
2654    reply_count: int | None = Field(
2655        default=None,
2656        description="Total number of direct replies to this message. Only present when explicitly requested or computed by the server.",
2657    )
2658    reply_to: dict[str, Any] | None = Field(
2659        default=None,
2660        description="The parent message this message is a reply to, expanded as a full message object when loaded. `null` if this is a top-level message or the association is not preloaded.",
2661    )
2662    root_message_id: str | None = Field(
2663        default=None,
2664        description="ID of the root message in this reply chain (`msg_...`). `null` for a top-level message. The value is persisted when the reply is created, so callers can correlate a multi-turn session without walking parent messages.",
2665    )
2666    sandbox: str | None = Field(
2667        default=None,
2668        description="ID of the developer sandbox this message belongs to (`dsb_...`). `null` for non-sandbox messages.",
2669    )
2670    team: str | None = Field(
2671        default=None,
2672        description="ID of the team this message is scoped to (`tem_...`). `null` if the message is not team-scoped.",
2673    )
2674    thread: str | None = Field(
2675        default=None, description="ID of the thread this message belongs to (`thr_...`)."
2676    )
2677    type: str | None = Field(
2678        default=None,
2679        description="Optional client-defined classification for the message (for example `note` or `status`). Free-form string up to 64 characters. The value `system` is reserved for platform-authored messages and cannot be set by clients. `null` when unset.",
2680    )
2681    user: str | dict[str, Any] | None = Field(
2682        default=None,
2683        description="The human user who sent this message. Returns a public ID string (`usr_...`) when the association is not preloaded, or an expanded user object when it is. `null` for messages sent by agents.",
2684    )
2685    visibility: Literal["default", "private"] | None = Field(
2686        default=None,
2687        description="Message-level visibility. `default` is visible to anyone who can see the parent thread. `private` is restricted to the sender and explicit ACL `read` grantees.",
2688    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.

Access control list for private messages (grants with read action). Only returned to resource owners (and privileged/org-admin viewers) via server-side field_redactions: [acl: :owner]; null for everyone else.

Resolved actor descriptors for the message sender, combining identity and display metadata. Always contains exactly one entry.

agent: str | None = None

ID of the agent user that sent this message (agi_...). null for messages sent by human users.

agent_mode: Optional[Literal['cli', 'embedded']] = None

Local agent execution mode for this message. One of cli, embedded, or null when the message was not created by a local agent execution path.

Files, links, tasks, media, artifacts, and actions attached to this message. Empty array if there are no attachments.

branched_thread: str | None = None

ID of the thread that was branched from this message (thr_...). null if this message has not spawned a branch thread.

content: str | None = None

Text content of the message. null for messages that contain only attachments.

created_at: str | None = None

When the message was posted (ISO 8601).

has_replies: bool | None = None

Whether this message has at least one reply. Only present when explicitly requested or computed by the server.

id: str = PydanticUndefined

Message ID (msg_...).

idempotency_key: str | None = None

Client-supplied idempotency key used to deduplicate message sends. null if the sender did not provide one.

is_deleted: bool | None = None

Whether this message is a deletion tombstone. true only on the message_updated broadcast emitted when a message is deleted: the original content is replaced with a placeholder and the message no longer exists on the server. Always false for live messages.

legacy_agent: str | None = None

Identifier of the legacy chat agent that sent this message, if applicable. null for messages sent by users or modern agent users.

metadata: dict[str, typing.Any] | None = None

Arbitrary key-value metadata attached to the message. Always present; defaults to an empty object when no metadata has been set.

org: str | None = None

ID of the organization that owns this message (org_...).

Emoji and other reactions added to this message by users. Empty array if no reactions have been added or the association is not preloaded.

rendering_mode: str | None = None

Display hint for how the message should be rendered. One of "reply", "direct", or "inline". null for user-authored messages, which are always rendered as standard replies.

replies: list[dict[str, typing.Any]] | None = None

Inline array of reply messages, each serialized as a full message object. Only present when the server has preloaded replies for this message.

replies_after_cursor: str | None = None

Opaque pagination cursor to fetch replies posted after the current page. Only present when inline replies are included in the response.

replies_before_cursor: str | None = None

Opaque pagination cursor to fetch replies posted before the current page. Only present when inline replies are included in the response.

reply_count: int | None = None

Total number of direct replies to this message. Only present when explicitly requested or computed by the server.

reply_to: dict[str, typing.Any] | None = None

The parent message this message is a reply to, expanded as a full message object when loaded. null if this is a top-level message or the association is not preloaded.

root_message_id: str | None = None

ID of the root message in this reply chain (msg_...). null for a top-level message. The value is persisted when the reply is created, so callers can correlate a multi-turn session without walking parent messages.

sandbox: str | None = None

ID of the developer sandbox this message belongs to (dsb_...). null for non-sandbox messages.

team: str | None = None

ID of the team this message is scoped to (tem_...). null if the message is not team-scoped.

thread: str | None = None

ID of the thread this message belongs to (thr_...).

type: str | None = None

Optional client-defined classification for the message (for example note or status). Free-form string up to 64 characters. The value system is reserved for platform-authored messages and cannot be set by clients. null when unset.

user: str | dict[str, typing.Any] | None = None

The human user who sent this message. Returns a public ID string (usr_...) when the association is not preloaded, or an expanded user object when it is. null for messages sent by agents.

visibility: Optional[Literal['default', 'private']] = None

Message-level visibility. default is visible to anyone who can see the parent thread. private is restricted to the sender and explicit ACL read grantees.

class TeamThreadListResponseDataItemParticipantsItem(pydantic.main.BaseModel):
2691class TeamThreadListResponseDataItemParticipantsItem(BaseModel):
2692    alias: str | None = Field(
2693        default=None, description="Short handle or alias for the user. `null` if not set."
2694    )
2695    app: str | None = Field(
2696        default=None,
2697        description="ID of the app this user (and their access token) is scoped to (`dap_...`). `null` if the user is not scoped to an app.",
2698    )
2699    app_name: str | None = Field(
2700        default=None,
2701        description="Display name of the user's app. `null` when the app association was not preloaded by the caller.",
2702    )
2703    created_by_agent_user: str | None = Field(
2704        default=None,
2705        description="Agent user that created this account (`usr_...`). `null` unless an agent created it.",
2706    )
2707    created_by_developer: str | None = Field(
2708        default=None,
2709        description="Developer account that created this user (`dva_...`). `null` unless created via a developer token.",
2710    )
2711    created_by_org: str | None = Field(
2712        default=None,
2713        description="Org of the principal that created this user (`org_...`). `null` on legacy rows.",
2714    )
2715    created_by_team: str | None = Field(
2716        default=None,
2717        description="Team that created this user (`tem_...`). `null` unless created as a team.",
2718    )
2719    created_by_user: str | None = Field(
2720        default=None,
2721        description="User who created this account (`usr_...`). `null` on self-signup or legacy rows.",
2722    )
2723    email: str | None = Field(default=None, description="Email address of the user.")
2724    id: str = Field(..., description="User ID (`usr_...`).")
2725    is_system_user: bool | None = Field(
2726        default=None,
2727        description="`true` if this account is an internal system user rather than a human. System users are created automatically by the platform.",
2728    )
2729    metadata: dict[str, Any] | None = Field(
2730        default=None,
2731        description="Arbitrary key-value metadata attached to the user. Defaults to an empty object.",
2732    )
2733    name: str | None = Field(
2734        default=None,
2735        description="Full display name of the user. `null` if the user has not set a name.",
2736    )
2737    org: str | None = Field(
2738        default=None,
2739        description="ID of the organization this user belongs to (`org_...`). `null` if the user is not a member of any organization.",
2740    )
2741    org_name: str | None = Field(
2742        default=None,
2743        description="Display name of the user's organization. `null` when the user is not in an org, or when the org association was not preloaded by the caller.",
2744    )
2745    org_role: str | None = Field(
2746        default=None,
2747        description='Role of the user within their organization. One of `"admin"`, `"member"`, or `"viewer"`. `null` when the user is not a member of any organization.',
2748    )
2749    org_slug: str | None = Field(
2750        default=None,
2751        description="Stable workspace slug for the user's organization. `null` when the user is not in an org, or when the org association was not preloaded by the caller.",
2752    )
2753    sandbox: str | None = Field(
2754        default=None,
2755        description="ID of the sandbox environment this user is scoped to (`sbx_...`). `null` for production users.",
2756    )
2757    sandbox_name: str | None = Field(
2758        default=None,
2759        description="Display name of the user's sandbox environment. `null` for production users, or when the sandbox association was not preloaded by the caller.",
2760    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
alias: str | None = None

Short handle or alias for the user. null if not set.

app: str | None = None

ID of the app this user (and their access token) is scoped to (dap_...). null if the user is not scoped to an app.

app_name: str | None = None

Display name of the user's app. null when the app association was not preloaded by the caller.

created_by_agent_user: str | None = None

Agent user that created this account (usr_...). null unless an agent created it.

created_by_developer: str | None = None

Developer account that created this user (dva_...). null unless created via a developer token.

created_by_org: str | None = None

Org of the principal that created this user (org_...). null on legacy rows.

created_by_team: str | None = None

Team that created this user (tem_...). null unless created as a team.

created_by_user: str | None = None

User who created this account (usr_...). null on self-signup or legacy rows.

email: str | None = None

Email address of the user.

id: str = PydanticUndefined

User ID (usr_...).

is_system_user: bool | None = None

true if this account is an internal system user rather than a human. System users are created automatically by the platform.

metadata: dict[str, typing.Any] | None = None

Arbitrary key-value metadata attached to the user. Defaults to an empty object.

name: str | None = None

Full display name of the user. null if the user has not set a name.

org: str | None = None

ID of the organization this user belongs to (org_...). null if the user is not a member of any organization.

org_name: str | None = None

Display name of the user's organization. null when the user is not in an org, or when the org association was not preloaded by the caller.

org_role: str | None = None

Role of the user within their organization. One of "admin", "member", or "viewer". null when the user is not a member of any organization.

org_slug: str | None = None

Stable workspace slug for the user's organization. null when the user is not in an org, or when the org association was not preloaded by the caller.

sandbox: str | None = None

ID of the sandbox environment this user is scoped to (sbx_...). null for production users.

sandbox_name: str | None = None

Display name of the user's sandbox environment. null for production users, or when the sandbox association was not preloaded by the caller.

class TeamThreadListResponseDataItemParticipatingAgentsItemAclAddItem(pydantic.main.BaseModel):
2763class TeamThreadListResponseDataItemParticipatingAgentsItemAclAddItem(BaseModel):
2764    actions: list[str] = Field(
2765        ...,
2766        description='Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.',
2767    )
2768    principal: str | None = Field(
2769        default=None,
2770        description='The identifier of the principal. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`; omit entirely when `principal_type` is `"everyone"`.',
2771    )
2772    principal_type: str = Field(
2773        ...,
2774        description='The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.',
2775    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
actions: list[str] = PydanticUndefined

Array of action strings the principal is permitted to perform, e.g. ["read", "write"]. Must contain at least one entry.

principal: str | None = None

The identifier of the principal. A string ID for "user", "team", "org", and "agent" types; one of "admin", "member", or "viewer" for "org_role"; omit entirely when principal_type is "everyone".

principal_type: str = PydanticUndefined

The kind of principal receiving the grant. One of "user", "team", "org", "org_role", "agent", or "everyone".

class TeamThreadListResponseDataItemParticipatingAgentsItemAclGrantsItem(pydantic.main.BaseModel):
2778class TeamThreadListResponseDataItemParticipatingAgentsItemAclGrantsItem(BaseModel):
2779    actions: list[str] = Field(
2780        ...,
2781        description='Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.',
2782    )
2783    principal: str | None = Field(
2784        default=None,
2785        description='The identifier of the principal. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`; omit entirely when `principal_type` is `"everyone"`.',
2786    )
2787    principal_type: str = Field(
2788        ...,
2789        description='The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.',
2790    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
actions: list[str] = PydanticUndefined

Array of action strings the principal is permitted to perform, e.g. ["read", "write"]. Must contain at least one entry.

principal: str | None = None

The identifier of the principal. A string ID for "user", "team", "org", and "agent" types; one of "admin", "member", or "viewer" for "org_role"; omit entirely when principal_type is "everyone".

principal_type: str = PydanticUndefined

The kind of principal receiving the grant. One of "user", "team", "org", "org_role", "agent", or "everyone".

class TeamThreadListResponseDataItemParticipatingAgentsItemAclRemoveItem(pydantic.main.BaseModel):
2793class TeamThreadListResponseDataItemParticipatingAgentsItemAclRemoveItem(BaseModel):
2794    principal: str | None = Field(
2795        default=None,
2796        description='The identifier of the principal to remove. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`. Omit when `principal_type` is `"everyone"`.',
2797    )
2798    principal_type: str = Field(
2799        ...,
2800        description='The kind of principal to remove. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.',
2801    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
principal: str | None = None

The identifier of the principal to remove. A string ID for "user", "team", "org", and "agent" types; one of "admin", "member", or "viewer" for "org_role". Omit when principal_type is "everyone".

principal_type: str = PydanticUndefined

The kind of principal to remove. One of "user", "team", "org", "org_role", "agent", or "everyone".

class TeamThreadListResponseDataItemParticipatingAgentsItemAcl(pydantic.main.BaseModel):
2804class TeamThreadListResponseDataItemParticipatingAgentsItemAcl(BaseModel):
2805    add: list[TeamThreadListResponseDataItemParticipatingAgentsItemAclAddItem] | None = Field(
2806        default=None,
2807        description="Patch mode: grants to add or merge into the existing list. Cannot be combined with `grants`.",
2808    )
2809    grants: list[TeamThreadListResponseDataItemParticipatingAgentsItemAclGrantsItem] | None = Field(
2810        default=None,
2811        description="Replace mode: the complete new list of grants that replaces all existing entries. Send an empty array (`[]`) to clear all grants. Cannot be combined with `add` or `remove`.",
2812    )
2813    remove: list[TeamThreadListResponseDataItemParticipatingAgentsItemAclRemoveItem] | None = Field(
2814        default=None,
2815        description="Patch mode: principals whose grants should be removed from the existing list. Cannot be combined with `grants`.",
2816    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.

Patch mode: grants to add or merge into the existing list. Cannot be combined with grants.

Replace mode: the complete new list of grants that replaces all existing entries. Send an empty array ([]) to clear all grants. Cannot be combined with add or remove.

Patch mode: principals whose grants should be removed from the existing list. Cannot be combined with grants.

class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionCurrentSolutionTemplatesItemDetailsInvokeContractParticipantsItem(pydantic.main.BaseModel):
2850class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionCurrentSolutionTemplatesItemDetailsInvokeContractParticipantsItem(
2851    BaseModel
2852):
2853    description: str | None = Field(
2854        default=None,
2855        description="Workflow-authored explanation of the slot's role. `null` when the workflow declares none.",
2856    )
2857    name: str = Field(
2858        ...,
2859        description="The slot's name, as referenced by the workflow. Supply the chosen agent under the top-level `participants[name]` field when invoking.",
2860    )
2861    required: bool = Field(
2862        ...,
2863        description="Whether the workflow requires this slot to be filled for the run to complete its embedded stages.",
2864    )
2865    type: str = Field(
2866        ...,
2867        description='The kind of principal the slot accepts. Currently always `"agent_user"` the value supplied at invoke is an agent ID (`agi_...`).',
2868    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
description: str | None = None

Workflow-authored explanation of the slot's role. null when the workflow declares none.

name: str = PydanticUndefined

The slot's name, as referenced by the workflow. Supply the chosen agent under the top-level participants[name] field when invoking.

required: bool = PydanticUndefined

Whether the workflow requires this slot to be filled for the run to complete its embedded stages.

type: str = PydanticUndefined

The kind of principal the slot accepts. Currently always "agent_user" the value supplied at invoke is an agent ID (agi_...).

class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionCurrentSolutionTemplatesItemDetailsInvokeContractPrefills(pydantic.main.BaseModel):
2871class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionCurrentSolutionTemplatesItemDetailsInvokeContractPrefills(
2872    BaseModel
2873):
2874    participants: dict[str, Any] | None = Field(
2875        default=None,
2876        description="Participant slot-to-agent mappings applied by the platform. Caller values at these slots must match exactly.",
2877    )
2878    payload: dict[str, Any] | None = Field(
2879        default=None,
2880        description="Partial invocation payload applied by the platform. A caller may omit these values, but supplying a different value at any locked path is rejected.",
2881    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
participants: dict[str, typing.Any] | None = None

Participant slot-to-agent mappings applied by the platform. Caller values at these slots must match exactly.

payload: dict[str, typing.Any] | None = None

Partial invocation payload applied by the platform. A caller may omit these values, but supplying a different value at any locked path is rejected.

class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionCurrentSolutionTemplatesItemDetailsInvokeContract(pydantic.main.BaseModel):
2884class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionCurrentSolutionTemplatesItemDetailsInvokeContract(
2885    BaseModel
2886):
2887    input_schema: dict[str, Any] | None = Field(
2888        default=None,
2889        description="JSON Schema validated against the whole invoke payload, from the automation's `input_schema_config`. `null` when none is configured.",
2890    )
2891    participants: (
2892        list[
2893            TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionCurrentSolutionTemplatesItemDetailsInvokeContractParticipantsItem
2894        ]
2895        | None
2896    ) = Field(
2897        default=None,
2898        description="Named participant slots declared by the workflow, sorted by name. `null` when the workflow declares none. Values supplied under the top-level `participants` field are agent IDs.",
2899    )
2900    prefills: TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionCurrentSolutionTemplatesItemDetailsInvokeContractPrefills = Field(
2901        ...,
2902        description="Owner-controlled payload and participant values the platform applies to every invocation. Supplying a conflicting value is rejected.",
2903    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
input_schema: dict[str, typing.Any] | None = None

JSON Schema validated against the whole invoke payload, from the automation's input_schema_config. null when none is configured.

Named participant slots declared by the workflow, sorted by name. null when the workflow declares none. Values supplied under the top-level participants field are agent IDs.

Owner-controlled payload and participant values the platform applies to every invocation. Supplying a conflicting value is rejected.

class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionCurrentSolutionTemplatesItemDetails(pydantic.main.BaseModel):
2906class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionCurrentSolutionTemplatesItemDetails(
2907    BaseModel
2908):
2909    automation_type: str | None = Field(
2910        default=None,
2911        description="Automation execution type (`invoked`, `scheduled`, or `trigger`). `null` when the template body does not declare one.",
2912    )
2913    invoke_contract: (
2914        TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionCurrentSolutionTemplatesItemDetailsInvokeContract
2915        | None
2916    ) = Field(
2917        default=None,
2918        description="Schema-driven payload and participant inputs for an invoked automation. Used by installation clients to collect locked prefills before provisioning. `null` for non-invoked automation types.",
2919    )
2920    type: Literal["automation"] = Field(
2921        default="automation",
2922        description="Template-details discriminator. Always `automation` for this variant.",
2923    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
automation_type: str | None = None

Automation execution type (invoked, scheduled, or trigger). null when the template body does not declare one.

Schema-driven payload and participant inputs for an invoked automation. Used by installation clients to collect locked prefills before provisioning. null for non-invoked automation types.

type: Literal['automation'] = 'automation'

Template-details discriminator. Always automation for this variant.

class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionCurrentSolutionTemplatesItem(pydantic.main.BaseModel):
2926class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionCurrentSolutionTemplatesItem(
2927    BaseModel
2928):
2929    description: str | None = Field(
2930        default=None,
2931        description="Short prose blurb from the template body's `description:` field. `null` when the body doesn't set one. Used as the card subhead in the Library carousel.",
2932    )
2933    details: (
2934        TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionCurrentSolutionTemplatesItemDetails
2935        | None
2936    ) = Field(
2937        default=None,
2938        description="Template-kind-specific details selected by the `type` discriminator. `null` when this template kind has no additional details.",
2939    )
2940    display_name: str | None = Field(
2941        default=None,
2942        description="Human-facing label from the template body's `display_name:` field. `null` when the body doesn't set one. Library carousels use this for the card title, falling back to a humanized `name`.",
2943    )
2944    id: str | None = Field(
2945        default=None,
2946        description="Template config ID (`cfg_...`). `null` for inline-only templates.",
2947    )
2948    kind: str = Field(
2949        ...,
2950        description="Template config kind, or `SolutionTemplateRef` / `SolutionTemplatePath` when unresolved.",
2951    )
2952    lookup_key: str | None = Field(
2953        default=None,
2954        description="Lookup key stamped on the template config at import time. `null` when no lookup key was assigned.",
2955    )
2956    name: str | None = Field(
2957        default=None,
2958        description="Canonical name from the template body. For `AgentTemplate` this doubles as the human-facing label; for `AgentToolTemplate` it's the LLM-facing tool function identifier (snake_case); for `AgentRoutineTemplate` it's the routine identifier (kebab-case). Clients rendering carousels should prefer `display_name` and fall back to humanizing `name`.",
2959    )
2960    readme_url: str | None = Field(
2961        default=None,
2962        description="Relative path to the public README endpoint with a signed token already embedded, scoped to this template's bundled markdown asset. `null` when the Solution body's `templates[].readme_path` is unset for this entry. Token expires in 1 hour refresh via `GET /api/v1/solutions/:solution`.",
2963    )
2964    virtual_path: str | None = Field(
2965        default=None,
2966        description="Stable virtual path assigned to the template config. `null` when no virtual path was set.",
2967    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
description: str | None = None

Short prose blurb from the template body's description: field. null when the body doesn't set one. Used as the card subhead in the Library carousel.

Template-kind-specific details selected by the type discriminator. null when this template kind has no additional details.

display_name: str | None = None

Human-facing label from the template body's display_name: field. null when the body doesn't set one. Library carousels use this for the card title, falling back to a humanized name.

id: str | None = None

Template config ID (cfg_...). null for inline-only templates.

kind: str = PydanticUndefined

Template config kind, or SolutionTemplateRef / SolutionTemplatePath when unresolved.

lookup_key: str | None = None

Lookup key stamped on the template config at import time. null when no lookup key was assigned.

name: str | None = None

Canonical name from the template body. For AgentTemplate this doubles as the human-facing label; for AgentToolTemplate it's the LLM-facing tool function identifier (snake_case); for AgentRoutineTemplate it's the routine identifier (kebab-case). Clients rendering carousels should prefer display_name and fall back to humanizing name.

readme_url: str | None = None

Relative path to the public README endpoint with a signed token already embedded, scoped to this template's bundled markdown asset. null when the Solution body's templates[].readme_path is unset for this entry. Token expires in 1 hour refresh via GET /api/v1/solutions/:solution.

virtual_path: str | None = None

Stable virtual path assigned to the template config. null when no virtual path was set.

class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionCurrentSolution(pydantic.main.BaseModel):
2970class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionCurrentSolution(BaseModel):
2971    category_keys: list[str] | None = Field(
2972        default=None,
2973        description="Category tag keys declared in the Solution body, used to group Solutions in the catalog. An empty array when the body declares none.",
2974    )
2975    created_at: str | None = Field(
2976        default=None, description="When the Solution config was first imported (ISO 8601)."
2977    )
2978    description: str | None = Field(
2979        default=None,
2980        description="Short tagline or summary declared in the Solution body, used as the card subhead in catalog UIs. `null` when the Solution body does not set one.",
2981    )
2982    events: dict[str, Any] | None = Field(
2983        default=None,
2984        description="Custom analytics events declared in the Solution body's `events:` manifest a map of event key (snake_case) to its definition (`label`, optional `description`, optional typed `fields`). Dashboards use the `label` as the event's display name. Present as an empty object when the body declares none.",
2985    )
2986    id: str = Field(..., description="Solution config ID (`cfg_...`).")
2987    image_url: str | None = Field(
2988        default=None,
2989        description="Absolute URL of the Solution's cover image the bundled asset the body's `image:` field names. A stable, non-expiring capability URL (like `org_logo.url`), safe to hold in caches and OpenGraph tags; it 404s if the Solution stops declaring a cover. `null` when the Solution has no cover image, and always `null` for org-scoped rows the permanent URL is minted for system-scope (catalog) Solutions only.",
2990    )
2991    kind: str = Field(..., description='Resource type. Always `"Solution"`.')
2992    latest_solution: str | None = Field(
2993        default=None,
2994        description="When `upgrade_available` is `true`, the system-scope Solution config ID (`cfg_...`) that should be used as the upgrade source. `null` otherwise.",
2995    )
2996    latest_version: str | None = Field(
2997        default=None,
2998        description="When `upgrade_available` is `true`, the higher system-scope `solution_version` available to upgrade to. `null` otherwise.",
2999    )
3000    lookup_key: str | None = Field(
3001        default=None,
3002        description="The lookup key stored on the Solution config, if one was assigned during import. `null` when no lookup key was set.",
3003    )
3004    metadata: dict[str, Any] | None = Field(
3005        default=None,
3006        description="Arbitrary key-value metadata declared in the Solution body (e.g. category or display hints). Present as an empty object when the body declares none.",
3007    )
3008    name: str | None = Field(
3009        default=None,
3010        description="Human-facing display name declared in the Solution body. `null` when the Solution body does not set one.",
3011    )
3012    org: str | None = Field(
3013        default=None,
3014        description="Organization ID (`org_...`) that owns this Solution config, when the Solution is scoped to a specific org. `null` for system-scope (app-level) Solutions.",
3015    )
3016    org_logo: (
3017        TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionCurrentSolutionOrgLogo
3018        | None
3019    ) = Field(
3020        default=None,
3021        description="Canonical image-source object for the resolved `org`'s logo, used as the principal category section glyph. The `url` is a stable, non-expiring capability URL (`refresh_url` is `null` there is nothing to refresh). `null` when `org_slug` is `null` or the org has no logo.",
3022    )
3023    org_name: str | None = Field(
3024        default=None,
3025        description="Display name of the resolved `org`. Pairs with `org_slug` as the principal catalog category's label. `null` when `org_slug` is `null`.",
3026    )
3027    org_slug: str | None = Field(
3028        default=None,
3029        description="Resolved slug of the Solution body's `org` (the publishing organization), when set and it resolves to a real org visible to the viewer. When present this is the Solution's principal catalog category key clients group the Solution under this org ahead of `category_keys`. `null` when the body has no `org` or it doesn't resolve.",
3030    )
3031    owners: list[str] = Field(
3032        ...,
3033        description='Owner scopes this Solution appears under. Members: `"system"` (app-level system scope) and/or `"org"` (viewer\'s org scope).',
3034    )
3035    readme_url: str | None = Field(
3036        default=None,
3037        description="Relative path to the public README endpoint with a signed token already embedded. `null` when the Solution has no README. Token expires in 1 hour refresh via `GET /api/v1/solutions/:solution`.",
3038    )
3039    screenshot_urls: list[str] | None = Field(
3040        default=None,
3041        description="Absolute URLs of the Solution's gallery screenshots the bundled assets the body's `screenshots:` field names, in declared order. Each is a stable, non-expiring capability URL with the same cacheability contract as `image_url` (one shared token, a `v` cache key, and a `file` param selecting the screenshot); a URL 404s if the Solution stops declaring its screenshot. An empty array when the Solution declares none, and always empty for org-scoped rows the permanent URLs are minted for system-scope (catalog) Solutions only.",
3042    )
3043    solution_id: str | None = Field(
3044        default=None,
3045        description="Stable UUID declared in the Solution body, used to identify the same logical Solution across multiple installed copies and owner scopes. `null` when the body omits it.",
3046    )
3047    solution_version: str | None = Field(
3048        default=None,
3049        description='Semver string declared in the Solution body (e.g. `"1.2.0"`). `null` when the body does not declare a version.',
3050    )
3051    tag_keys: list[str] | None = Field(
3052        default=None,
3053        description="Freeform tag keys declared in the Solution body. An empty array when the body declares none.",
3054    )
3055    template_kind: str | None = Field(
3056        default=None,
3057        description='Wrapped template kind `"AgentTemplate"`, `"AutomationTemplate"`, `"AgentRoutineTemplate"`, `"AgentToolTemplate"`, `"AgentComputerTemplate"`, or `"SolutionTemplateRef"` for ref-mode bundles.',
3058    )
3059    templates: list[
3060        TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionCurrentSolutionTemplatesItem
3061    ] = Field(
3062        ...,
3063        description="Template configs bundled by this Solution, in declaration order the first entry is the deployable template the Solution wraps; the rest are sibling templates the wrapped template references.",
3064    )
3065    updated_at: str | None = Field(
3066        default=None, description="When the Solution config was last modified (ISO 8601)."
3067    )
3068    upgrade_available: bool = Field(
3069        ...,
3070        description="`true` when this Solution is installed at the viewer's org scope and the app-level system scope carries a higher `solution_version`. Always `false` for system-only rows.",
3071    )
3072    virtual_path: str | None = Field(
3073        default=None,
3074        description="The stable virtual path assigned to this Solution config, used as the deduplication key when the same Solution appears under multiple owner scopes. `null` when unset.",
3075    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
category_keys: list[str] | None = None

Category tag keys declared in the Solution body, used to group Solutions in the catalog. An empty array when the body declares none.

created_at: str | None = None

When the Solution config was first imported (ISO 8601).

description: str | None = None

Short tagline or summary declared in the Solution body, used as the card subhead in catalog UIs. null when the Solution body does not set one.

events: dict[str, typing.Any] | None = None

Custom analytics events declared in the Solution body's events: manifest a map of event key (snake_case) to its definition (label, optional description, optional typed fields). Dashboards use the label as the event's display name. Present as an empty object when the body declares none.

id: str = PydanticUndefined

Solution config ID (cfg_...).

image_url: str | None = None

Absolute URL of the Solution's cover image the bundled asset the body's image: field names. A stable, non-expiring capability URL (like org_logo.url), safe to hold in caches and OpenGraph tags; it 404s if the Solution stops declaring a cover. null when the Solution has no cover image, and always null for org-scoped rows the permanent URL is minted for system-scope (catalog) Solutions only.

kind: str = PydanticUndefined

Resource type. Always "Solution".

latest_solution: str | None = None

When upgrade_available is true, the system-scope Solution config ID (cfg_...) that should be used as the upgrade source. null otherwise.

latest_version: str | None = None

When upgrade_available is true, the higher system-scope solution_version available to upgrade to. null otherwise.

lookup_key: str | None = None

The lookup key stored on the Solution config, if one was assigned during import. null when no lookup key was set.

metadata: dict[str, typing.Any] | None = None

Arbitrary key-value metadata declared in the Solution body (e.g. category or display hints). Present as an empty object when the body declares none.

name: str | None = None

Human-facing display name declared in the Solution body. null when the Solution body does not set one.

org: str | None = None

Organization ID (org_...) that owns this Solution config, when the Solution is scoped to a specific org. null for system-scope (app-level) Solutions.

org_name: str | None = None

Display name of the resolved org. Pairs with org_slug as the principal catalog category's label. null when org_slug is null.

org_slug: str | None = None

Resolved slug of the Solution body's org (the publishing organization), when set and it resolves to a real org visible to the viewer. When present this is the Solution's principal catalog category key clients group the Solution under this org ahead of category_keys. null when the body has no org or it doesn't resolve.

owners: list[str] = PydanticUndefined

Owner scopes this Solution appears under. Members: "system" (app-level system scope) and/or "org" (viewer's org scope).

readme_url: str | None = None

Relative path to the public README endpoint with a signed token already embedded. null when the Solution has no README. Token expires in 1 hour refresh via GET /api/v1/solutions/:solution.

screenshot_urls: list[str] | None = None

Absolute URLs of the Solution's gallery screenshots the bundled assets the body's screenshots: field names, in declared order. Each is a stable, non-expiring capability URL with the same cacheability contract as image_url (one shared token, a v cache key, and a file param selecting the screenshot); a URL 404s if the Solution stops declaring its screenshot. An empty array when the Solution declares none, and always empty for org-scoped rows the permanent URLs are minted for system-scope (catalog) Solutions only.

solution_id: str | None = None

Stable UUID declared in the Solution body, used to identify the same logical Solution across multiple installed copies and owner scopes. null when the body omits it.

solution_version: str | None = None

Semver string declared in the Solution body (e.g. "1.2.0"). null when the body does not declare a version.

tag_keys: list[str] | None = None

Freeform tag keys declared in the Solution body. An empty array when the body declares none.

template_kind: str | None = None

Wrapped template kind "AgentTemplate", "AutomationTemplate", "AgentRoutineTemplate", "AgentToolTemplate", "AgentComputerTemplate", or "SolutionTemplateRef" for ref-mode bundles.

Template configs bundled by this Solution, in declaration order the first entry is the deployable template the Solution wraps; the rest are sibling templates the wrapped template references.

updated_at: str | None = None

When the Solution config was last modified (ISO 8601).

upgrade_available: bool = PydanticUndefined

true when this Solution is installed at the viewer's org scope and the app-level system scope carries a higher solution_version. Always false for system-only rows.

virtual_path: str | None = None

The stable virtual path assigned to this Solution config, used as the deduplication key when the same Solution appears under multiple owner scopes. null when unset.

class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolutionTemplatesItemDetailsInvokeContractParticipantsItem(pydantic.main.BaseModel):
3107class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolutionTemplatesItemDetailsInvokeContractParticipantsItem(
3108    BaseModel
3109):
3110    description: str | None = Field(
3111        default=None,
3112        description="Workflow-authored explanation of the slot's role. `null` when the workflow declares none.",
3113    )
3114    name: str = Field(
3115        ...,
3116        description="The slot's name, as referenced by the workflow. Supply the chosen agent under the top-level `participants[name]` field when invoking.",
3117    )
3118    required: bool = Field(
3119        ...,
3120        description="Whether the workflow requires this slot to be filled for the run to complete its embedded stages.",
3121    )
3122    type: str = Field(
3123        ...,
3124        description='The kind of principal the slot accepts. Currently always `"agent_user"` the value supplied at invoke is an agent ID (`agi_...`).',
3125    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
description: str | None = None

Workflow-authored explanation of the slot's role. null when the workflow declares none.

name: str = PydanticUndefined

The slot's name, as referenced by the workflow. Supply the chosen agent under the top-level participants[name] field when invoking.

required: bool = PydanticUndefined

Whether the workflow requires this slot to be filled for the run to complete its embedded stages.

type: str = PydanticUndefined

The kind of principal the slot accepts. Currently always "agent_user" the value supplied at invoke is an agent ID (agi_...).

class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolutionTemplatesItemDetailsInvokeContractPrefills(pydantic.main.BaseModel):
3128class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolutionTemplatesItemDetailsInvokeContractPrefills(
3129    BaseModel
3130):
3131    participants: dict[str, Any] | None = Field(
3132        default=None,
3133        description="Participant slot-to-agent mappings applied by the platform. Caller values at these slots must match exactly.",
3134    )
3135    payload: dict[str, Any] | None = Field(
3136        default=None,
3137        description="Partial invocation payload applied by the platform. A caller may omit these values, but supplying a different value at any locked path is rejected.",
3138    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
participants: dict[str, typing.Any] | None = None

Participant slot-to-agent mappings applied by the platform. Caller values at these slots must match exactly.

payload: dict[str, typing.Any] | None = None

Partial invocation payload applied by the platform. A caller may omit these values, but supplying a different value at any locked path is rejected.

class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolutionTemplatesItemDetailsInvokeContract(pydantic.main.BaseModel):
3141class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolutionTemplatesItemDetailsInvokeContract(
3142    BaseModel
3143):
3144    input_schema: dict[str, Any] | None = Field(
3145        default=None,
3146        description="JSON Schema validated against the whole invoke payload, from the automation's `input_schema_config`. `null` when none is configured.",
3147    )
3148    participants: (
3149        list[
3150            TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolutionTemplatesItemDetailsInvokeContractParticipantsItem
3151        ]
3152        | None
3153    ) = Field(
3154        default=None,
3155        description="Named participant slots declared by the workflow, sorted by name. `null` when the workflow declares none. Values supplied under the top-level `participants` field are agent IDs.",
3156    )
3157    prefills: TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolutionTemplatesItemDetailsInvokeContractPrefills = Field(
3158        ...,
3159        description="Owner-controlled payload and participant values the platform applies to every invocation. Supplying a conflicting value is rejected.",
3160    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
input_schema: dict[str, typing.Any] | None = None

JSON Schema validated against the whole invoke payload, from the automation's input_schema_config. null when none is configured.

Named participant slots declared by the workflow, sorted by name. null when the workflow declares none. Values supplied under the top-level participants field are agent IDs.

Owner-controlled payload and participant values the platform applies to every invocation. Supplying a conflicting value is rejected.

class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolutionTemplatesItemDetails(pydantic.main.BaseModel):
3163class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolutionTemplatesItemDetails(
3164    BaseModel
3165):
3166    automation_type: str | None = Field(
3167        default=None,
3168        description="Automation execution type (`invoked`, `scheduled`, or `trigger`). `null` when the template body does not declare one.",
3169    )
3170    invoke_contract: (
3171        TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolutionTemplatesItemDetailsInvokeContract
3172        | None
3173    ) = Field(
3174        default=None,
3175        description="Schema-driven payload and participant inputs for an invoked automation. Used by installation clients to collect locked prefills before provisioning. `null` for non-invoked automation types.",
3176    )
3177    type: Literal["automation"] = Field(
3178        default="automation",
3179        description="Template-details discriminator. Always `automation` for this variant.",
3180    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
automation_type: str | None = None

Automation execution type (invoked, scheduled, or trigger). null when the template body does not declare one.

Schema-driven payload and participant inputs for an invoked automation. Used by installation clients to collect locked prefills before provisioning. null for non-invoked automation types.

type: Literal['automation'] = 'automation'

Template-details discriminator. Always automation for this variant.

class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolutionTemplatesItem(pydantic.main.BaseModel):
3183class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolutionTemplatesItem(
3184    BaseModel
3185):
3186    description: str | None = Field(
3187        default=None,
3188        description="Short prose blurb from the template body's `description:` field. `null` when the body doesn't set one. Used as the card subhead in the Library carousel.",
3189    )
3190    details: (
3191        TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolutionTemplatesItemDetails
3192        | None
3193    ) = Field(
3194        default=None,
3195        description="Template-kind-specific details selected by the `type` discriminator. `null` when this template kind has no additional details.",
3196    )
3197    display_name: str | None = Field(
3198        default=None,
3199        description="Human-facing label from the template body's `display_name:` field. `null` when the body doesn't set one. Library carousels use this for the card title, falling back to a humanized `name`.",
3200    )
3201    id: str | None = Field(
3202        default=None,
3203        description="Template config ID (`cfg_...`). `null` for inline-only templates.",
3204    )
3205    kind: str = Field(
3206        ...,
3207        description="Template config kind, or `SolutionTemplateRef` / `SolutionTemplatePath` when unresolved.",
3208    )
3209    lookup_key: str | None = Field(
3210        default=None,
3211        description="Lookup key stamped on the template config at import time. `null` when no lookup key was assigned.",
3212    )
3213    name: str | None = Field(
3214        default=None,
3215        description="Canonical name from the template body. For `AgentTemplate` this doubles as the human-facing label; for `AgentToolTemplate` it's the LLM-facing tool function identifier (snake_case); for `AgentRoutineTemplate` it's the routine identifier (kebab-case). Clients rendering carousels should prefer `display_name` and fall back to humanizing `name`.",
3216    )
3217    readme_url: str | None = Field(
3218        default=None,
3219        description="Relative path to the public README endpoint with a signed token already embedded, scoped to this template's bundled markdown asset. `null` when the Solution body's `templates[].readme_path` is unset for this entry. Token expires in 1 hour refresh via `GET /api/v1/solutions/:solution`.",
3220    )
3221    virtual_path: str | None = Field(
3222        default=None,
3223        description="Stable virtual path assigned to the template config. `null` when no virtual path was set.",
3224    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
description: str | None = None

Short prose blurb from the template body's description: field. null when the body doesn't set one. Used as the card subhead in the Library carousel.

Template-kind-specific details selected by the type discriminator. null when this template kind has no additional details.

display_name: str | None = None

Human-facing label from the template body's display_name: field. null when the body doesn't set one. Library carousels use this for the card title, falling back to a humanized name.

id: str | None = None

Template config ID (cfg_...). null for inline-only templates.

kind: str = PydanticUndefined

Template config kind, or SolutionTemplateRef / SolutionTemplatePath when unresolved.

lookup_key: str | None = None

Lookup key stamped on the template config at import time. null when no lookup key was assigned.

name: str | None = None

Canonical name from the template body. For AgentTemplate this doubles as the human-facing label; for AgentToolTemplate it's the LLM-facing tool function identifier (snake_case); for AgentRoutineTemplate it's the routine identifier (kebab-case). Clients rendering carousels should prefer display_name and fall back to humanizing name.

readme_url: str | None = None

Relative path to the public README endpoint with a signed token already embedded, scoped to this template's bundled markdown asset. null when the Solution body's templates[].readme_path is unset for this entry. Token expires in 1 hour refresh via GET /api/v1/solutions/:solution.

virtual_path: str | None = None

Stable virtual path assigned to the template config. null when no virtual path was set.

class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolution(pydantic.main.BaseModel):
3227class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolution(BaseModel):
3228    category_keys: list[str] | None = Field(
3229        default=None,
3230        description="Category tag keys declared in the Solution body, used to group Solutions in the catalog. An empty array when the body declares none.",
3231    )
3232    created_at: str | None = Field(
3233        default=None, description="When the Solution config was first imported (ISO 8601)."
3234    )
3235    description: str | None = Field(
3236        default=None,
3237        description="Short tagline or summary declared in the Solution body, used as the card subhead in catalog UIs. `null` when the Solution body does not set one.",
3238    )
3239    events: dict[str, Any] | None = Field(
3240        default=None,
3241        description="Custom analytics events declared in the Solution body's `events:` manifest a map of event key (snake_case) to its definition (`label`, optional `description`, optional typed `fields`). Dashboards use the `label` as the event's display name. Present as an empty object when the body declares none.",
3242    )
3243    id: str = Field(..., description="Solution config ID (`cfg_...`).")
3244    image_url: str | None = Field(
3245        default=None,
3246        description="Absolute URL of the Solution's cover image the bundled asset the body's `image:` field names. A stable, non-expiring capability URL (like `org_logo.url`), safe to hold in caches and OpenGraph tags; it 404s if the Solution stops declaring a cover. `null` when the Solution has no cover image, and always `null` for org-scoped rows the permanent URL is minted for system-scope (catalog) Solutions only.",
3247    )
3248    kind: str = Field(..., description='Resource type. Always `"Solution"`.')
3249    latest_solution: str | None = Field(
3250        default=None,
3251        description="When `upgrade_available` is `true`, the system-scope Solution config ID (`cfg_...`) that should be used as the upgrade source. `null` otherwise.",
3252    )
3253    latest_version: str | None = Field(
3254        default=None,
3255        description="When `upgrade_available` is `true`, the higher system-scope `solution_version` available to upgrade to. `null` otherwise.",
3256    )
3257    lookup_key: str | None = Field(
3258        default=None,
3259        description="The lookup key stored on the Solution config, if one was assigned during import. `null` when no lookup key was set.",
3260    )
3261    metadata: dict[str, Any] | None = Field(
3262        default=None,
3263        description="Arbitrary key-value metadata declared in the Solution body (e.g. category or display hints). Present as an empty object when the body declares none.",
3264    )
3265    name: str | None = Field(
3266        default=None,
3267        description="Human-facing display name declared in the Solution body. `null` when the Solution body does not set one.",
3268    )
3269    org: str | None = Field(
3270        default=None,
3271        description="Organization ID (`org_...`) that owns this Solution config, when the Solution is scoped to a specific org. `null` for system-scope (app-level) Solutions.",
3272    )
3273    org_logo: (
3274        TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolutionOrgLogo | None
3275    ) = Field(
3276        default=None,
3277        description="Canonical image-source object for the resolved `org`'s logo, used as the principal category section glyph. The `url` is a stable, non-expiring capability URL (`refresh_url` is `null` there is nothing to refresh). `null` when `org_slug` is `null` or the org has no logo.",
3278    )
3279    org_name: str | None = Field(
3280        default=None,
3281        description="Display name of the resolved `org`. Pairs with `org_slug` as the principal catalog category's label. `null` when `org_slug` is `null`.",
3282    )
3283    org_slug: str | None = Field(
3284        default=None,
3285        description="Resolved slug of the Solution body's `org` (the publishing organization), when set and it resolves to a real org visible to the viewer. When present this is the Solution's principal catalog category key clients group the Solution under this org ahead of `category_keys`. `null` when the body has no `org` or it doesn't resolve.",
3286    )
3287    owners: list[str] = Field(
3288        ...,
3289        description='Owner scopes this Solution appears under. Members: `"system"` (app-level system scope) and/or `"org"` (viewer\'s org scope).',
3290    )
3291    readme_url: str | None = Field(
3292        default=None,
3293        description="Relative path to the public README endpoint with a signed token already embedded. `null` when the Solution has no README. Token expires in 1 hour refresh via `GET /api/v1/solutions/:solution`.",
3294    )
3295    screenshot_urls: list[str] | None = Field(
3296        default=None,
3297        description="Absolute URLs of the Solution's gallery screenshots the bundled assets the body's `screenshots:` field names, in declared order. Each is a stable, non-expiring capability URL with the same cacheability contract as `image_url` (one shared token, a `v` cache key, and a `file` param selecting the screenshot); a URL 404s if the Solution stops declaring its screenshot. An empty array when the Solution declares none, and always empty for org-scoped rows the permanent URLs are minted for system-scope (catalog) Solutions only.",
3298    )
3299    solution_id: str | None = Field(
3300        default=None,
3301        description="Stable UUID declared in the Solution body, used to identify the same logical Solution across multiple installed copies and owner scopes. `null` when the body omits it.",
3302    )
3303    solution_version: str | None = Field(
3304        default=None,
3305        description='Semver string declared in the Solution body (e.g. `"1.2.0"`). `null` when the body does not declare a version.',
3306    )
3307    tag_keys: list[str] | None = Field(
3308        default=None,
3309        description="Freeform tag keys declared in the Solution body. An empty array when the body declares none.",
3310    )
3311    template_kind: str | None = Field(
3312        default=None,
3313        description='Wrapped template kind `"AgentTemplate"`, `"AutomationTemplate"`, `"AgentRoutineTemplate"`, `"AgentToolTemplate"`, `"AgentComputerTemplate"`, or `"SolutionTemplateRef"` for ref-mode bundles.',
3314    )
3315    templates: list[
3316        TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolutionTemplatesItem
3317    ] = Field(
3318        ...,
3319        description="Template configs bundled by this Solution, in declaration order the first entry is the deployable template the Solution wraps; the rest are sibling templates the wrapped template references.",
3320    )
3321    updated_at: str | None = Field(
3322        default=None, description="When the Solution config was last modified (ISO 8601)."
3323    )
3324    upgrade_available: bool = Field(
3325        ...,
3326        description="`true` when this Solution is installed at the viewer's org scope and the app-level system scope carries a higher `solution_version`. Always `false` for system-only rows.",
3327    )
3328    virtual_path: str | None = Field(
3329        default=None,
3330        description="The stable virtual path assigned to this Solution config, used as the deduplication key when the same Solution appears under multiple owner scopes. `null` when unset.",
3331    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
category_keys: list[str] | None = None

Category tag keys declared in the Solution body, used to group Solutions in the catalog. An empty array when the body declares none.

created_at: str | None = None

When the Solution config was first imported (ISO 8601).

description: str | None = None

Short tagline or summary declared in the Solution body, used as the card subhead in catalog UIs. null when the Solution body does not set one.

events: dict[str, typing.Any] | None = None

Custom analytics events declared in the Solution body's events: manifest a map of event key (snake_case) to its definition (label, optional description, optional typed fields). Dashboards use the label as the event's display name. Present as an empty object when the body declares none.

id: str = PydanticUndefined

Solution config ID (cfg_...).

image_url: str | None = None

Absolute URL of the Solution's cover image the bundled asset the body's image: field names. A stable, non-expiring capability URL (like org_logo.url), safe to hold in caches and OpenGraph tags; it 404s if the Solution stops declaring a cover. null when the Solution has no cover image, and always null for org-scoped rows the permanent URL is minted for system-scope (catalog) Solutions only.

kind: str = PydanticUndefined

Resource type. Always "Solution".

latest_solution: str | None = None

When upgrade_available is true, the system-scope Solution config ID (cfg_...) that should be used as the upgrade source. null otherwise.

latest_version: str | None = None

When upgrade_available is true, the higher system-scope solution_version available to upgrade to. null otherwise.

lookup_key: str | None = None

The lookup key stored on the Solution config, if one was assigned during import. null when no lookup key was set.

metadata: dict[str, typing.Any] | None = None

Arbitrary key-value metadata declared in the Solution body (e.g. category or display hints). Present as an empty object when the body declares none.

name: str | None = None

Human-facing display name declared in the Solution body. null when the Solution body does not set one.

org: str | None = None

Organization ID (org_...) that owns this Solution config, when the Solution is scoped to a specific org. null for system-scope (app-level) Solutions.

org_name: str | None = None

Display name of the resolved org. Pairs with org_slug as the principal catalog category's label. null when org_slug is null.

org_slug: str | None = None

Resolved slug of the Solution body's org (the publishing organization), when set and it resolves to a real org visible to the viewer. When present this is the Solution's principal catalog category key clients group the Solution under this org ahead of category_keys. null when the body has no org or it doesn't resolve.

owners: list[str] = PydanticUndefined

Owner scopes this Solution appears under. Members: "system" (app-level system scope) and/or "org" (viewer's org scope).

readme_url: str | None = None

Relative path to the public README endpoint with a signed token already embedded. null when the Solution has no README. Token expires in 1 hour refresh via GET /api/v1/solutions/:solution.

screenshot_urls: list[str] | None = None

Absolute URLs of the Solution's gallery screenshots the bundled assets the body's screenshots: field names, in declared order. Each is a stable, non-expiring capability URL with the same cacheability contract as image_url (one shared token, a v cache key, and a file param selecting the screenshot); a URL 404s if the Solution stops declaring its screenshot. An empty array when the Solution declares none, and always empty for org-scoped rows the permanent URLs are minted for system-scope (catalog) Solutions only.

solution_id: str | None = None

Stable UUID declared in the Solution body, used to identify the same logical Solution across multiple installed copies and owner scopes. null when the body omits it.

solution_version: str | None = None

Semver string declared in the Solution body (e.g. "1.2.0"). null when the body does not declare a version.

tag_keys: list[str] | None = None

Freeform tag keys declared in the Solution body. An empty array when the body declares none.

template_kind: str | None = None

Wrapped template kind "AgentTemplate", "AutomationTemplate", "AgentRoutineTemplate", "AgentToolTemplate", "AgentComputerTemplate", or "SolutionTemplateRef" for ref-mode bundles.

Template configs bundled by this Solution, in declaration order the first entry is the deployable template the Solution wraps; the rest are sibling templates the wrapped template references.

updated_at: str | None = None

When the Solution config was last modified (ISO 8601).

upgrade_available: bool = PydanticUndefined

true when this Solution is installed at the viewer's org scope and the app-level system scope carries a higher solution_version. Always false for system-only rows.

virtual_path: str | None = None

The stable virtual path assigned to this Solution config, used as the deduplication key when the same Solution appears under multiple owner scopes. null when unset.

class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionTemplate(pydantic.main.BaseModel):
3334class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionTemplate(BaseModel):
3335    created_at: datetime | None = Field(
3336        default=None, description="When this template config was created (ISO 8601)."
3337    )
3338    description: str | None = Field(
3339        default=None,
3340        description="Description of the template from the config body. `null` if the current version has no `description` field.",
3341    )
3342    display_name: str | None = Field(
3343        default=None,
3344        description="Human-readable display name from the config body. `null` if the current version has no `display_name` field.",
3345    )
3346    id: str = Field(..., description="Template config ID (`cfg_...`).")
3347    kind: str = Field(
3348        ..., description='Config kind identifier for this template (e.g. `"agent_tool_template"`).'
3349    )
3350    lookup_key: str | None = Field(
3351        default=None,
3352        description="Stable lookup key assigned to this template config. `null` if no lookup key is set.",
3353    )
3354    name: str | None = Field(
3355        default=None,
3356        description="Template name as stored in the config body. `null` if the current version has no `name` field.",
3357    )
3358    updated_at: datetime | None = Field(
3359        default=None, description="When this template config was last modified (ISO 8601)."
3360    )
3361    virtual_path: str | None = Field(
3362        default=None,
3363        description="Virtual filesystem path for this template config. `null` if not set.",
3364    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
created_at: datetime.datetime | None = None

When this template config was created (ISO 8601).

description: str | None = None

Description of the template from the config body. null if the current version has no description field.

display_name: str | None = None

Human-readable display name from the config body. null if the current version has no display_name field.

id: str = PydanticUndefined

Template config ID (cfg_...).

kind: str = PydanticUndefined

Config kind identifier for this template (e.g. "agent_tool_template").

lookup_key: str | None = None

Stable lookup key assigned to this template config. null if no lookup key is set.

name: str | None = None

Template name as stored in the config body. null if the current version has no name field.

updated_at: datetime.datetime | None = None

When this template config was last modified (ISO 8601).

virtual_path: str | None = None

Virtual filesystem path for this template config. null if not set.

class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolution(pydantic.main.BaseModel):
3367class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolution(BaseModel):
3368    current_solution: (
3369        TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionCurrentSolution | None
3370    ) = Field(
3371        default=None,
3372        description="Summary of the current parent Solution config row. `solution` is the pinned Solution version the agent points at; `current_solution` is the source Solution config row as it exists now.",
3373    )
3374    solution: TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolution = Field(
3375        ...,
3376        description="Summary of the parent Solution, including `upgrade_available`, `latest_version`, and `latest_solution` when a newer system-scoped version is available for the agent's org-scoped Solution.",
3377    )
3378    template: TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionTemplate = Field(
3379        ...,
3380        description="Summary of the AgentTemplate config (`cfg_...`) the agent was last provisioned or updated from.",
3381    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.

Summary of the current parent Solution config row. solution is the pinned Solution version the agent points at; current_solution is the source Solution config row as it exists now.

Summary of the parent Solution, including upgrade_available, latest_version, and latest_solution when a newer system-scoped version is available for the agent's org-scoped Solution.

Summary of the AgentTemplate config (cfg_...) the agent was last provisioned or updated from.

class TeamThreadListResponseDataItemParticipatingAgentsItem(pydantic.main.BaseModel):
3384class TeamThreadListResponseDataItemParticipatingAgentsItem(BaseModel):
3385    acl: TeamThreadListResponseDataItemParticipatingAgentsItemAcl | None = Field(
3386        default=None,
3387        description="Access control list for the agent. Contains a `grants` array where each entry specifies `principal_type`, `principal`, and `actions`. `null` when no ACL restrictions are applied and the agent is accessible to all members of its scope.",
3388    )
3389    app: str | None = Field(
3390        default=None, description="ID of the application that owns this agent (`dap_...`)."
3391    )
3392    created_at: str | None = Field(
3393        default=None, description="When the agent was created (ISO 8601)."
3394    )
3395    default_model: str | None = Field(
3396        default=None,
3397        description='Default LLM model identifier used by this agent when no model is specified at runtime (e.g. `"claude-3-7-sonnet-latest"`).',
3398    )
3399    description: str | None = Field(
3400        default=None,
3401        description="Human-readable description of what the agent does. `null` if not set.",
3402    )
3403    email: str | None = Field(
3404        default=None,
3405        description="Email address provisioned for this agent. `null` if email delivery is not configured.",
3406    )
3407    id: str = Field(..., description="Agent ID (`agi_...`).")
3408    identity: str | None = Field(
3409        default=None,
3410        description="System-level identity prompt that shapes the agent's persona and behavior.",
3411    )
3412    last_applied_template_config: str | None = Field(
3413        default=None,
3414        description="ID of the AgentTemplate config (`cfg_...`) this agent was last provisioned or updated from. `null` for manually created agents.",
3415    )
3416    lookup_key: str | None = Field(
3417        default=None,
3418        description="Stable, user-defined identifier for this agent within the application. Unique per app.",
3419    )
3420    metadata: dict[str, Any] | None = Field(
3421        default=None,
3422        description="Arbitrary key-value metadata attached to the agent. Not interpreted by the platform.",
3423    )
3424    name: str | None = Field(
3425        default=None, description="Human-readable display name for the agent. `null` if not set."
3426    )
3427    org: str | None = Field(
3428        default=None,
3429        description="ID of the organization this agent belongs to (`org_...`). `null` if the agent is not org-scoped.",
3430    )
3431    org_name: str | None = Field(
3432        default=None,
3433        description="Display name of the organization this agent belongs to. `null` when the agent is not org-scoped or when the org association was not preloaded.",
3434    )
3435    originator: str | None = Field(
3436        default=None,
3437        description="Free-form label identifying the source or author that created this agent (e.g. a username or pipeline name).",
3438    )
3439    phone_number: str | None = Field(
3440        default=None,
3441        description="Phone number provisioned for this agent. `null` if SMS is not configured.",
3442    )
3443    sandbox: str | None = Field(
3444        default=None,
3445        description="ID of the sandbox environment this agent is scoped to (`dsb_...`). `null` in production deployments.",
3446    )
3447    source_solution: TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolution | None = (
3448        Field(
3449            default=None,
3450            description="Source Solution and AgentTemplate summary for agents provisioned from a Solution. Includes `upgrade_available`, `latest_version`, and `latest_solution` so you can render an upgrade badge without a separate dry-run call. `null` for hand-built agents and agents whose tracked template or parent Solution has been deleted. Populated only on single-agent GET responses, never on list endpoints.",
3451        )
3452    )
3453    team: str | None = Field(
3454        default=None,
3455        description="ID of the team that owns this agent (`tem_...`). `null` if the agent is not team-scoped.",
3456    )
3457    template_upgrade_available: bool | None = Field(
3458        default=None,
3459        description="True when the agent's last-applied template version is behind the current version of its AgentTemplate config i.e. reapplying the template (a per-agent upgrade) would bring it newer Solution content. Self-clears once the agent is reapplied. Computed on both the list endpoints and single-agent GET. Distinct from `source_solution.upgrade_available`, which compares Solution *versions*: an agent can lag its template (`template_upgrade_available: true`) while the org already holds the latest Solution version (`upgrade_available: false`).",
3460    )
3461    updated_at: str | None = Field(
3462        default=None, description="When the agent was last modified (ISO 8601)."
3463    )
3464    user: str | None = Field(
3465        default=None,
3466        description="ID of the user that owns this agent (`usr_...`). `null` if the agent is not user-scoped.",
3467    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.

Access control list for the agent. Contains a grants array where each entry specifies principal_type, principal, and actions. null when no ACL restrictions are applied and the agent is accessible to all members of its scope.

app: str | None = None

ID of the application that owns this agent (dap_...).

created_at: str | None = None

When the agent was created (ISO 8601).

default_model: str | None = None

Default LLM model identifier used by this agent when no model is specified at runtime (e.g. "claude-3-7-sonnet-latest").

description: str | None = None

Human-readable description of what the agent does. null if not set.

email: str | None = None

Email address provisioned for this agent. null if email delivery is not configured.

id: str = PydanticUndefined

Agent ID (agi_...).

identity: str | None = None

System-level identity prompt that shapes the agent's persona and behavior.

last_applied_template_config: str | None = None

ID of the AgentTemplate config (cfg_...) this agent was last provisioned or updated from. null for manually created agents.

lookup_key: str | None = None

Stable, user-defined identifier for this agent within the application. Unique per app.

metadata: dict[str, typing.Any] | None = None

Arbitrary key-value metadata attached to the agent. Not interpreted by the platform.

name: str | None = None

Human-readable display name for the agent. null if not set.

org: str | None = None

ID of the organization this agent belongs to (org_...). null if the agent is not org-scoped.

org_name: str | None = None

Display name of the organization this agent belongs to. null when the agent is not org-scoped or when the org association was not preloaded.

originator: str | None = None

Free-form label identifying the source or author that created this agent (e.g. a username or pipeline name).

phone_number: str | None = None

Phone number provisioned for this agent. null if SMS is not configured.

sandbox: str | None = None

ID of the sandbox environment this agent is scoped to (dsb_...). null in production deployments.

Source Solution and AgentTemplate summary for agents provisioned from a Solution. Includes upgrade_available, latest_version, and latest_solution so you can render an upgrade badge without a separate dry-run call. null for hand-built agents and agents whose tracked template or parent Solution has been deleted. Populated only on single-agent GET responses, never on list endpoints.

team: str | None = None

ID of the team that owns this agent (tem_...). null if the agent is not team-scoped.

template_upgrade_available: bool | None = None

True when the agent's last-applied template version is behind the current version of its AgentTemplate config i.e. reapplying the template (a per-agent upgrade) would bring it newer Solution content. Self-clears once the agent is reapplied. Computed on both the list endpoints and single-agent GET. Distinct from source_solution.upgrade_available, which compares Solution versions: an agent can lag its template (template_upgrade_available: true) while the org already holds the latest Solution version (upgrade_available: false).

updated_at: str | None = None

When the agent was last modified (ISO 8601).

user: str | None = None

ID of the user that owns this agent (usr_...). null if the agent is not user-scoped.

class TeamThreadListResponseDataItemSettings(pydantic.main.BaseModel):
3470class TeamThreadListResponseDataItemSettings(BaseModel):
3471    agent_enabled: bool | None = Field(
3472        default=None,
3473        description="Whether the AI agent is active for this thread. `true` enables AI responses; `false` disables them. Defaults to `true` when settings have not been explicitly configured. `null` when a client explicitly cleared the setting.",
3474    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
agent_enabled: bool | None = None

Whether the AI agent is active for this thread. true enables AI responses; false disables them. Defaults to true when settings have not been explicitly configured. null when a client explicitly cleared the setting.

class TeamThreadListResponseDataItem(pydantic.main.BaseModel):
3477class TeamThreadListResponseDataItem(BaseModel):
3478    agent_user: str | None = Field(
3479        default=None,
3480        description="ID of the agent that owns this thread (`agt_...`). `null` for user-owned or team-owned threads.",
3481    )
3482    created_at: str | None = Field(
3483        default=None, description="When the thread was created (ISO 8601)."
3484    )
3485    creator: str | dict[str, Any] | None = Field(
3486        default=None,
3487        description="User who created this thread. Returns a user ID (`usr_...`) by default, or an expanded user object when the association is loaded. `null` if the creator is unknown.",
3488    )
3489    description: str | None = Field(
3490        default=None,
3491        description="Optional description or purpose statement for the thread. `null` if not set.",
3492    )
3493    id: str = Field(..., description="Thread ID (`thr_...`).")
3494    is_channel: bool | None = Field(
3495        default=None,
3496        description="Whether this thread operates as a channel a multi-member broadcast-style conversation.",
3497    )
3498    is_default: bool | None = Field(
3499        default=None,
3500        description="Whether this is the default thread for its owner. Each user or team has at most one default thread.",
3501    )
3502    is_transient: bool | None = Field(
3503        default=None,
3504        description="Whether this thread is ephemeral and may be deleted automatically after a period of inactivity or when its TTL expires.",
3505    )
3506    is_unlisted: bool | None = Field(
3507        default=None,
3508        description="Whether this thread is hidden from public discovery. Unlisted threads are accessible only to direct participants.",
3509    )
3510    key: str | None = Field(
3511        default=None,
3512        description="Application-defined stable key that uniquely identifies the thread within its scope. Useful for idempotent creation. `null` if not set.",
3513    )
3514    kind: str | None = Field(
3515        default=None,
3516        description='Thread subtype: `"standard"` for ordinary threads, `"personal"` for a user-and-owned-agents roster, `"slack_mirror"` for the membership-strict mirror of a Slack channel, or `"slashwork_mirror"` for the membership-strict mirror of a Slashwork group. `personal` is an explicit user-thread creation option; mirror kinds are server-derived.',
3517    )
3518    last_activity: str | None = Field(
3519        default=None,
3520        description="When the most recent message was posted in this thread, falling back to the thread's creation time if it has no messages. Always populated on thread list endpoints (which order by it, after default threads); `null` on endpoints that don't compute activity enrichment.",
3521    )
3522    last_message_preview: str | None = Field(
3523        default=None,
3524        description="Single-line snippet of the most recent message's text content (first non-empty line, truncated to 140 characters). Populated on thread list endpoints alongside `last_activity`; `null` when the thread has no messages, the latest message has no text content (e.g. attachment-only), or the endpoint doesn't compute activity enrichment.",
3525    )
3526    last_message_sender: str | None = Field(
3527        default=None,
3528        description="Display name of the sender of the most recent message the same message `last_message_preview` snippets. Populated on thread list endpoints; `null` when the thread has no messages or the endpoint doesn't compute activity enrichment.",
3529    )
3530    metadata: dict[str, Any] | None = Field(
3531        default=None,
3532        description="Arbitrary key-value metadata attached to the thread. Shape is application-defined; `null` if no metadata has been set.",
3533    )
3534    muted: bool | None = Field(
3535        default=None,
3536        description="Whether the authenticated user has muted notifications for this thread. `true` suppresses all notification delivery.",
3537    )
3538    org: str | None = Field(
3539        default=None,
3540        description="ID of the organization this thread belongs to (`org_...`). `null` for threads outside an org context.",
3541    )
3542    parent_message: TeamThreadListResponseDataItemParentMessage | None = Field(
3543        default=None,
3544        description="The message that spawned this thread as a sub-thread. `null` for top-level threads.",
3545    )
3546    participant: list[str] | None = Field(
3547        default=None,
3548        description="Array of participant user IDs (`usr_...`) who are members of this thread.",
3549    )
3550    participants: list[TeamThreadListResponseDataItemParticipantsItem] | None = Field(
3551        default=None,
3552        description="Expanded participant user objects for each member of this thread. Populated only when the association is loaded.",
3553    )
3554    participating_actor: list[str] | None = Field(
3555        default=None,
3556        description="Composite actor identifiers for all participants currently active in this thread. Present only when actor enrichment is requested.",
3557    )
3558    participating_agents: list[TeamThreadListResponseDataItemParticipatingAgentsItem] | None = (
3559        Field(
3560            default=None,
3561            description="Expanded agent objects for all agents participating in this thread. Present only when agent enrichment is requested.",
3562        )
3563    )
3564    role: str | None = Field(
3565        default=None,
3566        description='The authenticated user\'s membership role in this thread, e.g. `"owner"`, `"member"`, or `"viewer"`. `null` if the user is not a member.',
3567    )
3568    sandbox: str | None = Field(
3569        default=None,
3570        description="ID of the developer sandbox this thread is scoped to (`dsb_...`). `null` for production threads.",
3571    )
3572    settings: TeamThreadListResponseDataItemSettings | None = Field(
3573        default=None,
3574        description="Per-thread configuration settings controlling AI agent behavior for this thread.",
3575    )
3576    slug: str | None = Field(
3577        default=None,
3578        description="URL-safe slug for the thread, used in human-readable permalinks. `null` if not assigned.",
3579    )
3580    sub_threads: list[dict[str, Any]] | None = Field(
3581        default=None,
3582        description="Threads that are nested under this thread as replies to a parent message. Present only when sub-thread enrichment is requested.",
3583    )
3584    tags: list[str] | None = Field(
3585        default=None,
3586        description='Status tags on the thread (e.g. `"blocked"`, `"needs-review"`). Edited by any thread participant via the `/threads/:thread/tags` endpoints and filterable on the thread list endpoints. Empty array if none set.',
3587    )
3588    team: str | None = Field(
3589        default=None,
3590        description="ID of the team that owns this thread (`team_...`). `null` for user-owned or agent-owned threads.",
3591    )
3592    title: str | None = Field(
3593        default=None,
3594        description="Human-readable name of the thread. `null` if no title has been set.",
3595    )
3596    ttl: str | None = Field(
3597        default=None,
3598        description="Offset-free expiry timestamp after which the thread may be automatically cleaned up. `null` if the thread does not expire.",
3599    )
3600    unread_count: int | None = Field(
3601        default=None,
3602        description="Number of messages in this thread that the authenticated user has not yet read. Present only when read-state enrichment is requested.",
3603    )
3604    updated_at: str | None = Field(
3605        default=None, description="When the thread was last modified (ISO 8601)."
3606    )
3607    user: str | None = Field(
3608        default=None,
3609        description="ID of the user who owns this thread (`usr_...`). `null` for team-owned or agent-owned threads.",
3610    )
3611    visibility: Literal["team", "restricted", "private"] = Field(
3612        ...,
3613        description="Who can read the thread: `team` for every owning-team member, `restricted` for team-readable threads with an explicit roster, or `private` for roster-only access.",
3614    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
agent_user: str | None = None

ID of the agent that owns this thread (agt_...). null for user-owned or team-owned threads.

created_at: str | None = None

When the thread was created (ISO 8601).

creator: str | dict[str, typing.Any] | None = None

User who created this thread. Returns a user ID (usr_...) by default, or an expanded user object when the association is loaded. null if the creator is unknown.

description: str | None = None

Optional description or purpose statement for the thread. null if not set.

id: str = PydanticUndefined

Thread ID (thr_...).

is_channel: bool | None = None

Whether this thread operates as a channel a multi-member broadcast-style conversation.

is_default: bool | None = None

Whether this is the default thread for its owner. Each user or team has at most one default thread.

is_transient: bool | None = None

Whether this thread is ephemeral and may be deleted automatically after a period of inactivity or when its TTL expires.

is_unlisted: bool | None = None

Whether this thread is hidden from public discovery. Unlisted threads are accessible only to direct participants.

key: str | None = None

Application-defined stable key that uniquely identifies the thread within its scope. Useful for idempotent creation. null if not set.

kind: str | None = None

Thread subtype: "standard" for ordinary threads, "personal" for a user-and-owned-agents roster, "slack_mirror" for the membership-strict mirror of a Slack channel, or "slashwork_mirror" for the membership-strict mirror of a Slashwork group. personal is an explicit user-thread creation option; mirror kinds are server-derived.

last_activity: str | None = None

When the most recent message was posted in this thread, falling back to the thread's creation time if it has no messages. Always populated on thread list endpoints (which order by it, after default threads); null on endpoints that don't compute activity enrichment.

last_message_preview: str | None = None

Single-line snippet of the most recent message's text content (first non-empty line, truncated to 140 characters). Populated on thread list endpoints alongside last_activity; null when the thread has no messages, the latest message has no text content (e.g. attachment-only), or the endpoint doesn't compute activity enrichment.

last_message_sender: str | None = None

Display name of the sender of the most recent message the same message last_message_preview snippets. Populated on thread list endpoints; null when the thread has no messages or the endpoint doesn't compute activity enrichment.

metadata: dict[str, typing.Any] | None = None

Arbitrary key-value metadata attached to the thread. Shape is application-defined; null if no metadata has been set.

muted: bool | None = None

Whether the authenticated user has muted notifications for this thread. true suppresses all notification delivery.

org: str | None = None

ID of the organization this thread belongs to (org_...). null for threads outside an org context.

parent_message: TeamThreadListResponseDataItemParentMessage | None = None

The message that spawned this thread as a sub-thread. null for top-level threads.

participant: list[str] | None = None

Array of participant user IDs (usr_...) who are members of this thread.

participants: list[TeamThreadListResponseDataItemParticipantsItem] | None = None

Expanded participant user objects for each member of this thread. Populated only when the association is loaded.

participating_actor: list[str] | None = None

Composite actor identifiers for all participants currently active in this thread. Present only when actor enrichment is requested.

participating_agents: list[TeamThreadListResponseDataItemParticipatingAgentsItem] | None = None

Expanded agent objects for all agents participating in this thread. Present only when agent enrichment is requested.

role: str | None = None

The authenticated user's membership role in this thread, e.g. "owner", "member", or "viewer". null if the user is not a member.

sandbox: str | None = None

ID of the developer sandbox this thread is scoped to (dsb_...). null for production threads.

settings: TeamThreadListResponseDataItemSettings | None = None

Per-thread configuration settings controlling AI agent behavior for this thread.

slug: str | None = None

URL-safe slug for the thread, used in human-readable permalinks. null if not assigned.

sub_threads: list[dict[str, typing.Any]] | None = None

Threads that are nested under this thread as replies to a parent message. Present only when sub-thread enrichment is requested.

tags: list[str] | None = None

Status tags on the thread (e.g. "blocked", "needs-review"). Edited by any thread participant via the /threads/:thread/tags endpoints and filterable on the thread list endpoints. Empty array if none set.

team: str | None = None

ID of the team that owns this thread (team_...). null for user-owned or agent-owned threads.

title: str | None = None

Human-readable name of the thread. null if no title has been set.

ttl: str | None = None

Offset-free expiry timestamp after which the thread may be automatically cleaned up. null if the thread does not expire.

unread_count: int | None = None

Number of messages in this thread that the authenticated user has not yet read. Present only when read-state enrichment is requested.

updated_at: str | None = None

When the thread was last modified (ISO 8601).

user: str | None = None

ID of the user who owns this thread (usr_...). null for team-owned or agent-owned threads.

visibility: Literal['team', 'restricted', 'private'] = PydanticUndefined

Who can read the thread: team for every owning-team member, restricted for team-readable threads with an explicit roster, or private for roster-only access.

class TeamThreadListResponse(pydantic.main.BaseModel):
3617class TeamThreadListResponse(BaseModel):
3618    """
3619    Successful response
3620    """
3621
3622    data: list[TeamThreadListResponseDataItem] = Field(
3623        ..., description="Array of thread objects belonging to the team."
3624    )

Successful response

data: list[TeamThreadListResponseDataItem] = PydanticUndefined

Array of thread objects belonging to the team.

class TeamThreadMetricsResponse(pydantic.main.BaseModel):
3627class TeamThreadMetricsResponse(BaseModel):
3628    """
3629    Successful response
3630    """
3631
3632    days: int
3633    end_at: datetime
3634    opened: int
3635    start_at: datetime

Successful response

days: int = PydanticUndefined
end_at: datetime.datetime = PydanticUndefined
opened: int = PydanticUndefined
start_at: datetime.datetime = PydanticUndefined
class TeamListResponseDataItemAclAddItem(pydantic.main.BaseModel):
3638class TeamListResponseDataItemAclAddItem(BaseModel):
3639    actions: list[str] = Field(
3640        ...,
3641        description='Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.',
3642    )
3643    principal: str | None = Field(
3644        default=None,
3645        description='The identifier of the principal. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`; omit entirely when `principal_type` is `"everyone"`.',
3646    )
3647    principal_type: str = Field(
3648        ...,
3649        description='The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.',
3650    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
actions: list[str] = PydanticUndefined

Array of action strings the principal is permitted to perform, e.g. ["read", "write"]. Must contain at least one entry.

principal: str | None = None

The identifier of the principal. A string ID for "user", "team", "org", and "agent" types; one of "admin", "member", or "viewer" for "org_role"; omit entirely when principal_type is "everyone".

principal_type: str = PydanticUndefined

The kind of principal receiving the grant. One of "user", "team", "org", "org_role", "agent", or "everyone".

class TeamListResponseDataItemAclGrantsItem(pydantic.main.BaseModel):
3653class TeamListResponseDataItemAclGrantsItem(BaseModel):
3654    actions: list[str] = Field(
3655        ...,
3656        description='Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.',
3657    )
3658    principal: str | None = Field(
3659        default=None,
3660        description='The identifier of the principal. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`; omit entirely when `principal_type` is `"everyone"`.',
3661    )
3662    principal_type: str = Field(
3663        ...,
3664        description='The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.',
3665    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
actions: list[str] = PydanticUndefined

Array of action strings the principal is permitted to perform, e.g. ["read", "write"]. Must contain at least one entry.

principal: str | None = None

The identifier of the principal. A string ID for "user", "team", "org", and "agent" types; one of "admin", "member", or "viewer" for "org_role"; omit entirely when principal_type is "everyone".

principal_type: str = PydanticUndefined

The kind of principal receiving the grant. One of "user", "team", "org", "org_role", "agent", or "everyone".

class TeamListResponseDataItemAclRemoveItem(pydantic.main.BaseModel):
3668class TeamListResponseDataItemAclRemoveItem(BaseModel):
3669    principal: str | None = Field(
3670        default=None,
3671        description='The identifier of the principal to remove. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`. Omit when `principal_type` is `"everyone"`.',
3672    )
3673    principal_type: str = Field(
3674        ...,
3675        description='The kind of principal to remove. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.',
3676    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
principal: str | None = None

The identifier of the principal to remove. A string ID for "user", "team", "org", and "agent" types; one of "admin", "member", or "viewer" for "org_role". Omit when principal_type is "everyone".

principal_type: str = PydanticUndefined

The kind of principal to remove. One of "user", "team", "org", "org_role", "agent", or "everyone".

class TeamListResponseDataItemAcl(pydantic.main.BaseModel):
3679class TeamListResponseDataItemAcl(BaseModel):
3680    add: list[TeamListResponseDataItemAclAddItem] | None = Field(
3681        default=None,
3682        description="Patch mode: grants to add or merge into the existing list. Cannot be combined with `grants`.",
3683    )
3684    grants: list[TeamListResponseDataItemAclGrantsItem] | None = Field(
3685        default=None,
3686        description="Replace mode: the complete new list of grants that replaces all existing entries. Send an empty array (`[]`) to clear all grants. Cannot be combined with `add` or `remove`.",
3687    )
3688    remove: list[TeamListResponseDataItemAclRemoveItem] | None = Field(
3689        default=None,
3690        description="Patch mode: principals whose grants should be removed from the existing list. Cannot be combined with `grants`.",
3691    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
add: list[TeamListResponseDataItemAclAddItem] | None = None

Patch mode: grants to add or merge into the existing list. Cannot be combined with grants.

grants: list[TeamListResponseDataItemAclGrantsItem] | None = None

Replace mode: the complete new list of grants that replaces all existing entries. Send an empty array ([]) to clear all grants. Cannot be combined with add or remove.

remove: list[TeamListResponseDataItemAclRemoveItem] | None = None

Patch mode: principals whose grants should be removed from the existing list. Cannot be combined with grants.

class TeamListResponseDataItem(pydantic.main.BaseModel):
3694class TeamListResponseDataItem(BaseModel):
3695    acl: TeamListResponseDataItemAcl | None = Field(
3696        default=None,
3697        description="Access control list governing visibility and join permissions for this team. `null` when no ACL restrictions are applied and the team inherits default access rules.",
3698    )
3699    app: str | None = Field(
3700        default=None,
3701        description="ID of the developer application this team belongs to (`dap_...`). `null` if the team is not scoped to an app.",
3702    )
3703    badges: dict[str, Any] | None = Field(
3704        default=None,
3705        description="Aggregated badge counts for the team, keyed by category. `null` when badge data is not loaded.",
3706    )
3707    created_at: datetime | None = Field(
3708        default=None, description="When this team was created (ISO 8601)."
3709    )
3710    description: str | None = Field(
3711        default=None,
3712        description="Human-readable description of the team's purpose. `null` if not set.",
3713    )
3714    id: str = Field(..., description="Team ID (`tem_...`).")
3715    membership_status: str | None = Field(
3716        default=None,
3717        description='The authenticated viewer\'s role on this team. One of `"owner"`, `"admin"`, or `"member"`. `null` if the viewer is not a member.',
3718    )
3719    metadata: dict[str, Any] | None = Field(
3720        default=None,
3721        description="Arbitrary key-value metadata attached to this team. Returns an empty object when no metadata has been set.",
3722    )
3723    name: str | None = Field(default=None, description="Display name of the team.")
3724    org: str | None = Field(
3725        default=None,
3726        description="ID of the organization this team belongs to (`org_...`). `null` if the team is not org-scoped.",
3727    )
3728    sandbox: str | None = Field(
3729        default=None,
3730        description="ID of the developer sandbox this team is scoped to (`dsb_...`). `null` outside sandbox contexts.",
3731    )
3732    slug: str | None = Field(
3733        default=None,
3734        description="URL-safe slug for the team, derived from the team name. `null` if not set.",
3735    )
3736    updated_at: datetime | None = Field(
3737        default=None, description="When this team was last updated (ISO 8601)."
3738    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
acl: TeamListResponseDataItemAcl | None = None

Access control list governing visibility and join permissions for this team. null when no ACL restrictions are applied and the team inherits default access rules.

app: str | None = None

ID of the developer application this team belongs to (dap_...). null if the team is not scoped to an app.

badges: dict[str, typing.Any] | None = None

Aggregated badge counts for the team, keyed by category. null when badge data is not loaded.

created_at: datetime.datetime | None = None

When this team was created (ISO 8601).

description: str | None = None

Human-readable description of the team's purpose. null if not set.

id: str = PydanticUndefined

Team ID (tem_...).

membership_status: str | None = None

The authenticated viewer's role on this team. One of "owner", "admin", or "member". null if the viewer is not a member.

metadata: dict[str, typing.Any] | None = None

Arbitrary key-value metadata attached to this team. Returns an empty object when no metadata has been set.

name: str | None = None

Display name of the team.

org: str | None = None

ID of the organization this team belongs to (org_...). null if the team is not org-scoped.

sandbox: str | None = None

ID of the developer sandbox this team is scoped to (dsb_...). null outside sandbox contexts.

slug: str | None = None

URL-safe slug for the team, derived from the team name. null if not set.

updated_at: datetime.datetime | None = None

When this team was last updated (ISO 8601).

class TeamListResponse(pydantic.main.BaseModel):
3741class TeamListResponse(BaseModel):
3742    """
3743    Successful response
3744    """
3745
3746    data: list[TeamListResponseDataItem] = Field(
3747        ..., description="Array of team objects for the current page."
3748    )
3749    has_next: bool = Field(..., description="`true` if there is a subsequent page of results.")
3750    has_prev: bool = Field(..., description="`true` if there is a preceding page of results.")
3751    page: int = Field(..., description="The current page number.")
3752    page_size: int = Field(..., description="The number of results per page.")
3753    total_entries: int = Field(
3754        ..., description="Total number of teams matching the query across all pages."
3755    )
3756    total_pages: int = Field(
3757        ..., description="Total number of pages given the current `page_size`."
3758    )

Successful response

data: list[TeamListResponseDataItem] = PydanticUndefined

Array of team objects for the current page.

has_next: bool = PydanticUndefined

true if there is a subsequent page of results.

has_prev: bool = PydanticUndefined

true if there is a preceding page of results.

page: int = PydanticUndefined

The current page number.

page_size: int = PydanticUndefined

The number of results per page.

total_entries: int = PydanticUndefined

Total number of teams matching the query across all pages.

total_pages: int = PydanticUndefined

Total number of pages given the current page_size.

class TeamArtifactsResponseDataItemImageSource(pydantic.main.BaseModel):
3761class TeamArtifactsResponseDataItemImageSource(BaseModel):
3762    file: str | None = Field(
3763        default=None,
3764        description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.",
3765    )
3766    height: int | None = Field(
3767        default=None, description="Height of the image in pixels. `null` if not known."
3768    )
3769    media: str | None = Field(
3770        default=None,
3771        description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.",
3772    )
3773    mime_type: str | None = Field(
3774        default=None,
3775        description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.',
3776    )
3777    refresh_url: str | None = Field(
3778        default=None,
3779        description="Endpoint URL you can call to obtain a fresh signed `url` when the current one has expired. `null` if the URL does not require refreshing.",
3780    )
3781    url: str | None = Field(
3782        default=None,
3783        description="Signed or public URL for downloading the image. May be time-limited; use `refresh_url` to obtain a new URL when this one expires.",
3784    )
3785    width: int | None = Field(
3786        default=None, description="Width of the image in pixels. `null` if not known."
3787    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
file: str | None = None

ID of the underlying storage file (fil_...). null when the image is not backed by a platform storage file.

height: int | None = None

Height of the image in pixels. null if not known.

media: str | None = None

ID of the associated media record (med_...). null when the image is not linked to a media entity.

mime_type: str | None = None

MIME type of the image, e.g. "image/png" or "image/jpeg". null if not known.

refresh_url: str | None = None

Endpoint URL you can call to obtain a fresh signed url when the current one has expired. null if the URL does not require refreshing.

url: str | None = None

Signed or public URL for downloading the image. May be time-limited; use refresh_url to obtain a new URL when this one expires.

width: int | None = None

Width of the image in pixels. null if not known.

class TeamArtifactsResponseDataItem(pydantic.main.BaseModel):
3790class TeamArtifactsResponseDataItem(BaseModel):
3791    agent: str | None = Field(
3792        default=None,
3793        description="ID of the agent that produced this artifact (`agt_...`). `null` if not agent-produced.",
3794    )
3795    content_type: str | None = Field(
3796        default=None,
3797        description='MIME type of the current version\'s file, e.g. `"text/csv"` or `"image/png"`. `null` if no file is attached.',
3798    )
3799    created_at: datetime | None = Field(
3800        default=None, description="When the artifact was first created (ISO 8601)."
3801    )
3802    current_version: str | None = Field(
3803        default=None,
3804        description="ID of the current (latest published) artifact version (`artv_...`). `null` if no version has been published.",
3805    )
3806    description: str | None = Field(
3807        default=None,
3808        description="Optional longer description of the artifact's contents or purpose. `null` if not set.",
3809    )
3810    file: str | None = Field(
3811        default=None,
3812        description="Storage file ID for the current version (`fil_...`). `null` if no file is attached.",
3813    )
3814    file_name: str | None = Field(
3815        default=None,
3816        description='Original filename of the current version\'s file, e.g. `"output.csv"`. `null` if no file is attached.',
3817    )
3818    file_url: str | None = Field(
3819        default=None,
3820        description="Short-lived signed URL for downloading the current version's file. `null` if no file is attached.",
3821    )
3822    id: str = Field(..., description="Artifact ID (`art_...`).")
3823    image_source: TeamArtifactsResponseDataItemImageSource | None = Field(
3824        default=None,
3825        description='Image source metadata for rendering the current version\'s file inline. Present only when `content_type` starts with `"image/"`. `null` otherwise.',
3826    )
3827    name: str | None = Field(
3828        default=None,
3829        description='Human-readable name for the artifact, e.g. `"Q2 Report"`. `null` if not set.',
3830    )
3831    org: str | None = Field(
3832        default=None, description="ID of the organization this artifact belongs to (`org_...`)."
3833    )
3834    sandbox: str | None = Field(
3835        default=None,
3836        description="Identifier of the sandbox environment associated with this artifact. `null` if not sandbox-scoped.",
3837    )
3838    team: str | None = Field(
3839        default=None,
3840        description="ID of the team that owns this artifact (`tea_...`). `null` if not team-scoped.",
3841    )
3842    thread: str | None = Field(
3843        default=None,
3844        description="ID of the thread in which this artifact was created (`thr_...`). `null` if not thread-scoped.",
3845    )
3846    updated_at: datetime | None = Field(
3847        default=None, description="When the artifact record was last modified (ISO 8601)."
3848    )
3849    user: str | None = Field(
3850        default=None,
3851        description="ID of the user who created this artifact (`usr_...`). `null` if not user-scoped.",
3852    )
3853    version: int | None = Field(
3854        default=None,
3855        description="Current version number of the artifact. Increments each time a new version is published.",
3856    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
agent: str | None = None

ID of the agent that produced this artifact (agt_...). null if not agent-produced.

content_type: str | None = None

MIME type of the current version's file, e.g. "text/csv" or "image/png". null if no file is attached.

created_at: datetime.datetime | None = None

When the artifact was first created (ISO 8601).

current_version: str | None = None

ID of the current (latest published) artifact version (artv_...). null if no version has been published.

description: str | None = None

Optional longer description of the artifact's contents or purpose. null if not set.

file: str | None = None

Storage file ID for the current version (fil_...). null if no file is attached.

file_name: str | None = None

Original filename of the current version's file, e.g. "output.csv". null if no file is attached.

file_url: str | None = None

Short-lived signed URL for downloading the current version's file. null if no file is attached.

id: str = PydanticUndefined

Artifact ID (art_...).

image_source: TeamArtifactsResponseDataItemImageSource | None = None

Image source metadata for rendering the current version's file inline. Present only when content_type starts with "image/". null otherwise.

name: str | None = None

Human-readable name for the artifact, e.g. "Q2 Report". null if not set.

org: str | None = None

ID of the organization this artifact belongs to (org_...).

sandbox: str | None = None

Identifier of the sandbox environment associated with this artifact. null if not sandbox-scoped.

team: str | None = None

ID of the team that owns this artifact (tea_...). null if not team-scoped.

thread: str | None = None

ID of the thread in which this artifact was created (thr_...). null if not thread-scoped.

updated_at: datetime.datetime | None = None

When the artifact record was last modified (ISO 8601).

user: str | None = None

ID of the user who created this artifact (usr_...). null if not user-scoped.

version: int | None = None

Current version number of the artifact. Increments each time a new version is published.

class TeamArtifactsResponse(pydantic.main.BaseModel):
3859class TeamArtifactsResponse(BaseModel):
3860    """
3861    Successful response
3862    """
3863
3864    data: list[TeamArtifactsResponseDataItem] = Field(
3865        ..., description="Array of artifact objects belonging to the team."
3866    )

Successful response

data: list[TeamArtifactsResponseDataItem] = PydanticUndefined

Array of artifact objects belonging to the team.

class TeamInvitesResponse(pydantic.main.BaseModel):
3869class TeamInvitesResponse(BaseModel):
3870    """
3871    Successful response
3872    """
3873
3874    code: str = Field(
3875        ...,
3876        description="Six-character alphanumeric join code. Present this value to the join-team endpoint to add a user to the team.",
3877    )

Successful response

code: str = PydanticUndefined

Six-character alphanumeric join code. Present this value to the join-team endpoint to add a user to the team.

class TeamTaskAssigneesResponseDataItemActorProfilePicture(pydantic.main.BaseModel):
3880class TeamTaskAssigneesResponseDataItemActorProfilePicture(BaseModel):
3881    file: str | None = Field(
3882        default=None,
3883        description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.",
3884    )
3885    height: int | None = Field(
3886        default=None, description="Height of the image in pixels. `null` if not known."
3887    )
3888    media: str | None = Field(
3889        default=None,
3890        description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.",
3891    )
3892    mime_type: str | None = Field(
3893        default=None,
3894        description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.',
3895    )
3896    refresh_url: str | None = Field(
3897        default=None,
3898        description="Endpoint URL you can call to obtain a fresh signed `url` when the current one has expired. `null` if the URL does not require refreshing.",
3899    )
3900    url: str | None = Field(
3901        default=None,
3902        description="Signed or public URL for downloading the image. May be time-limited; use `refresh_url` to obtain a new URL when this one expires.",
3903    )
3904    width: int | None = Field(
3905        default=None, description="Width of the image in pixels. `null` if not known."
3906    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
file: str | None = None

ID of the underlying storage file (fil_...). null when the image is not backed by a platform storage file.

height: int | None = None

Height of the image in pixels. null if not known.

media: str | None = None

ID of the associated media record (med_...). null when the image is not linked to a media entity.

mime_type: str | None = None

MIME type of the image, e.g. "image/png" or "image/jpeg". null if not known.

refresh_url: str | None = None

Endpoint URL you can call to obtain a fresh signed url when the current one has expired. null if the URL does not require refreshing.

url: str | None = None

Signed or public URL for downloading the image. May be time-limited; use refresh_url to obtain a new URL when this one expires.

width: int | None = None

Width of the image in pixels. null if not known.

class TeamTaskAssigneesResponseDataItemActor(pydantic.main.BaseModel):
3909class TeamTaskAssigneesResponseDataItemActor(BaseModel):
3910    alias: str | None = Field(
3911        default=None,
3912        description="Short handle or alias for the actor, used as an alternate display identifier. `null` if not configured.",
3913    )
3914    id: str | None = Field(
3915        default=None,
3916        description='Composite actor identifier. Format is `"user-<usr_...>"` for human users or `"agent-<agi_...>"` for agents.',
3917    )
3918    name: str | None = Field(
3919        default=None,
3920        description="Display name of the actor shown in the UI. `null` if no name is set.",
3921    )
3922    profile_picture: TeamTaskAssigneesResponseDataItemActorProfilePicture | None = Field(
3923        default=None,
3924        description="Profile picture for the actor. `null` if the actor has no profile picture.",
3925    )

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
alias: str | None = None

Short handle or alias for the actor, used as an alternate display identifier. null if not configured.

id: str | None = None

Composite actor identifier. Format is "user-<usr_...>" for human users or "agent-<agi_...>" for agents.

name: str | None = None

Display name of the actor shown in the UI. null if no name is set.

Profile picture for the actor. null if the actor has no profile picture.

class TeamTaskAssigneesResponseDataItem(pydantic.main.BaseModel):
3928class TeamTaskAssigneesResponseDataItem(BaseModel):
3929    actor: TeamTaskAssigneesResponseDataItemActor = Field(
3930        ..., description="Resolved display details for the assignable principal."
3931    )
3932    id: str = Field(..., description="User (`usr_...`) or agent (`agi_...`) ID.")
3933    type: Literal["user", "agent"] = Field(..., description="Principal type: `user` or `agent`.")

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
actor: TeamTaskAssigneesResponseDataItemActor = PydanticUndefined

Resolved display details for the assignable principal.

id: str = PydanticUndefined

User (usr_...) or agent (agi_...) ID.

type: Literal['user', 'agent'] = PydanticUndefined

Principal type: user or agent.

class TeamTaskAssigneesResponse(pydantic.main.BaseModel):
3936class TeamTaskAssigneesResponse(BaseModel):
3937    """
3938    Successful response
3939    """
3940
3941    data: list[TeamTaskAssigneesResponseDataItem] = Field(
3942        ..., description="Users and agents that can be assigned to tasks owned by the team."
3943    )

Successful response

data: list[TeamTaskAssigneesResponseDataItem] = PydanticUndefined

Users and agents that can be assigned to tasks owned by the team.

class AsyncTeamCustomObjectResource:
3946class AsyncTeamCustomObjectResource:
3947    def __init__(self, http: HttpClient):
3948        self._http = http
3949
3950    async def list(
3951        self,
3952        team: str,
3953        type: str,
3954        *,
3955        limit: int | None = None,
3956        offset: int | None = None,
3957        row_key: str | None = None,
3958        sort_key: str | None = None,
3959        query: str | None = None,
3960    ) -> TeamCustomObjectListResponse:
3961        """
3962        List a team's custom objects
3963        Returns a paginated list of custom objects owned by the specified team,
3964        filtered to a single schema type. Results are ordered by creation time
3965        descending unless `query` is provided, in which case they are ordered by
3966        full-text relevance score descending.
3967        Use `limit` and `offset` for page-based pagination. Use `row_key` or
3968        `sort_key` to narrow results to objects matching those index values.
3969        Full-text search via `query` operates only against the fields configured
3970        as `search_fields` on the schema.
3971        The authenticated user must be a member of the team with sufficient
3972        access. Returns 404 if the team is not found, the caller lacks access,
3973        or `type` does not match a registered schema for the team's organization.
3974
3975        Args:
3976            team: Team ID (`team_...`). Scopes results to objects owned by this team.
3977            type: Schema type identifier (`lookup_key`) that filters results to objects of this schema.
3978            limit: Maximum number of objects to return per page.
3979            offset: Number of objects to skip before returning results. Use with `limit` for page-based pagination.
3980            row_key: Filter results to objects whose `row_key` exactly matches this value.
3981            sort_key: Filter results to objects whose `sort_key` exactly matches this value.
3982            query: Full-text search string matched against the schema's configured `search_fields`. When provided, results are ordered by relevance score descending instead of creation time descending.
3983
3984        Returns:
3985            Successful response
3986        """
3987        query: dict[str, object] = {}
3988        query["type"] = type
3989        if limit is not None:
3990            query["limit"] = limit
3991        if offset is not None:
3992            query["offset"] = offset
3993        if row_key is not None:
3994            query["row_key"] = row_key
3995        if sort_key is not None:
3996            query["sort_key"] = sort_key
3997        if query is not None:
3998            query["query"] = query
3999        return await self._http.request(
4000            f"/api/v1/teams/{team}/custom_objects",
4001            query=query,
4002            response_type=TeamCustomObjectListResponse,
4003        )
4004
4005    async def create(self, team: str, input: TeamCustomObjectCreateInput) -> CustomObject:
4006        """
4007        Create a team custom object
4008        Creates a new custom object owned by the specified team. The object is
4009        instantiated against the schema identified by `type` (the schema's
4010        `lookup_key`). All field values are validated against that schema's
4011        field definitions before the object is persisted.
4012        The authenticated user must be a member of the team with sufficient
4013        access. If the team is not found or the caller lacks access, the endpoint
4014        returns 404. If `type` does not match a registered schema for the team's
4015        organization, the endpoint also returns 404.
4016
4017        Args:
4018            team: Team ID (`team_...`). Scopes results to objects owned by this team.
4019            input: Request body.
4020            input.fields: Map of field values to set on the new object. Keys and value types must conform to the schema identified by `type`.
4021            input.type: Schema type identifier (`lookup_key`) that defines the object's fields and validation rules.
4022
4023        Returns:
4024            The newly created custom object.
4025        """
4026        return await self._http.request(
4027            f"/api/v1/teams/{team}/custom_objects",
4028            method="POST",
4029            body=input,
4030            response_type=CustomObject,
4031        )
AsyncTeamCustomObjectResource(http: archastro.platform.runtime.http_client.HttpClient)
3947    def __init__(self, http: HttpClient):
3948        self._http = http
async def list( self, team: str, type: str, *, limit: int | None = None, offset: int | None = None, row_key: str | None = None, sort_key: str | None = None, query: str | None = None) -> TeamCustomObjectListResponse:
3950    async def list(
3951        self,
3952        team: str,
3953        type: str,
3954        *,
3955        limit: int | None = None,
3956        offset: int | None = None,
3957        row_key: str | None = None,
3958        sort_key: str | None = None,
3959        query: str | None = None,
3960    ) -> TeamCustomObjectListResponse:
3961        """
3962        List a team's custom objects
3963        Returns a paginated list of custom objects owned by the specified team,
3964        filtered to a single schema type. Results are ordered by creation time
3965        descending unless `query` is provided, in which case they are ordered by
3966        full-text relevance score descending.
3967        Use `limit` and `offset` for page-based pagination. Use `row_key` or
3968        `sort_key` to narrow results to objects matching those index values.
3969        Full-text search via `query` operates only against the fields configured
3970        as `search_fields` on the schema.
3971        The authenticated user must be a member of the team with sufficient
3972        access. Returns 404 if the team is not found, the caller lacks access,
3973        or `type` does not match a registered schema for the team's organization.
3974
3975        Args:
3976            team: Team ID (`team_...`). Scopes results to objects owned by this team.
3977            type: Schema type identifier (`lookup_key`) that filters results to objects of this schema.
3978            limit: Maximum number of objects to return per page.
3979            offset: Number of objects to skip before returning results. Use with `limit` for page-based pagination.
3980            row_key: Filter results to objects whose `row_key` exactly matches this value.
3981            sort_key: Filter results to objects whose `sort_key` exactly matches this value.
3982            query: Full-text search string matched against the schema's configured `search_fields`. When provided, results are ordered by relevance score descending instead of creation time descending.
3983
3984        Returns:
3985            Successful response
3986        """
3987        query: dict[str, object] = {}
3988        query["type"] = type
3989        if limit is not None:
3990            query["limit"] = limit
3991        if offset is not None:
3992            query["offset"] = offset
3993        if row_key is not None:
3994            query["row_key"] = row_key
3995        if sort_key is not None:
3996            query["sort_key"] = sort_key
3997        if query is not None:
3998            query["query"] = query
3999        return await self._http.request(
4000            f"/api/v1/teams/{team}/custom_objects",
4001            query=query,
4002            response_type=TeamCustomObjectListResponse,
4003        )

List a team's custom objects Returns a paginated list of custom objects owned by the specified team, filtered to a single schema type. Results are ordered by creation time descending unless query is provided, in which case they are ordered by full-text relevance score descending. Use limit and offset for page-based pagination. Use row_key or sort_key to narrow results to objects matching those index values. Full-text search via query operates only against the fields configured as search_fields on the schema. The authenticated user must be a member of the team with sufficient access. Returns 404 if the team is not found, the caller lacks access, or type does not match a registered schema for the team's organization.

Arguments:
  • team: Team ID (team_...). Scopes results to objects owned by this team.
  • type: Schema type identifier (lookup_key) that filters results to objects of this schema.
  • limit: Maximum number of objects to return per page.
  • offset: Number of objects to skip before returning results. Use with limit for page-based pagination.
  • row_key: Filter results to objects whose row_key exactly matches this value.
  • sort_key: Filter results to objects whose sort_key exactly matches this value.
  • query: Full-text search string matched against the schema's configured search_fields. When provided, results are ordered by relevance score descending instead of creation time descending.
Returns:

Successful response

async def create( self, team: str, input: TeamCustomObjectCreateInput) -> archastro.platform.types.common.CustomObject:
4005    async def create(self, team: str, input: TeamCustomObjectCreateInput) -> CustomObject:
4006        """
4007        Create a team custom object
4008        Creates a new custom object owned by the specified team. The object is
4009        instantiated against the schema identified by `type` (the schema's
4010        `lookup_key`). All field values are validated against that schema's
4011        field definitions before the object is persisted.
4012        The authenticated user must be a member of the team with sufficient
4013        access. If the team is not found or the caller lacks access, the endpoint
4014        returns 404. If `type` does not match a registered schema for the team's
4015        organization, the endpoint also returns 404.
4016
4017        Args:
4018            team: Team ID (`team_...`). Scopes results to objects owned by this team.
4019            input: Request body.
4020            input.fields: Map of field values to set on the new object. Keys and value types must conform to the schema identified by `type`.
4021            input.type: Schema type identifier (`lookup_key`) that defines the object's fields and validation rules.
4022
4023        Returns:
4024            The newly created custom object.
4025        """
4026        return await self._http.request(
4027            f"/api/v1/teams/{team}/custom_objects",
4028            method="POST",
4029            body=input,
4030            response_type=CustomObject,
4031        )

Create a team custom object Creates a new custom object owned by the specified team. The object is instantiated against the schema identified by type (the schema's lookup_key). All field values are validated against that schema's field definitions before the object is persisted. The authenticated user must be a member of the team with sufficient access. If the team is not found or the caller lacks access, the endpoint returns 404. If type does not match a registered schema for the team's organization, the endpoint also returns 404.

Arguments:
  • team: Team ID (team_...). Scopes results to objects owned by this team.
  • input: Request body.
  • input.fields: Map of field values to set on the new object. Keys and value types must conform to the schema identified by type.
  • input.type: Schema type identifier (lookup_key) that defines the object's fields and validation rules.
Returns:

The newly created custom object.

class AsyncMemberResource:
4034class AsyncMemberResource:
4035    def __init__(self, http: HttpClient):
4036        self._http = http
4037
4038    async def remove(self, team: str) -> None:
4039        """
4040        Remove a member or org from a team
4041        Removes a user, agent, or all members of an organization from the specified
4042        team. Provide exactly one of `user`, `agent`, or `org` supplying more than
4043        one or none returns a 400 error. On success, returns 204 No Content.
4044        When `org` is provided, every user and agent membership belonging to that org
4045        is removed in a single call. The caller must be a member of the team's owning
4046        org to perform an org-scoped removal. You cannot target the team's owning org
4047        itself with this parameter.
4048        The caller must have permission to manage the team. When `app` is present, the
4049        request is scoped to that app and requires a valid app-scoped token.
4050
4051        Args:
4052            team: Team ID (`team_...`). The team to remove the member from.
4053
4054        Returns:
4055            Empty response. Returns 204 No Content on success.
4056        """
4057        await self._http.request(f"/api/v1/teams/{team}/members", method="DELETE")
4058
4059    async def list(self, team: str) -> MemberListResponse:
4060        """
4061        List members of a team
4062        Returns all members of the specified team, including both users and agents.
4063        Members are returned in a single non-paginated array ordered by join time.
4064        Bearer-authenticated users must be a member of the team to retrieve its
4065        member list. Developer and server-to-server callers can retrieve members for
4066        any team visible to their app scope. When `app` is provided, the request is
4067        scoped to that app and requires a valid app-scoped token.
4068
4069        Args:
4070            team: Team ID (`team_...`). The team to remove the member from.
4071
4072        Returns:
4073            Successful response
4074        """
4075        return await self._http.request(
4076            f"/api/v1/teams/{team}/members",
4077            response_type=MemberListResponse,
4078        )
4079
4080    async def create(self, team: str, input: MemberCreateInput) -> TeamMembership:
4081        """
4082        Add a member to a team
4083        Adds a user or agent as a member of the specified team and returns the new
4084        membership with HTTP 201. Provide exactly one of `user` or `agent` supplying
4085        both or neither returns a 400 error.
4086        Adding a user requires permission to manage the team (team owner, team
4087        admin, or org admin). Adding an agent with the default `"member"` role is
4088        also open to any existing member of the team; assigning an elevated role to
4089        an agent still requires team-manage permission. When an `app` is provided,
4090        the request is scoped to that app and the caller must hold a valid app-scoped
4091        token. The default role is `"member"` when `role` is omitted.
4092
4093        Args:
4094            team: Team ID (`team_...`). The team to remove the member from.
4095            input: Request body.
4096            input.agent: Agent ID (`agt_...`) to add as a member. Provide exactly one of `user` or `agent`.
4097            input.role: Role to assign. One of `"owner"`, `"admin"`, or `"member"`. Defaults to `"member"` when omitted.
4098            input.user: User ID (`usr_...`) to add as a member. Provide exactly one of `user` or `agent`.
4099
4100        Returns:
4101            The newly created team membership.
4102        """
4103        return await self._http.request(
4104            f"/api/v1/teams/{team}/members",
4105            method="POST",
4106            body=input,
4107            response_type=TeamMembership,
4108        )
4109
4110    async def update(self, team: str, user: str, input: MemberUpdateInput) -> TeamMembership:
4111        """
4112        Update a team member's role
4113        Changes the role of an existing user member on the specified team. Returns the
4114        updated membership on success.
4115        Only user memberships are supported by this endpoint. Attempting to update an
4116        agent membership returns 404. To change an agent's role, remove the existing
4117        membership and re-add the agent with the desired role.
4118        The caller must have permission to modify the team. You cannot change a member's
4119        role across organization boundaries. Demoting the last owner of a team returns
4120        409. An invalid `role` value returns 422. When `app` is provided, the request
4121        is scoped to that app and requires a valid app-scoped token.
4122
4123        Args:
4124            team: Team ID (`team_...`). The team to remove the member from.
4125            user: User ID (`usr_...`) of the existing member whose role should be changed.
4126            input: Request body.
4127            input.role: New role to assign. One of `"owner"`, `"admin"`, or `"member"`.
4128
4129        Returns:
4130            The updated team membership reflecting the new role.
4131        """
4132        return await self._http.request(
4133            f"/api/v1/teams/{team}/members/{user}",
4134            method="PATCH",
4135            body=input,
4136            response_type=TeamMembership,
4137        )
AsyncMemberResource(http: archastro.platform.runtime.http_client.HttpClient)
4035    def __init__(self, http: HttpClient):
4036        self._http = http
async def remove(self, team: str) -> None:
4038    async def remove(self, team: str) -> None:
4039        """
4040        Remove a member or org from a team
4041        Removes a user, agent, or all members of an organization from the specified
4042        team. Provide exactly one of `user`, `agent`, or `org` supplying more than
4043        one or none returns a 400 error. On success, returns 204 No Content.
4044        When `org` is provided, every user and agent membership belonging to that org
4045        is removed in a single call. The caller must be a member of the team's owning
4046        org to perform an org-scoped removal. You cannot target the team's owning org
4047        itself with this parameter.
4048        The caller must have permission to manage the team. When `app` is present, the
4049        request is scoped to that app and requires a valid app-scoped token.
4050
4051        Args:
4052            team: Team ID (`team_...`). The team to remove the member from.
4053
4054        Returns:
4055            Empty response. Returns 204 No Content on success.
4056        """
4057        await self._http.request(f"/api/v1/teams/{team}/members", method="DELETE")

Remove a member or org from a team Removes a user, agent, or all members of an organization from the specified team. Provide exactly one of user, agent, or org supplying more than one or none returns a 400 error. On success, returns 204 No Content. When org is provided, every user and agent membership belonging to that org is removed in a single call. The caller must be a member of the team's owning org to perform an org-scoped removal. You cannot target the team's owning org itself with this parameter. The caller must have permission to manage the team. When app is present, the request is scoped to that app and requires a valid app-scoped token.

Arguments:
  • team: Team ID (team_...). The team to remove the member from.
Returns:

Empty response. Returns 204 No Content on success.

async def list( self, team: str) -> MemberListResponse:
4059    async def list(self, team: str) -> MemberListResponse:
4060        """
4061        List members of a team
4062        Returns all members of the specified team, including both users and agents.
4063        Members are returned in a single non-paginated array ordered by join time.
4064        Bearer-authenticated users must be a member of the team to retrieve its
4065        member list. Developer and server-to-server callers can retrieve members for
4066        any team visible to their app scope. When `app` is provided, the request is
4067        scoped to that app and requires a valid app-scoped token.
4068
4069        Args:
4070            team: Team ID (`team_...`). The team to remove the member from.
4071
4072        Returns:
4073            Successful response
4074        """
4075        return await self._http.request(
4076            f"/api/v1/teams/{team}/members",
4077            response_type=MemberListResponse,
4078        )

List members of a team Returns all members of the specified team, including both users and agents. Members are returned in a single non-paginated array ordered by join time. Bearer-authenticated users must be a member of the team to retrieve its member list. Developer and server-to-server callers can retrieve members for any team visible to their app scope. When app is provided, the request is scoped to that app and requires a valid app-scoped token.

Arguments:
  • team: Team ID (team_...). The team to remove the member from.
Returns:

Successful response

async def create( self, team: str, input: MemberCreateInput) -> archastro.platform.types.teams.TeamMembership:
4080    async def create(self, team: str, input: MemberCreateInput) -> TeamMembership:
4081        """
4082        Add a member to a team
4083        Adds a user or agent as a member of the specified team and returns the new
4084        membership with HTTP 201. Provide exactly one of `user` or `agent` supplying
4085        both or neither returns a 400 error.
4086        Adding a user requires permission to manage the team (team owner, team
4087        admin, or org admin). Adding an agent with the default `"member"` role is
4088        also open to any existing member of the team; assigning an elevated role to
4089        an agent still requires team-manage permission. When an `app` is provided,
4090        the request is scoped to that app and the caller must hold a valid app-scoped
4091        token. The default role is `"member"` when `role` is omitted.
4092
4093        Args:
4094            team: Team ID (`team_...`). The team to remove the member from.
4095            input: Request body.
4096            input.agent: Agent ID (`agt_...`) to add as a member. Provide exactly one of `user` or `agent`.
4097            input.role: Role to assign. One of `"owner"`, `"admin"`, or `"member"`. Defaults to `"member"` when omitted.
4098            input.user: User ID (`usr_...`) to add as a member. Provide exactly one of `user` or `agent`.
4099
4100        Returns:
4101            The newly created team membership.
4102        """
4103        return await self._http.request(
4104            f"/api/v1/teams/{team}/members",
4105            method="POST",
4106            body=input,
4107            response_type=TeamMembership,
4108        )

Add a member to a team Adds a user or agent as a member of the specified team and returns the new membership with HTTP 201. Provide exactly one of user or agent supplying both or neither returns a 400 error. Adding a user requires permission to manage the team (team owner, team admin, or org admin). Adding an agent with the default "member" role is also open to any existing member of the team; assigning an elevated role to an agent still requires team-manage permission. When an app is provided, the request is scoped to that app and the caller must hold a valid app-scoped token. The default role is "member" when role is omitted.

Arguments:
  • team: Team ID (team_...). The team to remove the member from.
  • input: Request body.
  • input.agent: Agent ID (agt_...) to add as a member. Provide exactly one of user or agent.
  • input.role: Role to assign. One of "owner", "admin", or "member". Defaults to "member" when omitted.
  • input.user: User ID (usr_...) to add as a member. Provide exactly one of user or agent.
Returns:

The newly created team membership.

async def update( self, team: str, user: str, input: MemberUpdateInput) -> archastro.platform.types.teams.TeamMembership:
4110    async def update(self, team: str, user: str, input: MemberUpdateInput) -> TeamMembership:
4111        """
4112        Update a team member's role
4113        Changes the role of an existing user member on the specified team. Returns the
4114        updated membership on success.
4115        Only user memberships are supported by this endpoint. Attempting to update an
4116        agent membership returns 404. To change an agent's role, remove the existing
4117        membership and re-add the agent with the desired role.
4118        The caller must have permission to modify the team. You cannot change a member's
4119        role across organization boundaries. Demoting the last owner of a team returns
4120        409. An invalid `role` value returns 422. When `app` is provided, the request
4121        is scoped to that app and requires a valid app-scoped token.
4122
4123        Args:
4124            team: Team ID (`team_...`). The team to remove the member from.
4125            user: User ID (`usr_...`) of the existing member whose role should be changed.
4126            input: Request body.
4127            input.role: New role to assign. One of `"owner"`, `"admin"`, or `"member"`.
4128
4129        Returns:
4130            The updated team membership reflecting the new role.
4131        """
4132        return await self._http.request(
4133            f"/api/v1/teams/{team}/members/{user}",
4134            method="PATCH",
4135            body=input,
4136            response_type=TeamMembership,
4137        )

Update a team member's role Changes the role of an existing user member on the specified team. Returns the updated membership on success. Only user memberships are supported by this endpoint. Attempting to update an agent membership returns 404. To change an agent's role, remove the existing membership and re-add the agent with the desired role. The caller must have permission to modify the team. You cannot change a member's role across organization boundaries. Demoting the last owner of a team returns

  1. An invalid role value returns 422. When app is provided, the request is scoped to that app and requires a valid app-scoped token.
Arguments:
  • team: Team ID (team_...). The team to remove the member from.
  • user: User ID (usr_...) of the existing member whose role should be changed.
  • input: Request body.
  • input.role: New role to assign. One of "owner", "admin", or "member".
Returns:

The updated team membership reflecting the new role.

class AsyncTeamTaskResource:
4140class AsyncTeamTaskResource:
4141    def __init__(self, http: HttpClient):
4142        self._http = http
4143
4144    async def list(
4145        self,
4146        team: str,
4147        *,
4148        user: str | None = None,
4149        org: str | None = None,
4150        status: str | None = None,
4151        owner_user: str | None = None,
4152        owner_agent: str | None = None,
4153        priority: int | None = None,
4154        tag: str | None = None,
4155        parent: str | None = None,
4156        source_scope: str | None = None,
4157        source_type: str | None = None,
4158        source_id: str | None = None,
4159        epic: str | None = None,
4160        search: str | None = None,
4161        sort: str | None = None,
4162        order: str | None = None,
4163        due_before: str | None = None,
4164        due_after: str | None = None,
4165        overdue: bool | None = None,
4166        ready: bool | None = None,
4167        limit: int | None = None,
4168        after_cursor: str | None = None,
4169    ) -> TeamTaskListResponse:
4170        """
4171        List an owner's tasks
4172        Returns tasks owned by the specified user or team. You can narrow results using the
4173        optional filters below. By default results are returned in reverse chronological
4174        order (most recently created first); use `sort` and `order` to sort by due date or
4175        priority instead.
4176        User-authenticated callers may list their personal tasks or tasks for teams they
4177        have joined. Privileged callers provide the owner in the route; the owner's
4178        organization is implied by that principal. An explicit `org` is optional and,
4179        when set, must match the owner's organization.
4180
4181        Args:
4182            team: Team ID (`tem_...`). Only tasks belonging to this team are returned.
4183            user: User ID (`usr_...`) for user-scoped tasks.
4184            org: Optional organization (`org_...`) for developer and server-to-server calls. When omitted, the org is taken from the owner principal (team, user, or agent). When set, it must match that principal's org; pass null for an owner outside an organization.
4185            status: Filter tasks by status. One of `"open"`, `"in_progress"`, or `"done"`. Omit to return tasks in all statuses.
4186            owner_user: Filter tasks assigned to a specific user. Provide the user's public ID (`usr_...`).
4187            owner_agent: Filter tasks assigned to a specific agent. Provide the agent's public ID (`agi_...`).
4188            priority: Filter tasks by priority, from 0 (highest) to 4 (lowest).
4189            tag: Return only tasks carrying this tag (matched against the canonical lowercase form).
4190            parent: Return only subtasks of the given task (`tsk_...`), or pass `none` to return only top-level tasks.
4191            source_scope: Return only tasks whose source matches this container. Must be supplied with `source_type` and `source_id`.
4192            source_type: Return only tasks whose source matches this object kind. Must be supplied with the other source filters.
4193            source_id: Return only tasks whose source matches this object identity. Must be supplied with the other source filters.
4194            epic: Return only tasks with this exact epic label.
4195            search: Restrict results to tasks whose name or description contains this string.
4196            sort: Sort key. One of `"created"` (default most recently created first), `"due_date"` (soonest due first; tasks without a due date always sort last), or `"priority"` (most urgent first). Ties break by most recently created.
4197            order: Sort direction, `"asc"` or `"desc"`. Defaults to `"desc"` for `created` and `"asc"` for `due_date` and `priority`.
4198            due_before: Return only tasks with a due date strictly before this ISO 8601 datetime (`2026-08-01T00:00:00Z`) or date (`2026-08-01`, meaning midnight UTC). Tasks without a due date are excluded.
4199            due_after: Return only tasks with a due date strictly after this ISO 8601 datetime or date. Tasks without a due date are excluded.
4200            overdue: When `true`, return only overdue tasks: a due date before the current UTC day and a status other than `"done"`. A task due today is not overdue.
4201            ready: When true, return only open tasks with no unfinished blockers and no active session lease. This is a projection snapshot; claim a lease before starting work.
4202            limit: Maximum number of tasks to return. Capped at 100.
4203            after_cursor: Opaque cursor returned by the previous page.
4204
4205        Returns:
4206            Successful response
4207        """
4208        query: dict[str, object] = {}
4209        if user is not None:
4210            query["user"] = user
4211        if org is not None:
4212            query["org"] = org
4213        if status is not None:
4214            query["status"] = status
4215        if owner_user is not None:
4216            query["owner_user"] = owner_user
4217        if owner_agent is not None:
4218            query["owner_agent"] = owner_agent
4219        if priority is not None:
4220            query["priority"] = priority
4221        if tag is not None:
4222            query["tag"] = tag
4223        if parent is not None:
4224            query["parent"] = parent
4225        if source_scope is not None:
4226            query["source_scope"] = source_scope
4227        if source_type is not None:
4228            query["source_type"] = source_type
4229        if source_id is not None:
4230            query["source_id"] = source_id
4231        if epic is not None:
4232            query["epic"] = epic
4233        if search is not None:
4234            query["search"] = search
4235        if sort is not None:
4236            query["sort"] = sort
4237        if order is not None:
4238            query["order"] = order
4239        if due_before is not None:
4240            query["due_before"] = due_before
4241        if due_after is not None:
4242            query["due_after"] = due_after
4243        if overdue is not None:
4244            query["overdue"] = overdue
4245        if ready is not None:
4246            query["ready"] = ready
4247        if limit is not None:
4248            query["limit"] = limit
4249        if after_cursor is not None:
4250            query["after_cursor"] = after_cursor
4251        return await self._http.request(
4252            f"/api/v1/teams/{team}/tasks",
4253            query=query,
4254            response_type=TeamTaskListResponse,
4255        )
4256
4257    async def create(self, team: str, input: TeamTaskCreateInput) -> Task:
4258        """
4259        Create a task for an owner
4260        Creates a new task owned by the specified user or team and returns the full
4261        task object. User-authenticated calls are attributed to the authenticated
4262        user or agent. App-scoped developer and server-to-server callers must provide
4263        the task's explicit `org` scope and an explicit `user` or `agent` actor for
4264        team tasks; a user-owned task reuses the user in the route unless an explicit
4265        agent is supplied. Every referenced principal is validated against the app,
4266        owner, and team membership before creation.
4267
4268        Args:
4269            team: Team ID (`tem_...`). Only tasks belonging to this team are returned.
4270            input: Request body.
4271            input.agent: Explicit acting agent (`agi_...`) for a developer or server-to-server call. Mutually exclusive with an acting `user`; the agent must belong to the task owner.
4272            input.org: Explicit organization (`org_...`) for developer and server-to-server calls. Pass null when the owner is not organization-scoped. The value must match the selected user or team.
4273            input.task: Attributes for the task to create. `name` is required; all other fields are optional.
4274            input.user: User ID (`usr_...`). On a user route this is the task owner and creator; on a team route it is the explicit acting user for a developer or server-to-server call.
4275
4276        Returns:
4277            The newly created task.
4278        """
4279        return await self._http.request(
4280            f"/api/v1/teams/{team}/tasks",
4281            method="POST",
4282            body=input,
4283            response_type=Task,
4284        )
4285
4286    async def blocker_cycles(
4287        self,
4288        team: str,
4289        *,
4290        user: str | None = None,
4291        org: str | None = None,
4292        limit: int | None = None,
4293        after_cursor: str | None = None,
4294    ) -> TeamTaskBlockerCyclesResponse:
4295        """
4296        List task blocker cycles
4297        Runs an on-demand diagnostic over unfinished tasks owned by the specified
4298        team or user and returns a forward cursor-paginated page of complete cyclic
4299        blocker components. Detection is bounded to owners with at most 100
4300        unfinished tasks. This endpoint is read-only: cycles do not prevent task
4301        updates, lease acquisition, or completion.
4302
4303        Args:
4304            team: Team ID (`tem_...`). Only tasks belonging to this team are returned.
4305            user: User ID (`usr_...`) owning the tasks.
4306            org: Optional organization context for privileged callers.
4307            limit: Maximum cycle components to return. Defaults to 50; maximum is 100.
4308            after_cursor: Opaque cursor returned by the preceding page.
4309
4310        Returns:
4311            Successful response
4312        """
4313        query: dict[str, object] = {}
4314        if user is not None:
4315            query["user"] = user
4316        if org is not None:
4317            query["org"] = org
4318        if limit is not None:
4319            query["limit"] = limit
4320        if after_cursor is not None:
4321            query["after_cursor"] = after_cursor
4322        return await self._http.request(
4323            f"/api/v1/teams/{team}/tasks/blocker_cycles",
4324            query=query,
4325            response_type=TeamTaskBlockerCyclesResponse,
4326        )
4327
4328    async def metrics(self, team: str, *, days: int | None = None) -> TeamTaskMetricsResponse:
4329        """
4330        Get task activity metrics for a team
4331        Returns task activity metrics scoped to one team (the Network in ArchAgents).
4332        `open` counts currently open or in-progress team tasks, `created` counts
4333        tasks inserted in the UTC-day window, and `completed` counts tasks whose
4334        `closed_at` falls in that window while still in a closed status. Hard-deleted
4335        tasks are absent from the projection and therefore omitted. The daily series
4336        is zero-filled across the requested window and includes reconstructed
4337        end-of-day `open` stock (from remaining projection rows' inserted_at/closed_at).
4338        Any authenticated team member may read this count-only Network summary.
4339        Requests from callers without team access return 404 so team existence is
4340        not disclosed.
4341
4342        Args:
4343            team: Team ID (`tem_...`). Only tasks belonging to this team are returned.
4344            days: UTC-day window. One of 7, 30, 90, or 365; defaults to 30.
4345
4346        Returns:
4347            Successful response
4348        """
4349        query: dict[str, object] = {}
4350        if days is not None:
4351            query["days"] = days
4352        return await self._http.request(
4353            f"/api/v1/teams/{team}/tasks/metrics",
4354            query=query,
4355            response_type=TeamTaskMetricsResponse,
4356        )
4357
4358    async def ready(
4359        self,
4360        team: str,
4361        *,
4362        user: str | None = None,
4363        org: str | None = None,
4364        explain: bool | None = None,
4365        assigned_to_me: bool | None = None,
4366        source_scope: str | None = None,
4367        source_type: str | None = None,
4368        source_id: str | None = None,
4369        epic: str | None = None,
4370        limit: int | None = None,
4371        after_cursor: str | None = None,
4372    ) -> TeamTaskReadyResponse:
4373        """
4374        List an owner's ready tasks
4375        Returns open tasks with no unfinished blockers and no active session lease.
4376        Readiness is calculated by the server from the current task projection. It is
4377        a snapshot, not a reservation; claim a task lease before starting work.
4378        Pass `explain=true` to include every open task with a stable readiness reason.
4379
4380        Args:
4381            team: Team ID (`tem_...`). Only tasks belonging to this team are returned.
4382            user: User ID (`usr_...`) owning the tasks.
4383            org: Optional organization context for privileged callers.
4384            explain: Include blocked and actively leased open tasks with exclusion reasons.
4385            assigned_to_me: Only include tasks assigned to the authenticated user.
4386            source_scope: Only include tasks whose source matches this container. Must be supplied with `source_type` and `source_id`.
4387            source_type: Only include tasks whose source matches this object kind.
4388            source_id: Only include tasks whose source matches this object identity.
4389            epic: Only include tasks with this exact epic label.
4390            limit: Maximum number of readiness entries to return. Capped at 100.
4391            after_cursor: Opaque cursor returned by the previous page.
4392
4393        Returns:
4394            Successful response
4395        """
4396        query: dict[str, object] = {}
4397        if user is not None:
4398            query["user"] = user
4399        if org is not None:
4400            query["org"] = org
4401        if explain is not None:
4402            query["explain"] = explain
4403        if assigned_to_me is not None:
4404            query["assigned_to_me"] = assigned_to_me
4405        if source_scope is not None:
4406            query["source_scope"] = source_scope
4407        if source_type is not None:
4408            query["source_type"] = source_type
4409        if source_id is not None:
4410            query["source_id"] = source_id
4411        if epic is not None:
4412            query["epic"] = epic
4413        if limit is not None:
4414            query["limit"] = limit
4415        if after_cursor is not None:
4416            query["after_cursor"] = after_cursor
4417        return await self._http.request(
4418            f"/api/v1/teams/{team}/tasks/ready",
4419            query=query,
4420            response_type=TeamTaskReadyResponse,
4421        )
4422
4423    async def search(
4424        self,
4425        team: str,
4426        *,
4427        user: str | None = None,
4428        org: str | None = None,
4429        q: str | None = None,
4430        query: str | None = None,
4431        status: str | None = None,
4432        owner_user: str | None = None,
4433        owner_agent: str | None = None,
4434        priority: int | None = None,
4435        tag: str | None = None,
4436        parent: str | None = None,
4437        source_scope: str | None = None,
4438        source_type: str | None = None,
4439        source_id: str | None = None,
4440        epic: str | None = None,
4441        limit: int | None = None,
4442        after_cursor: str | None = None,
4443    ) -> TeamTaskSearchResponse:
4444        """
4445        Search an owner's tasks
4446        Performs a full-text search over tasks owned by the specified user or team and returns
4447        matching results. Combine `q` with the optional filters to narrow the result set
4448        further. When no query is provided, the endpoint behaves like a filtered list.
4449        The `query` field in the response echoes the effective search query.
4450        User-authenticated callers may search their personal tasks or tasks for teams
4451        they have joined. Privileged callers provide the owner in the route; the owner's
4452        organization is implied by that principal. An explicit `org` is optional and,
4453        when set, must match the owner's organization.
4454
4455        Args:
4456            team: Team ID (`tem_...`). Only tasks belonging to this team are returned.
4457            user: User ID (`usr_...`) whose tasks are searched.
4458            org: Optional organization (`org_...`) for developer and server-to-server calls. When omitted, the org is taken from the owner principal (team, user, or agent). When set, it must match that principal's org; pass null for an owner outside an organization.
4459            q: Full-text search query matched against task names and descriptions. Takes precedence over `query` when both are provided.
4460            query: Alias for `q`. Use `q` when possible; this parameter exists for compatibility.
4461            status: Filter results by status. One of `"open"`, `"in_progress"`, or `"done"`. Omit to include all statuses.
4462            owner_user: Restrict results to tasks assigned to the user with this public ID (`usr_...`).
4463            owner_agent: Restrict results to tasks assigned to the agent with this public ID (`agi_...`).
4464            priority: Filter results by priority, from 0 (highest) to 4 (lowest).
4465            tag: Return only tasks carrying this tag (matched against the canonical lowercase form).
4466            parent: Return only subtasks of the given task (`tsk_...`), or pass `none` to return only top-level tasks.
4467            source_scope: Return only tasks whose source matches this container. Must be supplied with `source_type` and `source_id`.
4468            source_type: Return only tasks whose source matches this object kind.
4469            source_id: Return only tasks whose source matches this object identity.
4470            epic: Return only tasks with this exact epic label.
4471            limit: Maximum number of tasks to return. Capped at 100.
4472            after_cursor: Opaque cursor returned by the previous page.
4473
4474        Returns:
4475            Successful response
4476        """
4477        query: dict[str, object] = {}
4478        if user is not None:
4479            query["user"] = user
4480        if org is not None:
4481            query["org"] = org
4482        if q is not None:
4483            query["q"] = q
4484        if query is not None:
4485            query["query"] = query
4486        if status is not None:
4487            query["status"] = status
4488        if owner_user is not None:
4489            query["owner_user"] = owner_user
4490        if owner_agent is not None:
4491            query["owner_agent"] = owner_agent
4492        if priority is not None:
4493            query["priority"] = priority
4494        if tag is not None:
4495            query["tag"] = tag
4496        if parent is not None:
4497            query["parent"] = parent
4498        if source_scope is not None:
4499            query["source_scope"] = source_scope
4500        if source_type is not None:
4501            query["source_type"] = source_type
4502        if source_id is not None:
4503            query["source_id"] = source_id
4504        if epic is not None:
4505            query["epic"] = epic
4506        if limit is not None:
4507            query["limit"] = limit
4508        if after_cursor is not None:
4509            query["after_cursor"] = after_cursor
4510        return await self._http.request(
4511            f"/api/v1/teams/{team}/tasks/search",
4512            query=query,
4513            response_type=TeamTaskSearchResponse,
4514        )
AsyncTeamTaskResource(http: archastro.platform.runtime.http_client.HttpClient)
4141    def __init__(self, http: HttpClient):
4142        self._http = http
async def list( self, team: str, *, user: str | None = None, org: str | None = None, status: str | None = None, owner_user: str | None = None, owner_agent: str | None = None, priority: int | None = None, tag: str | None = None, parent: str | None = None, source_scope: str | None = None, source_type: str | None = None, source_id: str | None = None, epic: str | None = None, search: str | None = None, sort: str | None = None, order: str | None = None, due_before: str | None = None, due_after: str | None = None, overdue: bool | None = None, ready: bool | None = None, limit: int | None = None, after_cursor: str | None = None) -> TeamTaskListResponse:
4144    async def list(
4145        self,
4146        team: str,
4147        *,
4148        user: str | None = None,
4149        org: str | None = None,
4150        status: str | None = None,
4151        owner_user: str | None = None,
4152        owner_agent: str | None = None,
4153        priority: int | None = None,
4154        tag: str | None = None,
4155        parent: str | None = None,
4156        source_scope: str | None = None,
4157        source_type: str | None = None,
4158        source_id: str | None = None,
4159        epic: str | None = None,
4160        search: str | None = None,
4161        sort: str | None = None,
4162        order: str | None = None,
4163        due_before: str | None = None,
4164        due_after: str | None = None,
4165        overdue: bool | None = None,
4166        ready: bool | None = None,
4167        limit: int | None = None,
4168        after_cursor: str | None = None,
4169    ) -> TeamTaskListResponse:
4170        """
4171        List an owner's tasks
4172        Returns tasks owned by the specified user or team. You can narrow results using the
4173        optional filters below. By default results are returned in reverse chronological
4174        order (most recently created first); use `sort` and `order` to sort by due date or
4175        priority instead.
4176        User-authenticated callers may list their personal tasks or tasks for teams they
4177        have joined. Privileged callers provide the owner in the route; the owner's
4178        organization is implied by that principal. An explicit `org` is optional and,
4179        when set, must match the owner's organization.
4180
4181        Args:
4182            team: Team ID (`tem_...`). Only tasks belonging to this team are returned.
4183            user: User ID (`usr_...`) for user-scoped tasks.
4184            org: Optional organization (`org_...`) for developer and server-to-server calls. When omitted, the org is taken from the owner principal (team, user, or agent). When set, it must match that principal's org; pass null for an owner outside an organization.
4185            status: Filter tasks by status. One of `"open"`, `"in_progress"`, or `"done"`. Omit to return tasks in all statuses.
4186            owner_user: Filter tasks assigned to a specific user. Provide the user's public ID (`usr_...`).
4187            owner_agent: Filter tasks assigned to a specific agent. Provide the agent's public ID (`agi_...`).
4188            priority: Filter tasks by priority, from 0 (highest) to 4 (lowest).
4189            tag: Return only tasks carrying this tag (matched against the canonical lowercase form).
4190            parent: Return only subtasks of the given task (`tsk_...`), or pass `none` to return only top-level tasks.
4191            source_scope: Return only tasks whose source matches this container. Must be supplied with `source_type` and `source_id`.
4192            source_type: Return only tasks whose source matches this object kind. Must be supplied with the other source filters.
4193            source_id: Return only tasks whose source matches this object identity. Must be supplied with the other source filters.
4194            epic: Return only tasks with this exact epic label.
4195            search: Restrict results to tasks whose name or description contains this string.
4196            sort: Sort key. One of `"created"` (default most recently created first), `"due_date"` (soonest due first; tasks without a due date always sort last), or `"priority"` (most urgent first). Ties break by most recently created.
4197            order: Sort direction, `"asc"` or `"desc"`. Defaults to `"desc"` for `created` and `"asc"` for `due_date` and `priority`.
4198            due_before: Return only tasks with a due date strictly before this ISO 8601 datetime (`2026-08-01T00:00:00Z`) or date (`2026-08-01`, meaning midnight UTC). Tasks without a due date are excluded.
4199            due_after: Return only tasks with a due date strictly after this ISO 8601 datetime or date. Tasks without a due date are excluded.
4200            overdue: When `true`, return only overdue tasks: a due date before the current UTC day and a status other than `"done"`. A task due today is not overdue.
4201            ready: When true, return only open tasks with no unfinished blockers and no active session lease. This is a projection snapshot; claim a lease before starting work.
4202            limit: Maximum number of tasks to return. Capped at 100.
4203            after_cursor: Opaque cursor returned by the previous page.
4204
4205        Returns:
4206            Successful response
4207        """
4208        query: dict[str, object] = {}
4209        if user is not None:
4210            query["user"] = user
4211        if org is not None:
4212            query["org"] = org
4213        if status is not None:
4214            query["status"] = status
4215        if owner_user is not None:
4216            query["owner_user"] = owner_user
4217        if owner_agent is not None:
4218            query["owner_agent"] = owner_agent
4219        if priority is not None:
4220            query["priority"] = priority
4221        if tag is not None:
4222            query["tag"] = tag
4223        if parent is not None:
4224            query["parent"] = parent
4225        if source_scope is not None:
4226            query["source_scope"] = source_scope
4227        if source_type is not None:
4228            query["source_type"] = source_type
4229        if source_id is not None:
4230            query["source_id"] = source_id
4231        if epic is not None:
4232            query["epic"] = epic
4233        if search is not None:
4234            query["search"] = search
4235        if sort is not None:
4236            query["sort"] = sort
4237        if order is not None:
4238            query["order"] = order
4239        if due_before is not None:
4240            query["due_before"] = due_before
4241        if due_after is not None:
4242            query["due_after"] = due_after
4243        if overdue is not None:
4244            query["overdue"] = overdue
4245        if ready is not None:
4246            query["ready"] = ready
4247        if limit is not None:
4248            query["limit"] = limit
4249        if after_cursor is not None:
4250            query["after_cursor"] = after_cursor
4251        return await self._http.request(
4252            f"/api/v1/teams/{team}/tasks",
4253            query=query,
4254            response_type=TeamTaskListResponse,
4255        )

List an owner's tasks Returns tasks owned by the specified user or team. You can narrow results using the optional filters below. By default results are returned in reverse chronological order (most recently created first); use sort and order to sort by due date or priority instead. User-authenticated callers may list their personal tasks or tasks for teams they have joined. Privileged callers provide the owner in the route; the owner's organization is implied by that principal. An explicit org is optional and, when set, must match the owner's organization.

Arguments:
  • team: Team ID (tem_...). Only tasks belonging to this team are returned.
  • user: User ID (usr_...) for user-scoped tasks.
  • org: Optional organization (org_...) for developer and server-to-server calls. When omitted, the org is taken from the owner principal (team, user, or agent). When set, it must match that principal's org; pass null for an owner outside an organization.
  • status: Filter tasks by status. One of "open", "in_progress", or "done". Omit to return tasks in all statuses.
  • owner_user: Filter tasks assigned to a specific user. Provide the user's public ID (usr_...).
  • owner_agent: Filter tasks assigned to a specific agent. Provide the agent's public ID (agi_...).
  • priority: Filter tasks by priority, from 0 (highest) to 4 (lowest).
  • tag: Return only tasks carrying this tag (matched against the canonical lowercase form).
  • parent: Return only subtasks of the given task (tsk_...), or pass none to return only top-level tasks.
  • source_scope: Return only tasks whose source matches this container. Must be supplied with source_type and source_id.
  • source_type: Return only tasks whose source matches this object kind. Must be supplied with the other source filters.
  • source_id: Return only tasks whose source matches this object identity. Must be supplied with the other source filters.
  • epic: Return only tasks with this exact epic label.
  • search: Restrict results to tasks whose name or description contains this string.
  • sort: Sort key. One of "created" (default most recently created first), "due_date" (soonest due first; tasks without a due date always sort last), or "priority" (most urgent first). Ties break by most recently created.
  • order: Sort direction, "asc" or "desc". Defaults to "desc" for created and "asc" for due_date and priority.
  • due_before: Return only tasks with a due date strictly before this ISO 8601 datetime (2026-08-01T00:00:00Z) or date (2026-08-01, meaning midnight UTC). Tasks without a due date are excluded.
  • due_after: Return only tasks with a due date strictly after this ISO 8601 datetime or date. Tasks without a due date are excluded.
  • overdue: When true, return only overdue tasks: a due date before the current UTC day and a status other than "done". A task due today is not overdue.
  • ready: When true, return only open tasks with no unfinished blockers and no active session lease. This is a projection snapshot; claim a lease before starting work.
  • limit: Maximum number of tasks to return. Capped at 100.
  • after_cursor: Opaque cursor returned by the previous page.
Returns:

Successful response

async def create( self, team: str, input: TeamTaskCreateInput) -> archastro.platform.types.tasks.Task:
4257    async def create(self, team: str, input: TeamTaskCreateInput) -> Task:
4258        """
4259        Create a task for an owner
4260        Creates a new task owned by the specified user or team and returns the full
4261        task object. User-authenticated calls are attributed to the authenticated
4262        user or agent. App-scoped developer and server-to-server callers must provide
4263        the task's explicit `org` scope and an explicit `user` or `agent` actor for
4264        team tasks; a user-owned task reuses the user in the route unless an explicit
4265        agent is supplied. Every referenced principal is validated against the app,
4266        owner, and team membership before creation.
4267
4268        Args:
4269            team: Team ID (`tem_...`). Only tasks belonging to this team are returned.
4270            input: Request body.
4271            input.agent: Explicit acting agent (`agi_...`) for a developer or server-to-server call. Mutually exclusive with an acting `user`; the agent must belong to the task owner.
4272            input.org: Explicit organization (`org_...`) for developer and server-to-server calls. Pass null when the owner is not organization-scoped. The value must match the selected user or team.
4273            input.task: Attributes for the task to create. `name` is required; all other fields are optional.
4274            input.user: User ID (`usr_...`). On a user route this is the task owner and creator; on a team route it is the explicit acting user for a developer or server-to-server call.
4275
4276        Returns:
4277            The newly created task.
4278        """
4279        return await self._http.request(
4280            f"/api/v1/teams/{team}/tasks",
4281            method="POST",
4282            body=input,
4283            response_type=Task,
4284        )

Create a task for an owner Creates a new task owned by the specified user or team and returns the full task object. User-authenticated calls are attributed to the authenticated user or agent. App-scoped developer and server-to-server callers must provide the task's explicit org scope and an explicit user or agent actor for team tasks; a user-owned task reuses the user in the route unless an explicit agent is supplied. Every referenced principal is validated against the app, owner, and team membership before creation.

Arguments:
  • team: Team ID (tem_...). Only tasks belonging to this team are returned.
  • input: Request body.
  • input.agent: Explicit acting agent (agi_...) for a developer or server-to-server call. Mutually exclusive with an acting user; the agent must belong to the task owner.
  • input.org: Explicit organization (org_...) for developer and server-to-server calls. Pass null when the owner is not organization-scoped. The value must match the selected user or team.
  • input.task: Attributes for the task to create. name is required; all other fields are optional.
  • input.user: User ID (usr_...). On a user route this is the task owner and creator; on a team route it is the explicit acting user for a developer or server-to-server call.
Returns:

The newly created task.

async def blocker_cycles( self, team: str, *, user: str | None = None, org: str | None = None, limit: int | None = None, after_cursor: str | None = None) -> TeamTaskBlockerCyclesResponse:
4286    async def blocker_cycles(
4287        self,
4288        team: str,
4289        *,
4290        user: str | None = None,
4291        org: str | None = None,
4292        limit: int | None = None,
4293        after_cursor: str | None = None,
4294    ) -> TeamTaskBlockerCyclesResponse:
4295        """
4296        List task blocker cycles
4297        Runs an on-demand diagnostic over unfinished tasks owned by the specified
4298        team or user and returns a forward cursor-paginated page of complete cyclic
4299        blocker components. Detection is bounded to owners with at most 100
4300        unfinished tasks. This endpoint is read-only: cycles do not prevent task
4301        updates, lease acquisition, or completion.
4302
4303        Args:
4304            team: Team ID (`tem_...`). Only tasks belonging to this team are returned.
4305            user: User ID (`usr_...`) owning the tasks.
4306            org: Optional organization context for privileged callers.
4307            limit: Maximum cycle components to return. Defaults to 50; maximum is 100.
4308            after_cursor: Opaque cursor returned by the preceding page.
4309
4310        Returns:
4311            Successful response
4312        """
4313        query: dict[str, object] = {}
4314        if user is not None:
4315            query["user"] = user
4316        if org is not None:
4317            query["org"] = org
4318        if limit is not None:
4319            query["limit"] = limit
4320        if after_cursor is not None:
4321            query["after_cursor"] = after_cursor
4322        return await self._http.request(
4323            f"/api/v1/teams/{team}/tasks/blocker_cycles",
4324            query=query,
4325            response_type=TeamTaskBlockerCyclesResponse,
4326        )

List task blocker cycles Runs an on-demand diagnostic over unfinished tasks owned by the specified team or user and returns a forward cursor-paginated page of complete cyclic blocker components. Detection is bounded to owners with at most 100 unfinished tasks. This endpoint is read-only: cycles do not prevent task updates, lease acquisition, or completion.

Arguments:
  • team: Team ID (tem_...). Only tasks belonging to this team are returned.
  • user: User ID (usr_...) owning the tasks.
  • org: Optional organization context for privileged callers.
  • limit: Maximum cycle components to return. Defaults to 50; maximum is 100.
  • after_cursor: Opaque cursor returned by the preceding page.
Returns:

Successful response

async def metrics( self, team: str, *, days: int | None = None) -> TeamTaskMetricsResponse:
4328    async def metrics(self, team: str, *, days: int | None = None) -> TeamTaskMetricsResponse:
4329        """
4330        Get task activity metrics for a team
4331        Returns task activity metrics scoped to one team (the Network in ArchAgents).
4332        `open` counts currently open or in-progress team tasks, `created` counts
4333        tasks inserted in the UTC-day window, and `completed` counts tasks whose
4334        `closed_at` falls in that window while still in a closed status. Hard-deleted
4335        tasks are absent from the projection and therefore omitted. The daily series
4336        is zero-filled across the requested window and includes reconstructed
4337        end-of-day `open` stock (from remaining projection rows' inserted_at/closed_at).
4338        Any authenticated team member may read this count-only Network summary.
4339        Requests from callers without team access return 404 so team existence is
4340        not disclosed.
4341
4342        Args:
4343            team: Team ID (`tem_...`). Only tasks belonging to this team are returned.
4344            days: UTC-day window. One of 7, 30, 90, or 365; defaults to 30.
4345
4346        Returns:
4347            Successful response
4348        """
4349        query: dict[str, object] = {}
4350        if days is not None:
4351            query["days"] = days
4352        return await self._http.request(
4353            f"/api/v1/teams/{team}/tasks/metrics",
4354            query=query,
4355            response_type=TeamTaskMetricsResponse,
4356        )

Get task activity metrics for a team Returns task activity metrics scoped to one team (the Network in ArchAgents). open counts currently open or in-progress team tasks, created counts tasks inserted in the UTC-day window, and completed counts tasks whose closed_at falls in that window while still in a closed status. Hard-deleted tasks are absent from the projection and therefore omitted. The daily series is zero-filled across the requested window and includes reconstructed end-of-day open stock (from remaining projection rows' inserted_at/closed_at). Any authenticated team member may read this count-only Network summary. Requests from callers without team access return 404 so team existence is not disclosed.

Arguments:
  • team: Team ID (tem_...). Only tasks belonging to this team are returned.
  • days: UTC-day window. One of 7, 30, 90, or 365; defaults to 30.
Returns:

Successful response

async def ready( self, team: str, *, user: str | None = None, org: str | None = None, explain: bool | None = None, assigned_to_me: bool | None = None, source_scope: str | None = None, source_type: str | None = None, source_id: str | None = None, epic: str | None = None, limit: int | None = None, after_cursor: str | None = None) -> TeamTaskReadyResponse:
4358    async def ready(
4359        self,
4360        team: str,
4361        *,
4362        user: str | None = None,
4363        org: str | None = None,
4364        explain: bool | None = None,
4365        assigned_to_me: bool | None = None,
4366        source_scope: str | None = None,
4367        source_type: str | None = None,
4368        source_id: str | None = None,
4369        epic: str | None = None,
4370        limit: int | None = None,
4371        after_cursor: str | None = None,
4372    ) -> TeamTaskReadyResponse:
4373        """
4374        List an owner's ready tasks
4375        Returns open tasks with no unfinished blockers and no active session lease.
4376        Readiness is calculated by the server from the current task projection. It is
4377        a snapshot, not a reservation; claim a task lease before starting work.
4378        Pass `explain=true` to include every open task with a stable readiness reason.
4379
4380        Args:
4381            team: Team ID (`tem_...`). Only tasks belonging to this team are returned.
4382            user: User ID (`usr_...`) owning the tasks.
4383            org: Optional organization context for privileged callers.
4384            explain: Include blocked and actively leased open tasks with exclusion reasons.
4385            assigned_to_me: Only include tasks assigned to the authenticated user.
4386            source_scope: Only include tasks whose source matches this container. Must be supplied with `source_type` and `source_id`.
4387            source_type: Only include tasks whose source matches this object kind.
4388            source_id: Only include tasks whose source matches this object identity.
4389            epic: Only include tasks with this exact epic label.
4390            limit: Maximum number of readiness entries to return. Capped at 100.
4391            after_cursor: Opaque cursor returned by the previous page.
4392
4393        Returns:
4394            Successful response
4395        """
4396        query: dict[str, object] = {}
4397        if user is not None:
4398            query["user"] = user
4399        if org is not None:
4400            query["org"] = org
4401        if explain is not None:
4402            query["explain"] = explain
4403        if assigned_to_me is not None:
4404            query["assigned_to_me"] = assigned_to_me
4405        if source_scope is not None:
4406            query["source_scope"] = source_scope
4407        if source_type is not None:
4408            query["source_type"] = source_type
4409        if source_id is not None:
4410            query["source_id"] = source_id
4411        if epic is not None:
4412            query["epic"] = epic
4413        if limit is not None:
4414            query["limit"] = limit
4415        if after_cursor is not None:
4416            query["after_cursor"] = after_cursor
4417        return await self._http.request(
4418            f"/api/v1/teams/{team}/tasks/ready",
4419            query=query,
4420            response_type=TeamTaskReadyResponse,
4421        )

List an owner's ready tasks Returns open tasks with no unfinished blockers and no active session lease. Readiness is calculated by the server from the current task projection. It is a snapshot, not a reservation; claim a task lease before starting work. Pass explain=true to include every open task with a stable readiness reason.

Arguments:
  • team: Team ID (tem_...). Only tasks belonging to this team are returned.
  • user: User ID (usr_...) owning the tasks.
  • org: Optional organization context for privileged callers.
  • explain: Include blocked and actively leased open tasks with exclusion reasons.
  • assigned_to_me: Only include tasks assigned to the authenticated user.
  • source_scope: Only include tasks whose source matches this container. Must be supplied with source_type and source_id.
  • source_type: Only include tasks whose source matches this object kind.
  • source_id: Only include tasks whose source matches this object identity.
  • epic: Only include tasks with this exact epic label.
  • limit: Maximum number of readiness entries to return. Capped at 100.
  • after_cursor: Opaque cursor returned by the previous page.
Returns:

Successful response

async def search( self, team: str, *, user: str | None = None, org: str | None = None, q: str | None = None, query: str | None = None, status: str | None = None, owner_user: str | None = None, owner_agent: str | None = None, priority: int | None = None, tag: str | None = None, parent: str | None = None, source_scope: str | None = None, source_type: str | None = None, source_id: str | None = None, epic: str | None = None, limit: int | None = None, after_cursor: str | None = None) -> TeamTaskSearchResponse:
4423    async def search(
4424        self,
4425        team: str,
4426        *,
4427        user: str | None = None,
4428        org: str | None = None,
4429        q: str | None = None,
4430        query: str | None = None,
4431        status: str | None = None,
4432        owner_user: str | None = None,
4433        owner_agent: str | None = None,
4434        priority: int | None = None,
4435        tag: str | None = None,
4436        parent: str | None = None,
4437        source_scope: str | None = None,
4438        source_type: str | None = None,
4439        source_id: str | None = None,
4440        epic: str | None = None,
4441        limit: int | None = None,
4442        after_cursor: str | None = None,
4443    ) -> TeamTaskSearchResponse:
4444        """
4445        Search an owner's tasks
4446        Performs a full-text search over tasks owned by the specified user or team and returns
4447        matching results. Combine `q` with the optional filters to narrow the result set
4448        further. When no query is provided, the endpoint behaves like a filtered list.
4449        The `query` field in the response echoes the effective search query.
4450        User-authenticated callers may search their personal tasks or tasks for teams
4451        they have joined. Privileged callers provide the owner in the route; the owner's
4452        organization is implied by that principal. An explicit `org` is optional and,
4453        when set, must match the owner's organization.
4454
4455        Args:
4456            team: Team ID (`tem_...`). Only tasks belonging to this team are returned.
4457            user: User ID (`usr_...`) whose tasks are searched.
4458            org: Optional organization (`org_...`) for developer and server-to-server calls. When omitted, the org is taken from the owner principal (team, user, or agent). When set, it must match that principal's org; pass null for an owner outside an organization.
4459            q: Full-text search query matched against task names and descriptions. Takes precedence over `query` when both are provided.
4460            query: Alias for `q`. Use `q` when possible; this parameter exists for compatibility.
4461            status: Filter results by status. One of `"open"`, `"in_progress"`, or `"done"`. Omit to include all statuses.
4462            owner_user: Restrict results to tasks assigned to the user with this public ID (`usr_...`).
4463            owner_agent: Restrict results to tasks assigned to the agent with this public ID (`agi_...`).
4464            priority: Filter results by priority, from 0 (highest) to 4 (lowest).
4465            tag: Return only tasks carrying this tag (matched against the canonical lowercase form).
4466            parent: Return only subtasks of the given task (`tsk_...`), or pass `none` to return only top-level tasks.
4467            source_scope: Return only tasks whose source matches this container. Must be supplied with `source_type` and `source_id`.
4468            source_type: Return only tasks whose source matches this object kind.
4469            source_id: Return only tasks whose source matches this object identity.
4470            epic: Return only tasks with this exact epic label.
4471            limit: Maximum number of tasks to return. Capped at 100.
4472            after_cursor: Opaque cursor returned by the previous page.
4473
4474        Returns:
4475            Successful response
4476        """
4477        query: dict[str, object] = {}
4478        if user is not None:
4479            query["user"] = user
4480        if org is not None:
4481            query["org"] = org
4482        if q is not None:
4483            query["q"] = q
4484        if query is not None:
4485            query["query"] = query
4486        if status is not None:
4487            query["status"] = status
4488        if owner_user is not None:
4489            query["owner_user"] = owner_user
4490        if owner_agent is not None:
4491            query["owner_agent"] = owner_agent
4492        if priority is not None:
4493            query["priority"] = priority
4494        if tag is not None:
4495            query["tag"] = tag
4496        if parent is not None:
4497            query["parent"] = parent
4498        if source_scope is not None:
4499            query["source_scope"] = source_scope
4500        if source_type is not None:
4501            query["source_type"] = source_type
4502        if source_id is not None:
4503            query["source_id"] = source_id
4504        if epic is not None:
4505            query["epic"] = epic
4506        if limit is not None:
4507            query["limit"] = limit
4508        if after_cursor is not None:
4509            query["after_cursor"] = after_cursor
4510        return await self._http.request(
4511            f"/api/v1/teams/{team}/tasks/search",
4512            query=query,
4513            response_type=TeamTaskSearchResponse,
4514        )

Search an owner's tasks Performs a full-text search over tasks owned by the specified user or team and returns matching results. Combine q with the optional filters to narrow the result set further. When no query is provided, the endpoint behaves like a filtered list. The query field in the response echoes the effective search query. User-authenticated callers may search their personal tasks or tasks for teams they have joined. Privileged callers provide the owner in the route; the owner's organization is implied by that principal. An explicit org is optional and, when set, must match the owner's organization.

Arguments:
  • team: Team ID (tem_...). Only tasks belonging to this team are returned.
  • user: User ID (usr_...) whose tasks are searched.
  • org: Optional organization (org_...) for developer and server-to-server calls. When omitted, the org is taken from the owner principal (team, user, or agent). When set, it must match that principal's org; pass null for an owner outside an organization.
  • q: Full-text search query matched against task names and descriptions. Takes precedence over query when both are provided.
  • query: Alias for q. Use q when possible; this parameter exists for compatibility.
  • status: Filter results by status. One of "open", "in_progress", or "done". Omit to include all statuses.
  • owner_user: Restrict results to tasks assigned to the user with this public ID (usr_...).
  • owner_agent: Restrict results to tasks assigned to the agent with this public ID (agi_...).
  • priority: Filter results by priority, from 0 (highest) to 4 (lowest).
  • tag: Return only tasks carrying this tag (matched against the canonical lowercase form).
  • parent: Return only subtasks of the given task (tsk_...), or pass none to return only top-level tasks.
  • source_scope: Return only tasks whose source matches this container. Must be supplied with source_type and source_id.
  • source_type: Return only tasks whose source matches this object kind.
  • source_id: Return only tasks whose source matches this object identity.
  • epic: Return only tasks with this exact epic label.
  • limit: Maximum number of tasks to return. Capped at 100.
  • after_cursor: Opaque cursor returned by the previous page.
Returns:

Successful response

class AsyncTeamThreadResource:
4517class AsyncTeamThreadResource:
4518    def __init__(self, http: HttpClient):
4519        self._http = http
4520
4521    async def list(
4522        self, team: str, *, tags: builtins.list[str] | None = None
4523    ) -> TeamThreadListResponse:
4524        """
4525        List threads for a team
4526        Returns all threads owned by the specified team that the authenticated caller
4527        has permission to view. The caller must have access to the team; requests
4528        without team access are rejected with 404.
4529        Threads are returned in a single `data` array, ordered with the team's
4530        default thread first, then by most recent activity (newest first). Each
4531        thread carries a `last_activity` timestamp the most recent message's
4532        creation time, falling back to the thread's own creation time. Use the
4533        team-scoped thread endpoints to create, update, or delete individual
4534        threads.
4535
4536        Args:
4537            team: Team ID (`tem_...`) whose threads should be listed.
4538            tags: Optional: only return threads tagged with at least one of these tags (OR-match). Repeated query params, e.g. `?tags[]=blocked&tags[]=needs-review`.
4539
4540        Returns:
4541            Successful response
4542        """
4543        query: dict[str, object] = {}
4544        if tags is not None:
4545            query["tags"] = tags
4546        return await self._http.request(
4547            f"/api/v1/teams/{team}/threads",
4548            query=query,
4549            response_type=TeamThreadListResponse,
4550        )
4551
4552    async def create(self, team: str, input: TeamThreadCreateInput) -> Thread:
4553        """
4554        Create a thread for a team
4555        Creates a new thread owned by the specified team. The authenticated caller must
4556        have access to the team; requests from callers without team access are rejected
4557        with 404.
4558        If a `profile_picture` is provided in the thread params, it must be
4559        base64-encoded image data. The image is uploaded and associated with the thread
4560        before creation completes. Omit `profile_picture` to skip this step.
4561        By default the platform sends an automatic welcome message into the new thread.
4562        Pass `skip_welcome_message: true` to suppress this behavior, for example when
4563        creating threads programmatically in bulk or seeding test data.
4564
4565        Args:
4566            team: Team ID (`tem_...`) whose threads should be listed.
4567            input: Request body.
4568            input.skip_welcome_message: When `true`, suppresses the automatic welcome message that is otherwise sent into the thread on creation. Defaults to `false`.
4569            input.thread: Attributes for the new thread. See ThreadCreateParams for available fields.
4570
4571        Returns:
4572            The newly created thread.
4573        """
4574        return await self._http.request(
4575            f"/api/v1/teams/{team}/threads",
4576            method="POST",
4577            body=input,
4578            response_type=Thread,
4579        )
4580
4581    async def metrics(self, team: str, *, days: int | None = None) -> TeamThreadMetricsResponse:
4582        """
4583        Get threads-created count for a team
4584        Returns how many **network-public** team threads were created in the UTC-day
4585        window. Counts come from realtime SQL aggregation over append-only
4586        `network_activity_events` (`thread.created` rows co-committed with create):
4587        team- or restricted-visibility threads (plus legacy open-team rows), never
4588        private or mirror. Every Network member sees the same number. Hard-delete
4589        co-commits a separate `thread.deleted` transition event and does not remove
4590        create events (metric is "created", not "still present"). Visibility flips
4591        after insert are ignored in v1.
4592        Any authenticated team member may read this count-only Network summary.
4593        Requests from callers without team access return 404 so team existence is
4594        not disclosed.
4595
4596        Args:
4597            team: Team ID (`tem_...`) whose threads should be listed.
4598            days: UTC-day window. One of 7, 30, 90, or 365; defaults to 30.
4599
4600        Returns:
4601            Successful response
4602        """
4603        query: dict[str, object] = {}
4604        if days is not None:
4605            query["days"] = days
4606        return await self._http.request(
4607            f"/api/v1/teams/{team}/threads/metrics",
4608            query=query,
4609            response_type=TeamThreadMetricsResponse,
4610        )
AsyncTeamThreadResource(http: archastro.platform.runtime.http_client.HttpClient)
4518    def __init__(self, http: HttpClient):
4519        self._http = http
async def list( self, team: str, *, tags: list[str] | None = None) -> TeamThreadListResponse:
4521    async def list(
4522        self, team: str, *, tags: builtins.list[str] | None = None
4523    ) -> TeamThreadListResponse:
4524        """
4525        List threads for a team
4526        Returns all threads owned by the specified team that the authenticated caller
4527        has permission to view. The caller must have access to the team; requests
4528        without team access are rejected with 404.
4529        Threads are returned in a single `data` array, ordered with the team's
4530        default thread first, then by most recent activity (newest first). Each
4531        thread carries a `last_activity` timestamp the most recent message's
4532        creation time, falling back to the thread's own creation time. Use the
4533        team-scoped thread endpoints to create, update, or delete individual
4534        threads.
4535
4536        Args:
4537            team: Team ID (`tem_...`) whose threads should be listed.
4538            tags: Optional: only return threads tagged with at least one of these tags (OR-match). Repeated query params, e.g. `?tags[]=blocked&tags[]=needs-review`.
4539
4540        Returns:
4541            Successful response
4542        """
4543        query: dict[str, object] = {}
4544        if tags is not None:
4545            query["tags"] = tags
4546        return await self._http.request(
4547            f"/api/v1/teams/{team}/threads",
4548            query=query,
4549            response_type=TeamThreadListResponse,
4550        )

List threads for a team Returns all threads owned by the specified team that the authenticated caller has permission to view. The caller must have access to the team; requests without team access are rejected with 404. Threads are returned in a single data array, ordered with the team's default thread first, then by most recent activity (newest first). Each thread carries a last_activity timestamp the most recent message's creation time, falling back to the thread's own creation time. Use the team-scoped thread endpoints to create, update, or delete individual threads.

Arguments:
  • team: Team ID (tem_...) whose threads should be listed.
  • tags: Optional: only return threads tagged with at least one of these tags (OR-match). Repeated query params, e.g. ?tags[]=blocked&tags[]=needs-review.
Returns:

Successful response

async def create( self, team: str, input: TeamThreadCreateInput) -> archastro.platform.types.threads.Thread:
4552    async def create(self, team: str, input: TeamThreadCreateInput) -> Thread:
4553        """
4554        Create a thread for a team
4555        Creates a new thread owned by the specified team. The authenticated caller must
4556        have access to the team; requests from callers without team access are rejected
4557        with 404.
4558        If a `profile_picture` is provided in the thread params, it must be
4559        base64-encoded image data. The image is uploaded and associated with the thread
4560        before creation completes. Omit `profile_picture` to skip this step.
4561        By default the platform sends an automatic welcome message into the new thread.
4562        Pass `skip_welcome_message: true` to suppress this behavior, for example when
4563        creating threads programmatically in bulk or seeding test data.
4564
4565        Args:
4566            team: Team ID (`tem_...`) whose threads should be listed.
4567            input: Request body.
4568            input.skip_welcome_message: When `true`, suppresses the automatic welcome message that is otherwise sent into the thread on creation. Defaults to `false`.
4569            input.thread: Attributes for the new thread. See ThreadCreateParams for available fields.
4570
4571        Returns:
4572            The newly created thread.
4573        """
4574        return await self._http.request(
4575            f"/api/v1/teams/{team}/threads",
4576            method="POST",
4577            body=input,
4578            response_type=Thread,
4579        )

Create a thread for a team Creates a new thread owned by the specified team. The authenticated caller must have access to the team; requests from callers without team access are rejected with 404. If a profile_picture is provided in the thread params, it must be base64-encoded image data. The image is uploaded and associated with the thread before creation completes. Omit profile_picture to skip this step. By default the platform sends an automatic welcome message into the new thread. Pass skip_welcome_message: true to suppress this behavior, for example when creating threads programmatically in bulk or seeding test data.

Arguments:
  • team: Team ID (tem_...) whose threads should be listed.
  • input: Request body.
  • input.skip_welcome_message: When true, suppresses the automatic welcome message that is otherwise sent into the thread on creation. Defaults to false.
  • input.thread: Attributes for the new thread. See ThreadCreateParams for available fields.
Returns:

The newly created thread.

async def metrics( self, team: str, *, days: int | None = None) -> TeamThreadMetricsResponse:
4581    async def metrics(self, team: str, *, days: int | None = None) -> TeamThreadMetricsResponse:
4582        """
4583        Get threads-created count for a team
4584        Returns how many **network-public** team threads were created in the UTC-day
4585        window. Counts come from realtime SQL aggregation over append-only
4586        `network_activity_events` (`thread.created` rows co-committed with create):
4587        team- or restricted-visibility threads (plus legacy open-team rows), never
4588        private or mirror. Every Network member sees the same number. Hard-delete
4589        co-commits a separate `thread.deleted` transition event and does not remove
4590        create events (metric is "created", not "still present"). Visibility flips
4591        after insert are ignored in v1.
4592        Any authenticated team member may read this count-only Network summary.
4593        Requests from callers without team access return 404 so team existence is
4594        not disclosed.
4595
4596        Args:
4597            team: Team ID (`tem_...`) whose threads should be listed.
4598            days: UTC-day window. One of 7, 30, 90, or 365; defaults to 30.
4599
4600        Returns:
4601            Successful response
4602        """
4603        query: dict[str, object] = {}
4604        if days is not None:
4605            query["days"] = days
4606        return await self._http.request(
4607            f"/api/v1/teams/{team}/threads/metrics",
4608            query=query,
4609            response_type=TeamThreadMetricsResponse,
4610        )

Get threads-created count for a team Returns how many network-public team threads were created in the UTC-day window. Counts come from realtime SQL aggregation over append-only network_activity_events (thread.created rows co-committed with create): team- or restricted-visibility threads (plus legacy open-team rows), never private or mirror. Every Network member sees the same number. Hard-delete co-commits a separate thread.deleted transition event and does not remove create events (metric is "created", not "still present"). Visibility flips after insert are ignored in v1. Any authenticated team member may read this count-only Network summary. Requests from callers without team access return 404 so team existence is not disclosed.

Arguments:
  • team: Team ID (tem_...) whose threads should be listed.
  • days: UTC-day window. One of 7, 30, 90, or 365; defaults to 30.
Returns:

Successful response

class AsyncTeamResource:
4613class AsyncTeamResource:
4614    def __init__(self, http: HttpClient):
4615        self._http = http
4616        self.custom_objects = AsyncTeamCustomObjectResource(http)
4617        self.members = AsyncMemberResource(http)
4618        self.tasks = AsyncTeamTaskResource(http)
4619        self.threads = AsyncTeamThreadResource(http)
4620
4621    async def list(
4622        self,
4623        *,
4624        page: int | None = None,
4625        page_size: int | None = None,
4626        search: str | None = None,
4627        metadata: dict[str, Any] | None = None,
4628        membership: str | None = None,
4629    ) -> TeamListResponse:
4630        """
4631        List teams
4632        Returns a paginated list of teams visible to the authenticated user, ordered
4633        by creation time descending. Use `membership` to narrow results to teams the
4634        caller has joined or teams they are eligible to join based on their ACL
4635        visibility.
4636        Supports full-text search across team name and description via `search`, and
4637        structured metadata filtering via `metadata`. When `app` is present, results
4638        are scoped to that app and the caller must hold the corresponding app scope.
4639
4640        Args:
4641            page: Page number to retrieve, starting at 1. Defaults to 1.
4642            page_size: Number of teams to return per page. Defaults to 25.
4643            search: Full-text search string matched against team name and description.
4644            metadata: Structured metadata filter expression. Only teams whose metadata satisfies the expression are returned.
4645            membership: Filter teams by membership status. `"joined"` returns only teams the caller is a member of. `"joinable"` returns ACL-visible teams the caller has not yet joined. Omit to return all visible teams.
4646
4647        Returns:
4648            Successful response
4649        """
4650        query: dict[str, object] = {}
4651        if page is not None:
4652            query["page"] = page
4653        if page_size is not None:
4654            query["page_size"] = page_size
4655        if search is not None:
4656            query["search"] = search
4657        if metadata is not None:
4658            query["metadata"] = metadata
4659        if membership is not None:
4660            query["membership"] = membership
4661        return await self._http.request(
4662            "/api/v1/teams",
4663            query=query,
4664            response_type=TeamListResponse,
4665        )
4666
4667    async def create(self, input: TeamCreateInput) -> Team:
4668        """
4669        Create a team
4670        Creates a new team and returns the created team object. The authenticated
4671        user becomes the team's owner.
4672        When `app` is supplied, the request is scoped to that app and the caller
4673        must hold the corresponding app scope. Omit `org` unless you want the team
4674        pinned to a specific organization. A default chat thread is provisioned for
4675        the team automatically after creation.
4676
4677        Args:
4678            input: Request body.
4679            input.acl: Access control configuration for the team. Controls who can discover and join the team.
4680            input.description: Optional human-readable description of the team's purpose.
4681            input.idempotency_key: Optional retry key. Replays in the same app, organization, and sandbox return the original team.
4682            input.metadata: Arbitrary key-value pairs you can attach to the team for your own use. Values must be strings.
4683            input.name: Display name for the team.
4684            input.org: Organization ID (`org_...`) to associate the team with. Omit to create the team without an org affiliation.
4685
4686        Returns:
4687            The newly created team.
4688        """
4689        return await self._http.request(
4690            "/api/v1/teams",
4691            method="POST",
4692            body=input,
4693            response_type=Team,
4694        )
4695
4696    async def join_by_code(self, input: TeamJoinByCodeInput) -> Team:
4697        """
4698        Join a team with an invite code
4699        Adds a principal to a team using a 12-character invite code. The invite
4700        code can be supplied as either `join_code` or `invite_code`; both are
4701        accepted for backwards compatibility.
4702        For user-authenticated requests, the currently authenticated user is added
4703        to the team. For server-to-server requests, you must supply either `agent`
4704        (to add an agent) or `user` (to add a specific user by ID). If the user
4705        is already a member of the team, the request succeeds without creating a
4706        duplicate membership.
4707        This endpoint is rate-limited to 10 requests per minute per IP address to
4708        prevent invite-code enumeration.
4709
4710        Args:
4711            input: Request body.
4712            input.agent: Agent ID (`agent_...`) to add to the team. When provided, the agent is joined instead of the authenticated user. Requires a server-to-server session.
4713            input.invite_code: 12-character invite code alias for `join_code` accepted for backwards compatibility.
4714            input.join_code: 12-character invite code that identifies the team. Mutually usable with `invite_code`.
4715            input.user: User ID (`user_...`) to add to the team. Required for server-to-server requests when `agent` is not supplied.
4716
4717        Returns:
4718            The team the principal has joined.
4719        """
4720        return await self._http.request(
4721            "/api/v1/teams/join_by_code",
4722            method="POST",
4723            body=input,
4724            response_type=Team,
4725        )
4726
4727    async def delete(self, team: str) -> None:
4728        """
4729        Delete a team
4730        Permanently deletes the team identified by `team`. This action is
4731        irreversible all team memberships, settings, and associated data are
4732        removed.
4733        The caller must be the team owner or an org admin. When `app` is present,
4734        the caller must also hold the corresponding app scope.
4735
4736        Args:
4737            team: Team ID (`team_...`) of the team to delete.
4738
4739        Returns:
4740            Empty response the team has been deleted.
4741        """
4742        await self._http.request(f"/api/v1/teams/{team}", method="DELETE")
4743
4744    async def get(self, team: str) -> Team:
4745        """
4746        Retrieve a team
4747        Returns the full team object for the given `team` ID, including its current
4748        member list and all associated threads.
4749        The authenticated user must be a member of the team or hold a role that
4750        grants visibility (org admin, app scope). When `app` is supplied, the
4751        caller must hold the corresponding app scope.
4752
4753        Args:
4754            team: Team ID (`team_...`) of the team to retrieve.
4755
4756        Returns:
4757            The requested team, including its members and threads.
4758        """
4759        return await self._http.request(f"/api/v1/teams/{team}", response_type=Team)
4760
4761    async def update(self, team: str, input: TeamUpdateInput) -> Team:
4762        """
4763        Update a team
4764        Updates one or more attributes of the team identified by `team`. Only the
4765        fields you provide are changed; omitted fields are left as-is.
4766        To replace the team's profile picture, supply the `profile_picture` object
4767        with base64-encoded image data. The previous picture is deleted after the
4768        new one is successfully uploaded. When `app` is present, the caller must hold
4769        the corresponding app scope. The caller must be a team owner or org admin.
4770
4771        Args:
4772            team: Team ID (`team_...`) of the team to update.
4773            input: Request body.
4774            input.acl: New access control configuration for the team. Replaces the existing ACL.
4775            input.description: New human-readable description of the team's purpose.
4776            input.metadata: Arbitrary key-value pairs to set on the team. Replaces the existing metadata map entirely.
4777            input.name: New display name for the team.
4778            input.profile_picture: New profile picture for the team. Provide this object to upload and replace the current picture.
4779
4780        Returns:
4781            The updated team with all changes applied.
4782        """
4783        return await self._http.request(
4784            f"/api/v1/teams/{team}",
4785            method="PATCH",
4786            body=input,
4787            response_type=Team,
4788        )
4789
4790    async def artifacts(self, team: str) -> TeamArtifactsResponse:
4791        """
4792        List a team's artifacts
4793        Returns all artifacts owned by the specified team. Artifacts represent
4794        AI-generated or user-uploaded files associated with agent sessions,
4795        threads, or sandboxes such as images, documents, and code outputs.
4796        The authenticated user must be a member of the team. Attempting to list
4797        artifacts for a team the caller does not have access to returns 404
4798        rather than 403 to avoid leaking team existence.
4799        Results are returned in a single page without cursor pagination. Each
4800        artifact in the response reflects the state of its current version,
4801        including a short-lived signed `file_url` for direct download.
4802
4803        Args:
4804            team: Team ID (`tea_...`). The authenticated user must be a member of this team.
4805
4806        Returns:
4807            Successful response
4808        """
4809        return await self._http.request(
4810            f"/api/v1/teams/{team}/artifacts",
4811            response_type=TeamArtifactsResponse,
4812        )
4813
4814    async def invite(self, team: str) -> TeamInvite:
4815        """
4816        Create a team invite
4817        Generates a new invite code for the specified team. The authenticated user
4818        must be a member of the team with the `owner` or `admin` role.
4819        The returned code is a short alphanumeric string that other users can
4820        present to join the team. Each call produces a new code; previously issued
4821        codes are not invalidated by this request.
4822
4823        Args:
4824            team: Team ID (`tm_...`) identifying the team for which to generate the invite code.
4825
4826        Returns:
4827            The newly created team invite containing the join code.
4828        """
4829        return await self._http.request(
4830            f"/api/v1/teams/{team}/invite",
4831            method="POST",
4832            response_type=TeamInvite,
4833        )
4834
4835    async def invites(self, team: str) -> TeamInvitesResponse:
4836        """
4837        Create a team invite (server-to-server)
4838        Generates a new invite code for the specified team using server-to-server
4839        authentication. Unlike the user-facing create endpoint, this variant does not
4840        require the caller to be a team member it is intended for privileged
4841        back-end services acting on behalf of your platform.
4842        The returned code is a short alphanumeric string that users can present to
4843        join the team. Each call produces a new code; previously issued codes are
4844        not invalidated by this request.
4845
4846        Args:
4847            team: Team ID (`tm_...`) identifying the team for which to generate the invite code.
4848
4849        Returns:
4850            Successful response
4851        """
4852        return await self._http.request(
4853            f"/api/v1/teams/{team}/invites",
4854            method="POST",
4855            response_type=TeamInvitesResponse,
4856        )
4857
4858    async def join(self, team: str, input: TeamJoinInput) -> None:
4859        """
4860        Join a team
4861        Adds a principal to a team that is visible to the authenticated user.
4862        By default, the currently authenticated user joins the team. Provide `agent`
4863        to add an agent to the team instead the caller must already be a member of
4864        the team to do so. Provide `user` (by ID) or `email` to add another user from
4865        your organization the caller must be a team owner, team admin, or org admin.
4866        Only one of `agent`, `user`, or `email` may be supplied per request.
4867        If the target principal is already a member of the team, the request succeeds
4868        without creating a duplicate membership. Server-to-server callers are not
4869        permitted to use this endpoint; use the invite-code endpoint instead.
4870
4871        Args:
4872            team: Team ID (`team_...`) to join.
4873            input: Request body.
4874            input.agent: Agent ID (`agent_...`) to add to the team. The caller must already be a member of the team.
4875            input.email: Email address of a member of the caller's organization to add to the team. Requires team-owner, team-admin, or org-admin role.
4876            input.user: User ID (`user_...`) of a member of the caller's organization to add to the team. Requires team-owner, team-admin, or org-admin role.
4877
4878        Returns:
4879            Empty response the principal is now a member of the team.
4880        """
4881        await self._http.request(f"/api/v1/teams/{team}/join", method="POST", body=input)
4882
4883    async def leave(self, team: str) -> None:
4884        """
4885        Leave a team
4886        Removes a principal from a team. By default, the authenticated user removes
4887        themselves from the team. Provide `agent` to remove an agent instead the
4888        caller must be a member of the team to do so.
4889        Team owners cannot leave their own team. To transfer ownership first, use
4890        the update-membership endpoint, then call this endpoint.
4891        For server-to-server requests, `user` is required to identify which user
4892        should be removed.
4893
4894        Args:
4895            team: Team ID (`team_...`) to leave.
4896
4897        Returns:
4898            Empty response the principal has been removed from the team.
4899        """
4900        await self._http.request(f"/api/v1/teams/{team}/leave", method="DELETE")
4901
4902    async def task_assignees(
4903        self, team: str, *, org: str | None = None
4904    ) -> TeamTaskAssigneesResponse:
4905        """
4906        List task assignees for a team
4907        Returns the list of principals users and agents that can be assigned
4908        to tasks within the team. Results include both human members and AI agents
4909        and are sorted alphabetically by display name.
4910        This endpoint is only available for team-scoped contexts. Calling it with a
4911        user-scoped owner returns a 400 error. The authenticated user must be a
4912        member of the team or hold org-admin access. App-scoped developer and
4913        server-to-server callers may list assignees for teams in their app so they
4914        can select the explicit user or agent actor required by privileged task
4915        mutations.
4916
4917        Args:
4918            team: Team ID (`tem_...`).
4919            org: Explicit organization (`org_...`) for developer and server-to-server calls. Pass null for a team outside an organization.
4920
4921        Returns:
4922            Successful response
4923        """
4924        query: dict[str, object] = {}
4925        if org is not None:
4926            query["org"] = org
4927        return await self._http.request(
4928            f"/api/v1/teams/{team}/task_assignees",
4929            query=query,
4930            response_type=TeamTaskAssigneesResponse,
4931        )
AsyncTeamResource(http: archastro.platform.runtime.http_client.HttpClient)
4614    def __init__(self, http: HttpClient):
4615        self._http = http
4616        self.custom_objects = AsyncTeamCustomObjectResource(http)
4617        self.members = AsyncMemberResource(http)
4618        self.tasks = AsyncTeamTaskResource(http)
4619        self.threads = AsyncTeamThreadResource(http)
custom_objects
members
tasks
threads
async def list( self, *, page: int | None = None, page_size: int | None = None, search: str | None = None, metadata: dict[str, typing.Any] | None = None, membership: str | None = None) -> TeamListResponse:
4621    async def list(
4622        self,
4623        *,
4624        page: int | None = None,
4625        page_size: int | None = None,
4626        search: str | None = None,
4627        metadata: dict[str, Any] | None = None,
4628        membership: str | None = None,
4629    ) -> TeamListResponse:
4630        """
4631        List teams
4632        Returns a paginated list of teams visible to the authenticated user, ordered
4633        by creation time descending. Use `membership` to narrow results to teams the
4634        caller has joined or teams they are eligible to join based on their ACL
4635        visibility.
4636        Supports full-text search across team name and description via `search`, and
4637        structured metadata filtering via `metadata`. When `app` is present, results
4638        are scoped to that app and the caller must hold the corresponding app scope.
4639
4640        Args:
4641            page: Page number to retrieve, starting at 1. Defaults to 1.
4642            page_size: Number of teams to return per page. Defaults to 25.
4643            search: Full-text search string matched against team name and description.
4644            metadata: Structured metadata filter expression. Only teams whose metadata satisfies the expression are returned.
4645            membership: Filter teams by membership status. `"joined"` returns only teams the caller is a member of. `"joinable"` returns ACL-visible teams the caller has not yet joined. Omit to return all visible teams.
4646
4647        Returns:
4648            Successful response
4649        """
4650        query: dict[str, object] = {}
4651        if page is not None:
4652            query["page"] = page
4653        if page_size is not None:
4654            query["page_size"] = page_size
4655        if search is not None:
4656            query["search"] = search
4657        if metadata is not None:
4658            query["metadata"] = metadata
4659        if membership is not None:
4660            query["membership"] = membership
4661        return await self._http.request(
4662            "/api/v1/teams",
4663            query=query,
4664            response_type=TeamListResponse,
4665        )

List teams Returns a paginated list of teams visible to the authenticated user, ordered by creation time descending. Use membership to narrow results to teams the caller has joined or teams they are eligible to join based on their ACL visibility. Supports full-text search across team name and description via search, and structured metadata filtering via metadata. When app is present, results are scoped to that app and the caller must hold the corresponding app scope.

Arguments:
  • page: Page number to retrieve, starting at 1. Defaults to 1.
  • page_size: Number of teams to return per page. Defaults to 25.
  • search: Full-text search string matched against team name and description.
  • metadata: Structured metadata filter expression. Only teams whose metadata satisfies the expression are returned.
  • membership: Filter teams by membership status. "joined" returns only teams the caller is a member of. "joinable" returns ACL-visible teams the caller has not yet joined. Omit to return all visible teams.
Returns:

Successful response

async def create( self, input: TeamCreateInput) -> archastro.platform.types.teams.Team:
4667    async def create(self, input: TeamCreateInput) -> Team:
4668        """
4669        Create a team
4670        Creates a new team and returns the created team object. The authenticated
4671        user becomes the team's owner.
4672        When `app` is supplied, the request is scoped to that app and the caller
4673        must hold the corresponding app scope. Omit `org` unless you want the team
4674        pinned to a specific organization. A default chat thread is provisioned for
4675        the team automatically after creation.
4676
4677        Args:
4678            input: Request body.
4679            input.acl: Access control configuration for the team. Controls who can discover and join the team.
4680            input.description: Optional human-readable description of the team's purpose.
4681            input.idempotency_key: Optional retry key. Replays in the same app, organization, and sandbox return the original team.
4682            input.metadata: Arbitrary key-value pairs you can attach to the team for your own use. Values must be strings.
4683            input.name: Display name for the team.
4684            input.org: Organization ID (`org_...`) to associate the team with. Omit to create the team without an org affiliation.
4685
4686        Returns:
4687            The newly created team.
4688        """
4689        return await self._http.request(
4690            "/api/v1/teams",
4691            method="POST",
4692            body=input,
4693            response_type=Team,
4694        )

Create a team Creates a new team and returns the created team object. The authenticated user becomes the team's owner. When app is supplied, the request is scoped to that app and the caller must hold the corresponding app scope. Omit org unless you want the team pinned to a specific organization. A default chat thread is provisioned for the team automatically after creation.

Arguments:
  • input: Request body.
  • input.acl: Access control configuration for the team. Controls who can discover and join the team.
  • input.description: Optional human-readable description of the team's purpose.
  • input.idempotency_key: Optional retry key. Replays in the same app, organization, and sandbox return the original team.
  • input.metadata: Arbitrary key-value pairs you can attach to the team for your own use. Values must be strings.
  • input.name: Display name for the team.
  • input.org: Organization ID (org_...) to associate the team with. Omit to create the team without an org affiliation.
Returns:

The newly created team.

async def join_by_code( self, input: TeamJoinByCodeInput) -> archastro.platform.types.teams.Team:
4696    async def join_by_code(self, input: TeamJoinByCodeInput) -> Team:
4697        """
4698        Join a team with an invite code
4699        Adds a principal to a team using a 12-character invite code. The invite
4700        code can be supplied as either `join_code` or `invite_code`; both are
4701        accepted for backwards compatibility.
4702        For user-authenticated requests, the currently authenticated user is added
4703        to the team. For server-to-server requests, you must supply either `agent`
4704        (to add an agent) or `user` (to add a specific user by ID). If the user
4705        is already a member of the team, the request succeeds without creating a
4706        duplicate membership.
4707        This endpoint is rate-limited to 10 requests per minute per IP address to
4708        prevent invite-code enumeration.
4709
4710        Args:
4711            input: Request body.
4712            input.agent: Agent ID (`agent_...`) to add to the team. When provided, the agent is joined instead of the authenticated user. Requires a server-to-server session.
4713            input.invite_code: 12-character invite code alias for `join_code` accepted for backwards compatibility.
4714            input.join_code: 12-character invite code that identifies the team. Mutually usable with `invite_code`.
4715            input.user: User ID (`user_...`) to add to the team. Required for server-to-server requests when `agent` is not supplied.
4716
4717        Returns:
4718            The team the principal has joined.
4719        """
4720        return await self._http.request(
4721            "/api/v1/teams/join_by_code",
4722            method="POST",
4723            body=input,
4724            response_type=Team,
4725        )

Join a team with an invite code Adds a principal to a team using a 12-character invite code. The invite code can be supplied as either join_code or invite_code; both are accepted for backwards compatibility. For user-authenticated requests, the currently authenticated user is added to the team. For server-to-server requests, you must supply either agent (to add an agent) or user (to add a specific user by ID). If the user is already a member of the team, the request succeeds without creating a duplicate membership. This endpoint is rate-limited to 10 requests per minute per IP address to prevent invite-code enumeration.

Arguments:
  • input: Request body.
  • input.agent: Agent ID (agent_...) to add to the team. When provided, the agent is joined instead of the authenticated user. Requires a server-to-server session.
  • input.invite_code: 12-character invite code alias for join_code accepted for backwards compatibility.
  • input.join_code: 12-character invite code that identifies the team. Mutually usable with invite_code.
  • input.user: User ID (user_...) to add to the team. Required for server-to-server requests when agent is not supplied.
Returns:

The team the principal has joined.

async def delete(self, team: str) -> None:
4727    async def delete(self, team: str) -> None:
4728        """
4729        Delete a team
4730        Permanently deletes the team identified by `team`. This action is
4731        irreversible all team memberships, settings, and associated data are
4732        removed.
4733        The caller must be the team owner or an org admin. When `app` is present,
4734        the caller must also hold the corresponding app scope.
4735
4736        Args:
4737            team: Team ID (`team_...`) of the team to delete.
4738
4739        Returns:
4740            Empty response the team has been deleted.
4741        """
4742        await self._http.request(f"/api/v1/teams/{team}", method="DELETE")

Delete a team Permanently deletes the team identified by team. This action is irreversible all team memberships, settings, and associated data are removed. The caller must be the team owner or an org admin. When app is present, the caller must also hold the corresponding app scope.

Arguments:
  • team: Team ID (team_...) of the team to delete.
Returns:

Empty response the team has been deleted.

async def get(self, team: str) -> archastro.platform.types.teams.Team:
4744    async def get(self, team: str) -> Team:
4745        """
4746        Retrieve a team
4747        Returns the full team object for the given `team` ID, including its current
4748        member list and all associated threads.
4749        The authenticated user must be a member of the team or hold a role that
4750        grants visibility (org admin, app scope). When `app` is supplied, the
4751        caller must hold the corresponding app scope.
4752
4753        Args:
4754            team: Team ID (`team_...`) of the team to retrieve.
4755
4756        Returns:
4757            The requested team, including its members and threads.
4758        """
4759        return await self._http.request(f"/api/v1/teams/{team}", response_type=Team)

Retrieve a team Returns the full team object for the given team ID, including its current member list and all associated threads. The authenticated user must be a member of the team or hold a role that grants visibility (org admin, app scope). When app is supplied, the caller must hold the corresponding app scope.

Arguments:
  • team: Team ID (team_...) of the team to retrieve.
Returns:

The requested team, including its members and threads.

async def update( self, team: str, input: TeamUpdateInput) -> archastro.platform.types.teams.Team:
4761    async def update(self, team: str, input: TeamUpdateInput) -> Team:
4762        """
4763        Update a team
4764        Updates one or more attributes of the team identified by `team`. Only the
4765        fields you provide are changed; omitted fields are left as-is.
4766        To replace the team's profile picture, supply the `profile_picture` object
4767        with base64-encoded image data. The previous picture is deleted after the
4768        new one is successfully uploaded. When `app` is present, the caller must hold
4769        the corresponding app scope. The caller must be a team owner or org admin.
4770
4771        Args:
4772            team: Team ID (`team_...`) of the team to update.
4773            input: Request body.
4774            input.acl: New access control configuration for the team. Replaces the existing ACL.
4775            input.description: New human-readable description of the team's purpose.
4776            input.metadata: Arbitrary key-value pairs to set on the team. Replaces the existing metadata map entirely.
4777            input.name: New display name for the team.
4778            input.profile_picture: New profile picture for the team. Provide this object to upload and replace the current picture.
4779
4780        Returns:
4781            The updated team with all changes applied.
4782        """
4783        return await self._http.request(
4784            f"/api/v1/teams/{team}",
4785            method="PATCH",
4786            body=input,
4787            response_type=Team,
4788        )

Update a team Updates one or more attributes of the team identified by team. Only the fields you provide are changed; omitted fields are left as-is. To replace the team's profile picture, supply the profile_picture object with base64-encoded image data. The previous picture is deleted after the new one is successfully uploaded. When app is present, the caller must hold the corresponding app scope. The caller must be a team owner or org admin.

Arguments:
  • team: Team ID (team_...) of the team to update.
  • input: Request body.
  • input.acl: New access control configuration for the team. Replaces the existing ACL.
  • input.description: New human-readable description of the team's purpose.
  • input.metadata: Arbitrary key-value pairs to set on the team. Replaces the existing metadata map entirely.
  • input.name: New display name for the team.
  • input.profile_picture: New profile picture for the team. Provide this object to upload and replace the current picture.
Returns:

The updated team with all changes applied.

async def artifacts( self, team: str) -> TeamArtifactsResponse:
4790    async def artifacts(self, team: str) -> TeamArtifactsResponse:
4791        """
4792        List a team's artifacts
4793        Returns all artifacts owned by the specified team. Artifacts represent
4794        AI-generated or user-uploaded files associated with agent sessions,
4795        threads, or sandboxes such as images, documents, and code outputs.
4796        The authenticated user must be a member of the team. Attempting to list
4797        artifacts for a team the caller does not have access to returns 404
4798        rather than 403 to avoid leaking team existence.
4799        Results are returned in a single page without cursor pagination. Each
4800        artifact in the response reflects the state of its current version,
4801        including a short-lived signed `file_url` for direct download.
4802
4803        Args:
4804            team: Team ID (`tea_...`). The authenticated user must be a member of this team.
4805
4806        Returns:
4807            Successful response
4808        """
4809        return await self._http.request(
4810            f"/api/v1/teams/{team}/artifacts",
4811            response_type=TeamArtifactsResponse,
4812        )

List a team's artifacts Returns all artifacts owned by the specified team. Artifacts represent AI-generated or user-uploaded files associated with agent sessions, threads, or sandboxes such as images, documents, and code outputs. The authenticated user must be a member of the team. Attempting to list artifacts for a team the caller does not have access to returns 404 rather than 403 to avoid leaking team existence. Results are returned in a single page without cursor pagination. Each artifact in the response reflects the state of its current version, including a short-lived signed file_url for direct download.

Arguments:
  • team: Team ID (tea_...). The authenticated user must be a member of this team.
Returns:

Successful response

async def invite(self, team: str) -> archastro.platform.types.teams.TeamInvite:
4814    async def invite(self, team: str) -> TeamInvite:
4815        """
4816        Create a team invite
4817        Generates a new invite code for the specified team. The authenticated user
4818        must be a member of the team with the `owner` or `admin` role.
4819        The returned code is a short alphanumeric string that other users can
4820        present to join the team. Each call produces a new code; previously issued
4821        codes are not invalidated by this request.
4822
4823        Args:
4824            team: Team ID (`tm_...`) identifying the team for which to generate the invite code.
4825
4826        Returns:
4827            The newly created team invite containing the join code.
4828        """
4829        return await self._http.request(
4830            f"/api/v1/teams/{team}/invite",
4831            method="POST",
4832            response_type=TeamInvite,
4833        )

Create a team invite Generates a new invite code for the specified team. The authenticated user must be a member of the team with the owner or admin role. The returned code is a short alphanumeric string that other users can present to join the team. Each call produces a new code; previously issued codes are not invalidated by this request.

Arguments:
  • team: Team ID (tm_...) identifying the team for which to generate the invite code.
Returns:

The newly created team invite containing the join code.

async def invites( self, team: str) -> TeamInvitesResponse:
4835    async def invites(self, team: str) -> TeamInvitesResponse:
4836        """
4837        Create a team invite (server-to-server)
4838        Generates a new invite code for the specified team using server-to-server
4839        authentication. Unlike the user-facing create endpoint, this variant does not
4840        require the caller to be a team member it is intended for privileged
4841        back-end services acting on behalf of your platform.
4842        The returned code is a short alphanumeric string that users can present to
4843        join the team. Each call produces a new code; previously issued codes are
4844        not invalidated by this request.
4845
4846        Args:
4847            team: Team ID (`tm_...`) identifying the team for which to generate the invite code.
4848
4849        Returns:
4850            Successful response
4851        """
4852        return await self._http.request(
4853            f"/api/v1/teams/{team}/invites",
4854            method="POST",
4855            response_type=TeamInvitesResponse,
4856        )

Create a team invite (server-to-server) Generates a new invite code for the specified team using server-to-server authentication. Unlike the user-facing create endpoint, this variant does not require the caller to be a team member it is intended for privileged back-end services acting on behalf of your platform. The returned code is a short alphanumeric string that users can present to join the team. Each call produces a new code; previously issued codes are not invalidated by this request.

Arguments:
  • team: Team ID (tm_...) identifying the team for which to generate the invite code.
Returns:

Successful response

async def join( self, team: str, input: TeamJoinInput) -> None:
4858    async def join(self, team: str, input: TeamJoinInput) -> None:
4859        """
4860        Join a team
4861        Adds a principal to a team that is visible to the authenticated user.
4862        By default, the currently authenticated user joins the team. Provide `agent`
4863        to add an agent to the team instead the caller must already be a member of
4864        the team to do so. Provide `user` (by ID) or `email` to add another user from
4865        your organization the caller must be a team owner, team admin, or org admin.
4866        Only one of `agent`, `user`, or `email` may be supplied per request.
4867        If the target principal is already a member of the team, the request succeeds
4868        without creating a duplicate membership. Server-to-server callers are not
4869        permitted to use this endpoint; use the invite-code endpoint instead.
4870
4871        Args:
4872            team: Team ID (`team_...`) to join.
4873            input: Request body.
4874            input.agent: Agent ID (`agent_...`) to add to the team. The caller must already be a member of the team.
4875            input.email: Email address of a member of the caller's organization to add to the team. Requires team-owner, team-admin, or org-admin role.
4876            input.user: User ID (`user_...`) of a member of the caller's organization to add to the team. Requires team-owner, team-admin, or org-admin role.
4877
4878        Returns:
4879            Empty response the principal is now a member of the team.
4880        """
4881        await self._http.request(f"/api/v1/teams/{team}/join", method="POST", body=input)

Join a team Adds a principal to a team that is visible to the authenticated user. By default, the currently authenticated user joins the team. Provide agent to add an agent to the team instead the caller must already be a member of the team to do so. Provide user (by ID) or email to add another user from your organization the caller must be a team owner, team admin, or org admin. Only one of agent, user, or email may be supplied per request. If the target principal is already a member of the team, the request succeeds without creating a duplicate membership. Server-to-server callers are not permitted to use this endpoint; use the invite-code endpoint instead.

Arguments:
  • team: Team ID (team_...) to join.
  • input: Request body.
  • input.agent: Agent ID (agent_...) to add to the team. The caller must already be a member of the team.
  • input.email: Email address of a member of the caller's organization to add to the team. Requires team-owner, team-admin, or org-admin role.
  • input.user: User ID (user_...) of a member of the caller's organization to add to the team. Requires team-owner, team-admin, or org-admin role.
Returns:

Empty response the principal is now a member of the team.

async def leave(self, team: str) -> None:
4883    async def leave(self, team: str) -> None:
4884        """
4885        Leave a team
4886        Removes a principal from a team. By default, the authenticated user removes
4887        themselves from the team. Provide `agent` to remove an agent instead the
4888        caller must be a member of the team to do so.
4889        Team owners cannot leave their own team. To transfer ownership first, use
4890        the update-membership endpoint, then call this endpoint.
4891        For server-to-server requests, `user` is required to identify which user
4892        should be removed.
4893
4894        Args:
4895            team: Team ID (`team_...`) to leave.
4896
4897        Returns:
4898            Empty response the principal has been removed from the team.
4899        """
4900        await self._http.request(f"/api/v1/teams/{team}/leave", method="DELETE")

Leave a team Removes a principal from a team. By default, the authenticated user removes themselves from the team. Provide agent to remove an agent instead the caller must be a member of the team to do so. Team owners cannot leave their own team. To transfer ownership first, use the update-membership endpoint, then call this endpoint. For server-to-server requests, user is required to identify which user should be removed.

Arguments:
  • team: Team ID (team_...) to leave.
Returns:

Empty response the principal has been removed from the team.

async def task_assignees( self, team: str, *, org: str | None = None) -> TeamTaskAssigneesResponse:
4902    async def task_assignees(
4903        self, team: str, *, org: str | None = None
4904    ) -> TeamTaskAssigneesResponse:
4905        """
4906        List task assignees for a team
4907        Returns the list of principals users and agents that can be assigned
4908        to tasks within the team. Results include both human members and AI agents
4909        and are sorted alphabetically by display name.
4910        This endpoint is only available for team-scoped contexts. Calling it with a
4911        user-scoped owner returns a 400 error. The authenticated user must be a
4912        member of the team or hold org-admin access. App-scoped developer and
4913        server-to-server callers may list assignees for teams in their app so they
4914        can select the explicit user or agent actor required by privileged task
4915        mutations.
4916
4917        Args:
4918            team: Team ID (`tem_...`).
4919            org: Explicit organization (`org_...`) for developer and server-to-server calls. Pass null for a team outside an organization.
4920
4921        Returns:
4922            Successful response
4923        """
4924        query: dict[str, object] = {}
4925        if org is not None:
4926            query["org"] = org
4927        return await self._http.request(
4928            f"/api/v1/teams/{team}/task_assignees",
4929            query=query,
4930            response_type=TeamTaskAssigneesResponse,
4931        )

List task assignees for a team Returns the list of principals users and agents that can be assigned to tasks within the team. Results include both human members and AI agents and are sorted alphabetically by display name. This endpoint is only available for team-scoped contexts. Calling it with a user-scoped owner returns a 400 error. The authenticated user must be a member of the team or hold org-admin access. App-scoped developer and server-to-server callers may list assignees for teams in their app so they can select the explicit user or agent actor required by privileged task mutations.

Arguments:
  • team: Team ID (tem_...).
  • org: Explicit organization (org_...) for developer and server-to-server calls. Pass null for a team outside an organization.
Returns:

Successful response

class TeamCustomObjectResource:
4934class TeamCustomObjectResource:
4935    def __init__(self, http: SyncHttpClient):
4936        self._http = http
4937
4938    def list(
4939        self,
4940        team: str,
4941        type: str,
4942        *,
4943        limit: int | None = None,
4944        offset: int | None = None,
4945        row_key: str | None = None,
4946        sort_key: str | None = None,
4947        query: str | None = None,
4948    ) -> TeamCustomObjectListResponse:
4949        """
4950        List a team's custom objects
4951        Returns a paginated list of custom objects owned by the specified team,
4952        filtered to a single schema type. Results are ordered by creation time
4953        descending unless `query` is provided, in which case they are ordered by
4954        full-text relevance score descending.
4955        Use `limit` and `offset` for page-based pagination. Use `row_key` or
4956        `sort_key` to narrow results to objects matching those index values.
4957        Full-text search via `query` operates only against the fields configured
4958        as `search_fields` on the schema.
4959        The authenticated user must be a member of the team with sufficient
4960        access. Returns 404 if the team is not found, the caller lacks access,
4961        or `type` does not match a registered schema for the team's organization.
4962
4963        Args:
4964            team: Team ID (`team_...`). Scopes results to objects owned by this team.
4965            type: Schema type identifier (`lookup_key`) that filters results to objects of this schema.
4966            limit: Maximum number of objects to return per page.
4967            offset: Number of objects to skip before returning results. Use with `limit` for page-based pagination.
4968            row_key: Filter results to objects whose `row_key` exactly matches this value.
4969            sort_key: Filter results to objects whose `sort_key` exactly matches this value.
4970            query: Full-text search string matched against the schema's configured `search_fields`. When provided, results are ordered by relevance score descending instead of creation time descending.
4971
4972        Returns:
4973            Successful response
4974        """
4975        query: dict[str, object] = {}
4976        query["type"] = type
4977        if limit is not None:
4978            query["limit"] = limit
4979        if offset is not None:
4980            query["offset"] = offset
4981        if row_key is not None:
4982            query["row_key"] = row_key
4983        if sort_key is not None:
4984            query["sort_key"] = sort_key
4985        if query is not None:
4986            query["query"] = query
4987        return self._http.request(
4988            f"/api/v1/teams/{team}/custom_objects",
4989            query=query,
4990            response_type=TeamCustomObjectListResponse,
4991        )
4992
4993    def create(self, team: str, input: TeamCustomObjectCreateInput) -> CustomObject:
4994        """
4995        Create a team custom object
4996        Creates a new custom object owned by the specified team. The object is
4997        instantiated against the schema identified by `type` (the schema's
4998        `lookup_key`). All field values are validated against that schema's
4999        field definitions before the object is persisted.
5000        The authenticated user must be a member of the team with sufficient
5001        access. If the team is not found or the caller lacks access, the endpoint
5002        returns 404. If `type` does not match a registered schema for the team's
5003        organization, the endpoint also returns 404.
5004
5005        Args:
5006            team: Team ID (`team_...`). Scopes results to objects owned by this team.
5007            input: Request body.
5008            input.fields: Map of field values to set on the new object. Keys and value types must conform to the schema identified by `type`.
5009            input.type: Schema type identifier (`lookup_key`) that defines the object's fields and validation rules.
5010
5011        Returns:
5012            The newly created custom object.
5013        """
5014        return self._http.request(
5015            f"/api/v1/teams/{team}/custom_objects",
5016            method="POST",
5017            body=input,
5018            response_type=CustomObject,
5019        )
TeamCustomObjectResource(http: archastro.platform.runtime.http_client.SyncHttpClient)
4935    def __init__(self, http: SyncHttpClient):
4936        self._http = http
def list( self, team: str, type: str, *, limit: int | None = None, offset: int | None = None, row_key: str | None = None, sort_key: str | None = None, query: str | None = None) -> TeamCustomObjectListResponse:
4938    def list(
4939        self,
4940        team: str,
4941        type: str,
4942        *,
4943        limit: int | None = None,
4944        offset: int | None = None,
4945        row_key: str | None = None,
4946        sort_key: str | None = None,
4947        query: str | None = None,
4948    ) -> TeamCustomObjectListResponse:
4949        """
4950        List a team's custom objects
4951        Returns a paginated list of custom objects owned by the specified team,
4952        filtered to a single schema type. Results are ordered by creation time
4953        descending unless `query` is provided, in which case they are ordered by
4954        full-text relevance score descending.
4955        Use `limit` and `offset` for page-based pagination. Use `row_key` or
4956        `sort_key` to narrow results to objects matching those index values.
4957        Full-text search via `query` operates only against the fields configured
4958        as `search_fields` on the schema.
4959        The authenticated user must be a member of the team with sufficient
4960        access. Returns 404 if the team is not found, the caller lacks access,
4961        or `type` does not match a registered schema for the team's organization.
4962
4963        Args:
4964            team: Team ID (`team_...`). Scopes results to objects owned by this team.
4965            type: Schema type identifier (`lookup_key`) that filters results to objects of this schema.
4966            limit: Maximum number of objects to return per page.
4967            offset: Number of objects to skip before returning results. Use with `limit` for page-based pagination.
4968            row_key: Filter results to objects whose `row_key` exactly matches this value.
4969            sort_key: Filter results to objects whose `sort_key` exactly matches this value.
4970            query: Full-text search string matched against the schema's configured `search_fields`. When provided, results are ordered by relevance score descending instead of creation time descending.
4971
4972        Returns:
4973            Successful response
4974        """
4975        query: dict[str, object] = {}
4976        query["type"] = type
4977        if limit is not None:
4978            query["limit"] = limit
4979        if offset is not None:
4980            query["offset"] = offset
4981        if row_key is not None:
4982            query["row_key"] = row_key
4983        if sort_key is not None:
4984            query["sort_key"] = sort_key
4985        if query is not None:
4986            query["query"] = query
4987        return self._http.request(
4988            f"/api/v1/teams/{team}/custom_objects",
4989            query=query,
4990            response_type=TeamCustomObjectListResponse,
4991        )

List a team's custom objects Returns a paginated list of custom objects owned by the specified team, filtered to a single schema type. Results are ordered by creation time descending unless query is provided, in which case they are ordered by full-text relevance score descending. Use limit and offset for page-based pagination. Use row_key or sort_key to narrow results to objects matching those index values. Full-text search via query operates only against the fields configured as search_fields on the schema. The authenticated user must be a member of the team with sufficient access. Returns 404 if the team is not found, the caller lacks access, or type does not match a registered schema for the team's organization.

Arguments:
  • team: Team ID (team_...). Scopes results to objects owned by this team.
  • type: Schema type identifier (lookup_key) that filters results to objects of this schema.
  • limit: Maximum number of objects to return per page.
  • offset: Number of objects to skip before returning results. Use with limit for page-based pagination.
  • row_key: Filter results to objects whose row_key exactly matches this value.
  • sort_key: Filter results to objects whose sort_key exactly matches this value.
  • query: Full-text search string matched against the schema's configured search_fields. When provided, results are ordered by relevance score descending instead of creation time descending.
Returns:

Successful response

def create( self, team: str, input: TeamCustomObjectCreateInput) -> archastro.platform.types.common.CustomObject:
4993    def create(self, team: str, input: TeamCustomObjectCreateInput) -> CustomObject:
4994        """
4995        Create a team custom object
4996        Creates a new custom object owned by the specified team. The object is
4997        instantiated against the schema identified by `type` (the schema's
4998        `lookup_key`). All field values are validated against that schema's
4999        field definitions before the object is persisted.
5000        The authenticated user must be a member of the team with sufficient
5001        access. If the team is not found or the caller lacks access, the endpoint
5002        returns 404. If `type` does not match a registered schema for the team's
5003        organization, the endpoint also returns 404.
5004
5005        Args:
5006            team: Team ID (`team_...`). Scopes results to objects owned by this team.
5007            input: Request body.
5008            input.fields: Map of field values to set on the new object. Keys and value types must conform to the schema identified by `type`.
5009            input.type: Schema type identifier (`lookup_key`) that defines the object's fields and validation rules.
5010
5011        Returns:
5012            The newly created custom object.
5013        """
5014        return self._http.request(
5015            f"/api/v1/teams/{team}/custom_objects",
5016            method="POST",
5017            body=input,
5018            response_type=CustomObject,
5019        )

Create a team custom object Creates a new custom object owned by the specified team. The object is instantiated against the schema identified by type (the schema's lookup_key). All field values are validated against that schema's field definitions before the object is persisted. The authenticated user must be a member of the team with sufficient access. If the team is not found or the caller lacks access, the endpoint returns 404. If type does not match a registered schema for the team's organization, the endpoint also returns 404.

Arguments:
  • team: Team ID (team_...). Scopes results to objects owned by this team.
  • input: Request body.
  • input.fields: Map of field values to set on the new object. Keys and value types must conform to the schema identified by type.
  • input.type: Schema type identifier (lookup_key) that defines the object's fields and validation rules.
Returns:

The newly created custom object.

class MemberResource:
5022class MemberResource:
5023    def __init__(self, http: SyncHttpClient):
5024        self._http = http
5025
5026    def remove(self, team: str) -> None:
5027        """
5028        Remove a member or org from a team
5029        Removes a user, agent, or all members of an organization from the specified
5030        team. Provide exactly one of `user`, `agent`, or `org` supplying more than
5031        one or none returns a 400 error. On success, returns 204 No Content.
5032        When `org` is provided, every user and agent membership belonging to that org
5033        is removed in a single call. The caller must be a member of the team's owning
5034        org to perform an org-scoped removal. You cannot target the team's owning org
5035        itself with this parameter.
5036        The caller must have permission to manage the team. When `app` is present, the
5037        request is scoped to that app and requires a valid app-scoped token.
5038
5039        Args:
5040            team: Team ID (`team_...`). The team to remove the member from.
5041
5042        Returns:
5043            Empty response. Returns 204 No Content on success.
5044        """
5045        self._http.request(f"/api/v1/teams/{team}/members", method="DELETE")
5046
5047    def list(self, team: str) -> MemberListResponse:
5048        """
5049        List members of a team
5050        Returns all members of the specified team, including both users and agents.
5051        Members are returned in a single non-paginated array ordered by join time.
5052        Bearer-authenticated users must be a member of the team to retrieve its
5053        member list. Developer and server-to-server callers can retrieve members for
5054        any team visible to their app scope. When `app` is provided, the request is
5055        scoped to that app and requires a valid app-scoped token.
5056
5057        Args:
5058            team: Team ID (`team_...`). The team to remove the member from.
5059
5060        Returns:
5061            Successful response
5062        """
5063        return self._http.request(f"/api/v1/teams/{team}/members", response_type=MemberListResponse)
5064
5065    def create(self, team: str, input: MemberCreateInput) -> TeamMembership:
5066        """
5067        Add a member to a team
5068        Adds a user or agent as a member of the specified team and returns the new
5069        membership with HTTP 201. Provide exactly one of `user` or `agent` supplying
5070        both or neither returns a 400 error.
5071        Adding a user requires permission to manage the team (team owner, team
5072        admin, or org admin). Adding an agent with the default `"member"` role is
5073        also open to any existing member of the team; assigning an elevated role to
5074        an agent still requires team-manage permission. When an `app` is provided,
5075        the request is scoped to that app and the caller must hold a valid app-scoped
5076        token. The default role is `"member"` when `role` is omitted.
5077
5078        Args:
5079            team: Team ID (`team_...`). The team to remove the member from.
5080            input: Request body.
5081            input.agent: Agent ID (`agt_...`) to add as a member. Provide exactly one of `user` or `agent`.
5082            input.role: Role to assign. One of `"owner"`, `"admin"`, or `"member"`. Defaults to `"member"` when omitted.
5083            input.user: User ID (`usr_...`) to add as a member. Provide exactly one of `user` or `agent`.
5084
5085        Returns:
5086            The newly created team membership.
5087        """
5088        return self._http.request(
5089            f"/api/v1/teams/{team}/members",
5090            method="POST",
5091            body=input,
5092            response_type=TeamMembership,
5093        )
5094
5095    def update(self, team: str, user: str, input: MemberUpdateInput) -> TeamMembership:
5096        """
5097        Update a team member's role
5098        Changes the role of an existing user member on the specified team. Returns the
5099        updated membership on success.
5100        Only user memberships are supported by this endpoint. Attempting to update an
5101        agent membership returns 404. To change an agent's role, remove the existing
5102        membership and re-add the agent with the desired role.
5103        The caller must have permission to modify the team. You cannot change a member's
5104        role across organization boundaries. Demoting the last owner of a team returns
5105        409. An invalid `role` value returns 422. When `app` is provided, the request
5106        is scoped to that app and requires a valid app-scoped token.
5107
5108        Args:
5109            team: Team ID (`team_...`). The team to remove the member from.
5110            user: User ID (`usr_...`) of the existing member whose role should be changed.
5111            input: Request body.
5112            input.role: New role to assign. One of `"owner"`, `"admin"`, or `"member"`.
5113
5114        Returns:
5115            The updated team membership reflecting the new role.
5116        """
5117        return self._http.request(
5118            f"/api/v1/teams/{team}/members/{user}",
5119            method="PATCH",
5120            body=input,
5121            response_type=TeamMembership,
5122        )
MemberResource(http: archastro.platform.runtime.http_client.SyncHttpClient)
5023    def __init__(self, http: SyncHttpClient):
5024        self._http = http
def remove(self, team: str) -> None:
5026    def remove(self, team: str) -> None:
5027        """
5028        Remove a member or org from a team
5029        Removes a user, agent, or all members of an organization from the specified
5030        team. Provide exactly one of `user`, `agent`, or `org` supplying more than
5031        one or none returns a 400 error. On success, returns 204 No Content.
5032        When `org` is provided, every user and agent membership belonging to that org
5033        is removed in a single call. The caller must be a member of the team's owning
5034        org to perform an org-scoped removal. You cannot target the team's owning org
5035        itself with this parameter.
5036        The caller must have permission to manage the team. When `app` is present, the
5037        request is scoped to that app and requires a valid app-scoped token.
5038
5039        Args:
5040            team: Team ID (`team_...`). The team to remove the member from.
5041
5042        Returns:
5043            Empty response. Returns 204 No Content on success.
5044        """
5045        self._http.request(f"/api/v1/teams/{team}/members", method="DELETE")

Remove a member or org from a team Removes a user, agent, or all members of an organization from the specified team. Provide exactly one of user, agent, or org supplying more than one or none returns a 400 error. On success, returns 204 No Content. When org is provided, every user and agent membership belonging to that org is removed in a single call. The caller must be a member of the team's owning org to perform an org-scoped removal. You cannot target the team's owning org itself with this parameter. The caller must have permission to manage the team. When app is present, the request is scoped to that app and requires a valid app-scoped token.

Arguments:
  • team: Team ID (team_...). The team to remove the member from.
Returns:

Empty response. Returns 204 No Content on success.

def list( self, team: str) -> MemberListResponse:
5047    def list(self, team: str) -> MemberListResponse:
5048        """
5049        List members of a team
5050        Returns all members of the specified team, including both users and agents.
5051        Members are returned in a single non-paginated array ordered by join time.
5052        Bearer-authenticated users must be a member of the team to retrieve its
5053        member list. Developer and server-to-server callers can retrieve members for
5054        any team visible to their app scope. When `app` is provided, the request is
5055        scoped to that app and requires a valid app-scoped token.
5056
5057        Args:
5058            team: Team ID (`team_...`). The team to remove the member from.
5059
5060        Returns:
5061            Successful response
5062        """
5063        return self._http.request(f"/api/v1/teams/{team}/members", response_type=MemberListResponse)

List members of a team Returns all members of the specified team, including both users and agents. Members are returned in a single non-paginated array ordered by join time. Bearer-authenticated users must be a member of the team to retrieve its member list. Developer and server-to-server callers can retrieve members for any team visible to their app scope. When app is provided, the request is scoped to that app and requires a valid app-scoped token.

Arguments:
  • team: Team ID (team_...). The team to remove the member from.
Returns:

Successful response

def create( self, team: str, input: MemberCreateInput) -> archastro.platform.types.teams.TeamMembership:
5065    def create(self, team: str, input: MemberCreateInput) -> TeamMembership:
5066        """
5067        Add a member to a team
5068        Adds a user or agent as a member of the specified team and returns the new
5069        membership with HTTP 201. Provide exactly one of `user` or `agent` supplying
5070        both or neither returns a 400 error.
5071        Adding a user requires permission to manage the team (team owner, team
5072        admin, or org admin). Adding an agent with the default `"member"` role is
5073        also open to any existing member of the team; assigning an elevated role to
5074        an agent still requires team-manage permission. When an `app` is provided,
5075        the request is scoped to that app and the caller must hold a valid app-scoped
5076        token. The default role is `"member"` when `role` is omitted.
5077
5078        Args:
5079            team: Team ID (`team_...`). The team to remove the member from.
5080            input: Request body.
5081            input.agent: Agent ID (`agt_...`) to add as a member. Provide exactly one of `user` or `agent`.
5082            input.role: Role to assign. One of `"owner"`, `"admin"`, or `"member"`. Defaults to `"member"` when omitted.
5083            input.user: User ID (`usr_...`) to add as a member. Provide exactly one of `user` or `agent`.
5084
5085        Returns:
5086            The newly created team membership.
5087        """
5088        return self._http.request(
5089            f"/api/v1/teams/{team}/members",
5090            method="POST",
5091            body=input,
5092            response_type=TeamMembership,
5093        )

Add a member to a team Adds a user or agent as a member of the specified team and returns the new membership with HTTP 201. Provide exactly one of user or agent supplying both or neither returns a 400 error. Adding a user requires permission to manage the team (team owner, team admin, or org admin). Adding an agent with the default "member" role is also open to any existing member of the team; assigning an elevated role to an agent still requires team-manage permission. When an app is provided, the request is scoped to that app and the caller must hold a valid app-scoped token. The default role is "member" when role is omitted.

Arguments:
  • team: Team ID (team_...). The team to remove the member from.
  • input: Request body.
  • input.agent: Agent ID (agt_...) to add as a member. Provide exactly one of user or agent.
  • input.role: Role to assign. One of "owner", "admin", or "member". Defaults to "member" when omitted.
  • input.user: User ID (usr_...) to add as a member. Provide exactly one of user or agent.
Returns:

The newly created team membership.

def update( self, team: str, user: str, input: MemberUpdateInput) -> archastro.platform.types.teams.TeamMembership:
5095    def update(self, team: str, user: str, input: MemberUpdateInput) -> TeamMembership:
5096        """
5097        Update a team member's role
5098        Changes the role of an existing user member on the specified team. Returns the
5099        updated membership on success.
5100        Only user memberships are supported by this endpoint. Attempting to update an
5101        agent membership returns 404. To change an agent's role, remove the existing
5102        membership and re-add the agent with the desired role.
5103        The caller must have permission to modify the team. You cannot change a member's
5104        role across organization boundaries. Demoting the last owner of a team returns
5105        409. An invalid `role` value returns 422. When `app` is provided, the request
5106        is scoped to that app and requires a valid app-scoped token.
5107
5108        Args:
5109            team: Team ID (`team_...`). The team to remove the member from.
5110            user: User ID (`usr_...`) of the existing member whose role should be changed.
5111            input: Request body.
5112            input.role: New role to assign. One of `"owner"`, `"admin"`, or `"member"`.
5113
5114        Returns:
5115            The updated team membership reflecting the new role.
5116        """
5117        return self._http.request(
5118            f"/api/v1/teams/{team}/members/{user}",
5119            method="PATCH",
5120            body=input,
5121            response_type=TeamMembership,
5122        )

Update a team member's role Changes the role of an existing user member on the specified team. Returns the updated membership on success. Only user memberships are supported by this endpoint. Attempting to update an agent membership returns 404. To change an agent's role, remove the existing membership and re-add the agent with the desired role. The caller must have permission to modify the team. You cannot change a member's role across organization boundaries. Demoting the last owner of a team returns

  1. An invalid role value returns 422. When app is provided, the request is scoped to that app and requires a valid app-scoped token.
Arguments:
  • team: Team ID (team_...). The team to remove the member from.
  • user: User ID (usr_...) of the existing member whose role should be changed.
  • input: Request body.
  • input.role: New role to assign. One of "owner", "admin", or "member".
Returns:

The updated team membership reflecting the new role.

class TeamTaskResource:
5125class TeamTaskResource:
5126    def __init__(self, http: SyncHttpClient):
5127        self._http = http
5128
5129    def list(
5130        self,
5131        team: str,
5132        *,
5133        user: str | None = None,
5134        org: str | None = None,
5135        status: str | None = None,
5136        owner_user: str | None = None,
5137        owner_agent: str | None = None,
5138        priority: int | None = None,
5139        tag: str | None = None,
5140        parent: str | None = None,
5141        source_scope: str | None = None,
5142        source_type: str | None = None,
5143        source_id: str | None = None,
5144        epic: str | None = None,
5145        search: str | None = None,
5146        sort: str | None = None,
5147        order: str | None = None,
5148        due_before: str | None = None,
5149        due_after: str | None = None,
5150        overdue: bool | None = None,
5151        ready: bool | None = None,
5152        limit: int | None = None,
5153        after_cursor: str | None = None,
5154    ) -> TeamTaskListResponse:
5155        """
5156        List an owner's tasks
5157        Returns tasks owned by the specified user or team. You can narrow results using the
5158        optional filters below. By default results are returned in reverse chronological
5159        order (most recently created first); use `sort` and `order` to sort by due date or
5160        priority instead.
5161        User-authenticated callers may list their personal tasks or tasks for teams they
5162        have joined. Privileged callers provide the owner in the route; the owner's
5163        organization is implied by that principal. An explicit `org` is optional and,
5164        when set, must match the owner's organization.
5165
5166        Args:
5167            team: Team ID (`tem_...`). Only tasks belonging to this team are returned.
5168            user: User ID (`usr_...`) for user-scoped tasks.
5169            org: Optional organization (`org_...`) for developer and server-to-server calls. When omitted, the org is taken from the owner principal (team, user, or agent). When set, it must match that principal's org; pass null for an owner outside an organization.
5170            status: Filter tasks by status. One of `"open"`, `"in_progress"`, or `"done"`. Omit to return tasks in all statuses.
5171            owner_user: Filter tasks assigned to a specific user. Provide the user's public ID (`usr_...`).
5172            owner_agent: Filter tasks assigned to a specific agent. Provide the agent's public ID (`agi_...`).
5173            priority: Filter tasks by priority, from 0 (highest) to 4 (lowest).
5174            tag: Return only tasks carrying this tag (matched against the canonical lowercase form).
5175            parent: Return only subtasks of the given task (`tsk_...`), or pass `none` to return only top-level tasks.
5176            source_scope: Return only tasks whose source matches this container. Must be supplied with `source_type` and `source_id`.
5177            source_type: Return only tasks whose source matches this object kind. Must be supplied with the other source filters.
5178            source_id: Return only tasks whose source matches this object identity. Must be supplied with the other source filters.
5179            epic: Return only tasks with this exact epic label.
5180            search: Restrict results to tasks whose name or description contains this string.
5181            sort: Sort key. One of `"created"` (default most recently created first), `"due_date"` (soonest due first; tasks without a due date always sort last), or `"priority"` (most urgent first). Ties break by most recently created.
5182            order: Sort direction, `"asc"` or `"desc"`. Defaults to `"desc"` for `created` and `"asc"` for `due_date` and `priority`.
5183            due_before: Return only tasks with a due date strictly before this ISO 8601 datetime (`2026-08-01T00:00:00Z`) or date (`2026-08-01`, meaning midnight UTC). Tasks without a due date are excluded.
5184            due_after: Return only tasks with a due date strictly after this ISO 8601 datetime or date. Tasks without a due date are excluded.
5185            overdue: When `true`, return only overdue tasks: a due date before the current UTC day and a status other than `"done"`. A task due today is not overdue.
5186            ready: When true, return only open tasks with no unfinished blockers and no active session lease. This is a projection snapshot; claim a lease before starting work.
5187            limit: Maximum number of tasks to return. Capped at 100.
5188            after_cursor: Opaque cursor returned by the previous page.
5189
5190        Returns:
5191            Successful response
5192        """
5193        query: dict[str, object] = {}
5194        if user is not None:
5195            query["user"] = user
5196        if org is not None:
5197            query["org"] = org
5198        if status is not None:
5199            query["status"] = status
5200        if owner_user is not None:
5201            query["owner_user"] = owner_user
5202        if owner_agent is not None:
5203            query["owner_agent"] = owner_agent
5204        if priority is not None:
5205            query["priority"] = priority
5206        if tag is not None:
5207            query["tag"] = tag
5208        if parent is not None:
5209            query["parent"] = parent
5210        if source_scope is not None:
5211            query["source_scope"] = source_scope
5212        if source_type is not None:
5213            query["source_type"] = source_type
5214        if source_id is not None:
5215            query["source_id"] = source_id
5216        if epic is not None:
5217            query["epic"] = epic
5218        if search is not None:
5219            query["search"] = search
5220        if sort is not None:
5221            query["sort"] = sort
5222        if order is not None:
5223            query["order"] = order
5224        if due_before is not None:
5225            query["due_before"] = due_before
5226        if due_after is not None:
5227            query["due_after"] = due_after
5228        if overdue is not None:
5229            query["overdue"] = overdue
5230        if ready is not None:
5231            query["ready"] = ready
5232        if limit is not None:
5233            query["limit"] = limit
5234        if after_cursor is not None:
5235            query["after_cursor"] = after_cursor
5236        return self._http.request(
5237            f"/api/v1/teams/{team}/tasks",
5238            query=query,
5239            response_type=TeamTaskListResponse,
5240        )
5241
5242    def create(self, team: str, input: TeamTaskCreateInput) -> Task:
5243        """
5244        Create a task for an owner
5245        Creates a new task owned by the specified user or team and returns the full
5246        task object. User-authenticated calls are attributed to the authenticated
5247        user or agent. App-scoped developer and server-to-server callers must provide
5248        the task's explicit `org` scope and an explicit `user` or `agent` actor for
5249        team tasks; a user-owned task reuses the user in the route unless an explicit
5250        agent is supplied. Every referenced principal is validated against the app,
5251        owner, and team membership before creation.
5252
5253        Args:
5254            team: Team ID (`tem_...`). Only tasks belonging to this team are returned.
5255            input: Request body.
5256            input.agent: Explicit acting agent (`agi_...`) for a developer or server-to-server call. Mutually exclusive with an acting `user`; the agent must belong to the task owner.
5257            input.org: Explicit organization (`org_...`) for developer and server-to-server calls. Pass null when the owner is not organization-scoped. The value must match the selected user or team.
5258            input.task: Attributes for the task to create. `name` is required; all other fields are optional.
5259            input.user: User ID (`usr_...`). On a user route this is the task owner and creator; on a team route it is the explicit acting user for a developer or server-to-server call.
5260
5261        Returns:
5262            The newly created task.
5263        """
5264        return self._http.request(
5265            f"/api/v1/teams/{team}/tasks",
5266            method="POST",
5267            body=input,
5268            response_type=Task,
5269        )
5270
5271    def blocker_cycles(
5272        self,
5273        team: str,
5274        *,
5275        user: str | None = None,
5276        org: str | None = None,
5277        limit: int | None = None,
5278        after_cursor: str | None = None,
5279    ) -> TeamTaskBlockerCyclesResponse:
5280        """
5281        List task blocker cycles
5282        Runs an on-demand diagnostic over unfinished tasks owned by the specified
5283        team or user and returns a forward cursor-paginated page of complete cyclic
5284        blocker components. Detection is bounded to owners with at most 100
5285        unfinished tasks. This endpoint is read-only: cycles do not prevent task
5286        updates, lease acquisition, or completion.
5287
5288        Args:
5289            team: Team ID (`tem_...`). Only tasks belonging to this team are returned.
5290            user: User ID (`usr_...`) owning the tasks.
5291            org: Optional organization context for privileged callers.
5292            limit: Maximum cycle components to return. Defaults to 50; maximum is 100.
5293            after_cursor: Opaque cursor returned by the preceding page.
5294
5295        Returns:
5296            Successful response
5297        """
5298        query: dict[str, object] = {}
5299        if user is not None:
5300            query["user"] = user
5301        if org is not None:
5302            query["org"] = org
5303        if limit is not None:
5304            query["limit"] = limit
5305        if after_cursor is not None:
5306            query["after_cursor"] = after_cursor
5307        return self._http.request(
5308            f"/api/v1/teams/{team}/tasks/blocker_cycles",
5309            query=query,
5310            response_type=TeamTaskBlockerCyclesResponse,
5311        )
5312
5313    def metrics(self, team: str, *, days: int | None = None) -> TeamTaskMetricsResponse:
5314        """
5315        Get task activity metrics for a team
5316        Returns task activity metrics scoped to one team (the Network in ArchAgents).
5317        `open` counts currently open or in-progress team tasks, `created` counts
5318        tasks inserted in the UTC-day window, and `completed` counts tasks whose
5319        `closed_at` falls in that window while still in a closed status. Hard-deleted
5320        tasks are absent from the projection and therefore omitted. The daily series
5321        is zero-filled across the requested window and includes reconstructed
5322        end-of-day `open` stock (from remaining projection rows' inserted_at/closed_at).
5323        Any authenticated team member may read this count-only Network summary.
5324        Requests from callers without team access return 404 so team existence is
5325        not disclosed.
5326
5327        Args:
5328            team: Team ID (`tem_...`). Only tasks belonging to this team are returned.
5329            days: UTC-day window. One of 7, 30, 90, or 365; defaults to 30.
5330
5331        Returns:
5332            Successful response
5333        """
5334        query: dict[str, object] = {}
5335        if days is not None:
5336            query["days"] = days
5337        return self._http.request(
5338            f"/api/v1/teams/{team}/tasks/metrics",
5339            query=query,
5340            response_type=TeamTaskMetricsResponse,
5341        )
5342
5343    def ready(
5344        self,
5345        team: str,
5346        *,
5347        user: str | None = None,
5348        org: str | None = None,
5349        explain: bool | None = None,
5350        assigned_to_me: bool | None = None,
5351        source_scope: str | None = None,
5352        source_type: str | None = None,
5353        source_id: str | None = None,
5354        epic: str | None = None,
5355        limit: int | None = None,
5356        after_cursor: str | None = None,
5357    ) -> TeamTaskReadyResponse:
5358        """
5359        List an owner's ready tasks
5360        Returns open tasks with no unfinished blockers and no active session lease.
5361        Readiness is calculated by the server from the current task projection. It is
5362        a snapshot, not a reservation; claim a task lease before starting work.
5363        Pass `explain=true` to include every open task with a stable readiness reason.
5364
5365        Args:
5366            team: Team ID (`tem_...`). Only tasks belonging to this team are returned.
5367            user: User ID (`usr_...`) owning the tasks.
5368            org: Optional organization context for privileged callers.
5369            explain: Include blocked and actively leased open tasks with exclusion reasons.
5370            assigned_to_me: Only include tasks assigned to the authenticated user.
5371            source_scope: Only include tasks whose source matches this container. Must be supplied with `source_type` and `source_id`.
5372            source_type: Only include tasks whose source matches this object kind.
5373            source_id: Only include tasks whose source matches this object identity.
5374            epic: Only include tasks with this exact epic label.
5375            limit: Maximum number of readiness entries to return. Capped at 100.
5376            after_cursor: Opaque cursor returned by the previous page.
5377
5378        Returns:
5379            Successful response
5380        """
5381        query: dict[str, object] = {}
5382        if user is not None:
5383            query["user"] = user
5384        if org is not None:
5385            query["org"] = org
5386        if explain is not None:
5387            query["explain"] = explain
5388        if assigned_to_me is not None:
5389            query["assigned_to_me"] = assigned_to_me
5390        if source_scope is not None:
5391            query["source_scope"] = source_scope
5392        if source_type is not None:
5393            query["source_type"] = source_type
5394        if source_id is not None:
5395            query["source_id"] = source_id
5396        if epic is not None:
5397            query["epic"] = epic
5398        if limit is not None:
5399            query["limit"] = limit
5400        if after_cursor is not None:
5401            query["after_cursor"] = after_cursor
5402        return self._http.request(
5403            f"/api/v1/teams/{team}/tasks/ready",
5404            query=query,
5405            response_type=TeamTaskReadyResponse,
5406        )
5407
5408    def search(
5409        self,
5410        team: str,
5411        *,
5412        user: str | None = None,
5413        org: str | None = None,
5414        q: str | None = None,
5415        query: str | None = None,
5416        status: str | None = None,
5417        owner_user: str | None = None,
5418        owner_agent: str | None = None,
5419        priority: int | None = None,
5420        tag: str | None = None,
5421        parent: str | None = None,
5422        source_scope: str | None = None,
5423        source_type: str | None = None,
5424        source_id: str | None = None,
5425        epic: str | None = None,
5426        limit: int | None = None,
5427        after_cursor: str | None = None,
5428    ) -> TeamTaskSearchResponse:
5429        """
5430        Search an owner's tasks
5431        Performs a full-text search over tasks owned by the specified user or team and returns
5432        matching results. Combine `q` with the optional filters to narrow the result set
5433        further. When no query is provided, the endpoint behaves like a filtered list.
5434        The `query` field in the response echoes the effective search query.
5435        User-authenticated callers may search their personal tasks or tasks for teams
5436        they have joined. Privileged callers provide the owner in the route; the owner's
5437        organization is implied by that principal. An explicit `org` is optional and,
5438        when set, must match the owner's organization.
5439
5440        Args:
5441            team: Team ID (`tem_...`). Only tasks belonging to this team are returned.
5442            user: User ID (`usr_...`) whose tasks are searched.
5443            org: Optional organization (`org_...`) for developer and server-to-server calls. When omitted, the org is taken from the owner principal (team, user, or agent). When set, it must match that principal's org; pass null for an owner outside an organization.
5444            q: Full-text search query matched against task names and descriptions. Takes precedence over `query` when both are provided.
5445            query: Alias for `q`. Use `q` when possible; this parameter exists for compatibility.
5446            status: Filter results by status. One of `"open"`, `"in_progress"`, or `"done"`. Omit to include all statuses.
5447            owner_user: Restrict results to tasks assigned to the user with this public ID (`usr_...`).
5448            owner_agent: Restrict results to tasks assigned to the agent with this public ID (`agi_...`).
5449            priority: Filter results by priority, from 0 (highest) to 4 (lowest).
5450            tag: Return only tasks carrying this tag (matched against the canonical lowercase form).
5451            parent: Return only subtasks of the given task (`tsk_...`), or pass `none` to return only top-level tasks.
5452            source_scope: Return only tasks whose source matches this container. Must be supplied with `source_type` and `source_id`.
5453            source_type: Return only tasks whose source matches this object kind.
5454            source_id: Return only tasks whose source matches this object identity.
5455            epic: Return only tasks with this exact epic label.
5456            limit: Maximum number of tasks to return. Capped at 100.
5457            after_cursor: Opaque cursor returned by the previous page.
5458
5459        Returns:
5460            Successful response
5461        """
5462        query: dict[str, object] = {}
5463        if user is not None:
5464            query["user"] = user
5465        if org is not None:
5466            query["org"] = org
5467        if q is not None:
5468            query["q"] = q
5469        if query is not None:
5470            query["query"] = query
5471        if status is not None:
5472            query["status"] = status
5473        if owner_user is not None:
5474            query["owner_user"] = owner_user
5475        if owner_agent is not None:
5476            query["owner_agent"] = owner_agent
5477        if priority is not None:
5478            query["priority"] = priority
5479        if tag is not None:
5480            query["tag"] = tag
5481        if parent is not None:
5482            query["parent"] = parent
5483        if source_scope is not None:
5484            query["source_scope"] = source_scope
5485        if source_type is not None:
5486            query["source_type"] = source_type
5487        if source_id is not None:
5488            query["source_id"] = source_id
5489        if epic is not None:
5490            query["epic"] = epic
5491        if limit is not None:
5492            query["limit"] = limit
5493        if after_cursor is not None:
5494            query["after_cursor"] = after_cursor
5495        return self._http.request(
5496            f"/api/v1/teams/{team}/tasks/search",
5497            query=query,
5498            response_type=TeamTaskSearchResponse,
5499        )
TeamTaskResource(http: archastro.platform.runtime.http_client.SyncHttpClient)
5126    def __init__(self, http: SyncHttpClient):
5127        self._http = http
def list( self, team: str, *, user: str | None = None, org: str | None = None, status: str | None = None, owner_user: str | None = None, owner_agent: str | None = None, priority: int | None = None, tag: str | None = None, parent: str | None = None, source_scope: str | None = None, source_type: str | None = None, source_id: str | None = None, epic: str | None = None, search: str | None = None, sort: str | None = None, order: str | None = None, due_before: str | None = None, due_after: str | None = None, overdue: bool | None = None, ready: bool | None = None, limit: int | None = None, after_cursor: str | None = None) -> TeamTaskListResponse:
5129    def list(
5130        self,
5131        team: str,
5132        *,
5133        user: str | None = None,
5134        org: str | None = None,
5135        status: str | None = None,
5136        owner_user: str | None = None,
5137        owner_agent: str | None = None,
5138        priority: int | None = None,
5139        tag: str | None = None,
5140        parent: str | None = None,
5141        source_scope: str | None = None,
5142        source_type: str | None = None,
5143        source_id: str | None = None,
5144        epic: str | None = None,
5145        search: str | None = None,
5146        sort: str | None = None,
5147        order: str | None = None,
5148        due_before: str | None = None,
5149        due_after: str | None = None,
5150        overdue: bool | None = None,
5151        ready: bool | None = None,
5152        limit: int | None = None,
5153        after_cursor: str | None = None,
5154    ) -> TeamTaskListResponse:
5155        """
5156        List an owner's tasks
5157        Returns tasks owned by the specified user or team. You can narrow results using the
5158        optional filters below. By default results are returned in reverse chronological
5159        order (most recently created first); use `sort` and `order` to sort by due date or
5160        priority instead.
5161        User-authenticated callers may list their personal tasks or tasks for teams they
5162        have joined. Privileged callers provide the owner in the route; the owner's
5163        organization is implied by that principal. An explicit `org` is optional and,
5164        when set, must match the owner's organization.
5165
5166        Args:
5167            team: Team ID (`tem_...`). Only tasks belonging to this team are returned.
5168            user: User ID (`usr_...`) for user-scoped tasks.
5169            org: Optional organization (`org_...`) for developer and server-to-server calls. When omitted, the org is taken from the owner principal (team, user, or agent). When set, it must match that principal's org; pass null for an owner outside an organization.
5170            status: Filter tasks by status. One of `"open"`, `"in_progress"`, or `"done"`. Omit to return tasks in all statuses.
5171            owner_user: Filter tasks assigned to a specific user. Provide the user's public ID (`usr_...`).
5172            owner_agent: Filter tasks assigned to a specific agent. Provide the agent's public ID (`agi_...`).
5173            priority: Filter tasks by priority, from 0 (highest) to 4 (lowest).
5174            tag: Return only tasks carrying this tag (matched against the canonical lowercase form).
5175            parent: Return only subtasks of the given task (`tsk_...`), or pass `none` to return only top-level tasks.
5176            source_scope: Return only tasks whose source matches this container. Must be supplied with `source_type` and `source_id`.
5177            source_type: Return only tasks whose source matches this object kind. Must be supplied with the other source filters.
5178            source_id: Return only tasks whose source matches this object identity. Must be supplied with the other source filters.
5179            epic: Return only tasks with this exact epic label.
5180            search: Restrict results to tasks whose name or description contains this string.
5181            sort: Sort key. One of `"created"` (default most recently created first), `"due_date"` (soonest due first; tasks without a due date always sort last), or `"priority"` (most urgent first). Ties break by most recently created.
5182            order: Sort direction, `"asc"` or `"desc"`. Defaults to `"desc"` for `created` and `"asc"` for `due_date` and `priority`.
5183            due_before: Return only tasks with a due date strictly before this ISO 8601 datetime (`2026-08-01T00:00:00Z`) or date (`2026-08-01`, meaning midnight UTC). Tasks without a due date are excluded.
5184            due_after: Return only tasks with a due date strictly after this ISO 8601 datetime or date. Tasks without a due date are excluded.
5185            overdue: When `true`, return only overdue tasks: a due date before the current UTC day and a status other than `"done"`. A task due today is not overdue.
5186            ready: When true, return only open tasks with no unfinished blockers and no active session lease. This is a projection snapshot; claim a lease before starting work.
5187            limit: Maximum number of tasks to return. Capped at 100.
5188            after_cursor: Opaque cursor returned by the previous page.
5189
5190        Returns:
5191            Successful response
5192        """
5193        query: dict[str, object] = {}
5194        if user is not None:
5195            query["user"] = user
5196        if org is not None:
5197            query["org"] = org
5198        if status is not None:
5199            query["status"] = status
5200        if owner_user is not None:
5201            query["owner_user"] = owner_user
5202        if owner_agent is not None:
5203            query["owner_agent"] = owner_agent
5204        if priority is not None:
5205            query["priority"] = priority
5206        if tag is not None:
5207            query["tag"] = tag
5208        if parent is not None:
5209            query["parent"] = parent
5210        if source_scope is not None:
5211            query["source_scope"] = source_scope
5212        if source_type is not None:
5213            query["source_type"] = source_type
5214        if source_id is not None:
5215            query["source_id"] = source_id
5216        if epic is not None:
5217            query["epic"] = epic
5218        if search is not None:
5219            query["search"] = search
5220        if sort is not None:
5221            query["sort"] = sort
5222        if order is not None:
5223            query["order"] = order
5224        if due_before is not None:
5225            query["due_before"] = due_before
5226        if due_after is not None:
5227            query["due_after"] = due_after
5228        if overdue is not None:
5229            query["overdue"] = overdue
5230        if ready is not None:
5231            query["ready"] = ready
5232        if limit is not None:
5233            query["limit"] = limit
5234        if after_cursor is not None:
5235            query["after_cursor"] = after_cursor
5236        return self._http.request(
5237            f"/api/v1/teams/{team}/tasks",
5238            query=query,
5239            response_type=TeamTaskListResponse,
5240        )

List an owner's tasks Returns tasks owned by the specified user or team. You can narrow results using the optional filters below. By default results are returned in reverse chronological order (most recently created first); use sort and order to sort by due date or priority instead. User-authenticated callers may list their personal tasks or tasks for teams they have joined. Privileged callers provide the owner in the route; the owner's organization is implied by that principal. An explicit org is optional and, when set, must match the owner's organization.

Arguments:
  • team: Team ID (tem_...). Only tasks belonging to this team are returned.
  • user: User ID (usr_...) for user-scoped tasks.
  • org: Optional organization (org_...) for developer and server-to-server calls. When omitted, the org is taken from the owner principal (team, user, or agent). When set, it must match that principal's org; pass null for an owner outside an organization.
  • status: Filter tasks by status. One of "open", "in_progress", or "done". Omit to return tasks in all statuses.
  • owner_user: Filter tasks assigned to a specific user. Provide the user's public ID (usr_...).
  • owner_agent: Filter tasks assigned to a specific agent. Provide the agent's public ID (agi_...).
  • priority: Filter tasks by priority, from 0 (highest) to 4 (lowest).
  • tag: Return only tasks carrying this tag (matched against the canonical lowercase form).
  • parent: Return only subtasks of the given task (tsk_...), or pass none to return only top-level tasks.
  • source_scope: Return only tasks whose source matches this container. Must be supplied with source_type and source_id.
  • source_type: Return only tasks whose source matches this object kind. Must be supplied with the other source filters.
  • source_id: Return only tasks whose source matches this object identity. Must be supplied with the other source filters.
  • epic: Return only tasks with this exact epic label.
  • search: Restrict results to tasks whose name or description contains this string.
  • sort: Sort key. One of "created" (default most recently created first), "due_date" (soonest due first; tasks without a due date always sort last), or "priority" (most urgent first). Ties break by most recently created.
  • order: Sort direction, "asc" or "desc". Defaults to "desc" for created and "asc" for due_date and priority.
  • due_before: Return only tasks with a due date strictly before this ISO 8601 datetime (2026-08-01T00:00:00Z) or date (2026-08-01, meaning midnight UTC). Tasks without a due date are excluded.
  • due_after: Return only tasks with a due date strictly after this ISO 8601 datetime or date. Tasks without a due date are excluded.
  • overdue: When true, return only overdue tasks: a due date before the current UTC day and a status other than "done". A task due today is not overdue.
  • ready: When true, return only open tasks with no unfinished blockers and no active session lease. This is a projection snapshot; claim a lease before starting work.
  • limit: Maximum number of tasks to return. Capped at 100.
  • after_cursor: Opaque cursor returned by the previous page.
Returns:

Successful response

def create( self, team: str, input: TeamTaskCreateInput) -> archastro.platform.types.tasks.Task:
5242    def create(self, team: str, input: TeamTaskCreateInput) -> Task:
5243        """
5244        Create a task for an owner
5245        Creates a new task owned by the specified user or team and returns the full
5246        task object. User-authenticated calls are attributed to the authenticated
5247        user or agent. App-scoped developer and server-to-server callers must provide
5248        the task's explicit `org` scope and an explicit `user` or `agent` actor for
5249        team tasks; a user-owned task reuses the user in the route unless an explicit
5250        agent is supplied. Every referenced principal is validated against the app,
5251        owner, and team membership before creation.
5252
5253        Args:
5254            team: Team ID (`tem_...`). Only tasks belonging to this team are returned.
5255            input: Request body.
5256            input.agent: Explicit acting agent (`agi_...`) for a developer or server-to-server call. Mutually exclusive with an acting `user`; the agent must belong to the task owner.
5257            input.org: Explicit organization (`org_...`) for developer and server-to-server calls. Pass null when the owner is not organization-scoped. The value must match the selected user or team.
5258            input.task: Attributes for the task to create. `name` is required; all other fields are optional.
5259            input.user: User ID (`usr_...`). On a user route this is the task owner and creator; on a team route it is the explicit acting user for a developer or server-to-server call.
5260
5261        Returns:
5262            The newly created task.
5263        """
5264        return self._http.request(
5265            f"/api/v1/teams/{team}/tasks",
5266            method="POST",
5267            body=input,
5268            response_type=Task,
5269        )

Create a task for an owner Creates a new task owned by the specified user or team and returns the full task object. User-authenticated calls are attributed to the authenticated user or agent. App-scoped developer and server-to-server callers must provide the task's explicit org scope and an explicit user or agent actor for team tasks; a user-owned task reuses the user in the route unless an explicit agent is supplied. Every referenced principal is validated against the app, owner, and team membership before creation.

Arguments:
  • team: Team ID (tem_...). Only tasks belonging to this team are returned.
  • input: Request body.
  • input.agent: Explicit acting agent (agi_...) for a developer or server-to-server call. Mutually exclusive with an acting user; the agent must belong to the task owner.
  • input.org: Explicit organization (org_...) for developer and server-to-server calls. Pass null when the owner is not organization-scoped. The value must match the selected user or team.
  • input.task: Attributes for the task to create. name is required; all other fields are optional.
  • input.user: User ID (usr_...). On a user route this is the task owner and creator; on a team route it is the explicit acting user for a developer or server-to-server call.
Returns:

The newly created task.

def blocker_cycles( self, team: str, *, user: str | None = None, org: str | None = None, limit: int | None = None, after_cursor: str | None = None) -> TeamTaskBlockerCyclesResponse:
5271    def blocker_cycles(
5272        self,
5273        team: str,
5274        *,
5275        user: str | None = None,
5276        org: str | None = None,
5277        limit: int | None = None,
5278        after_cursor: str | None = None,
5279    ) -> TeamTaskBlockerCyclesResponse:
5280        """
5281        List task blocker cycles
5282        Runs an on-demand diagnostic over unfinished tasks owned by the specified
5283        team or user and returns a forward cursor-paginated page of complete cyclic
5284        blocker components. Detection is bounded to owners with at most 100
5285        unfinished tasks. This endpoint is read-only: cycles do not prevent task
5286        updates, lease acquisition, or completion.
5287
5288        Args:
5289            team: Team ID (`tem_...`). Only tasks belonging to this team are returned.
5290            user: User ID (`usr_...`) owning the tasks.
5291            org: Optional organization context for privileged callers.
5292            limit: Maximum cycle components to return. Defaults to 50; maximum is 100.
5293            after_cursor: Opaque cursor returned by the preceding page.
5294
5295        Returns:
5296            Successful response
5297        """
5298        query: dict[str, object] = {}
5299        if user is not None:
5300            query["user"] = user
5301        if org is not None:
5302            query["org"] = org
5303        if limit is not None:
5304            query["limit"] = limit
5305        if after_cursor is not None:
5306            query["after_cursor"] = after_cursor
5307        return self._http.request(
5308            f"/api/v1/teams/{team}/tasks/blocker_cycles",
5309            query=query,
5310            response_type=TeamTaskBlockerCyclesResponse,
5311        )

List task blocker cycles Runs an on-demand diagnostic over unfinished tasks owned by the specified team or user and returns a forward cursor-paginated page of complete cyclic blocker components. Detection is bounded to owners with at most 100 unfinished tasks. This endpoint is read-only: cycles do not prevent task updates, lease acquisition, or completion.

Arguments:
  • team: Team ID (tem_...). Only tasks belonging to this team are returned.
  • user: User ID (usr_...) owning the tasks.
  • org: Optional organization context for privileged callers.
  • limit: Maximum cycle components to return. Defaults to 50; maximum is 100.
  • after_cursor: Opaque cursor returned by the preceding page.
Returns:

Successful response

def metrics( self, team: str, *, days: int | None = None) -> TeamTaskMetricsResponse:
5313    def metrics(self, team: str, *, days: int | None = None) -> TeamTaskMetricsResponse:
5314        """
5315        Get task activity metrics for a team
5316        Returns task activity metrics scoped to one team (the Network in ArchAgents).
5317        `open` counts currently open or in-progress team tasks, `created` counts
5318        tasks inserted in the UTC-day window, and `completed` counts tasks whose
5319        `closed_at` falls in that window while still in a closed status. Hard-deleted
5320        tasks are absent from the projection and therefore omitted. The daily series
5321        is zero-filled across the requested window and includes reconstructed
5322        end-of-day `open` stock (from remaining projection rows' inserted_at/closed_at).
5323        Any authenticated team member may read this count-only Network summary.
5324        Requests from callers without team access return 404 so team existence is
5325        not disclosed.
5326
5327        Args:
5328            team: Team ID (`tem_...`). Only tasks belonging to this team are returned.
5329            days: UTC-day window. One of 7, 30, 90, or 365; defaults to 30.
5330
5331        Returns:
5332            Successful response
5333        """
5334        query: dict[str, object] = {}
5335        if days is not None:
5336            query["days"] = days
5337        return self._http.request(
5338            f"/api/v1/teams/{team}/tasks/metrics",
5339            query=query,
5340            response_type=TeamTaskMetricsResponse,
5341        )

Get task activity metrics for a team Returns task activity metrics scoped to one team (the Network in ArchAgents). open counts currently open or in-progress team tasks, created counts tasks inserted in the UTC-day window, and completed counts tasks whose closed_at falls in that window while still in a closed status. Hard-deleted tasks are absent from the projection and therefore omitted. The daily series is zero-filled across the requested window and includes reconstructed end-of-day open stock (from remaining projection rows' inserted_at/closed_at). Any authenticated team member may read this count-only Network summary. Requests from callers without team access return 404 so team existence is not disclosed.

Arguments:
  • team: Team ID (tem_...). Only tasks belonging to this team are returned.
  • days: UTC-day window. One of 7, 30, 90, or 365; defaults to 30.
Returns:

Successful response

def ready( self, team: str, *, user: str | None = None, org: str | None = None, explain: bool | None = None, assigned_to_me: bool | None = None, source_scope: str | None = None, source_type: str | None = None, source_id: str | None = None, epic: str | None = None, limit: int | None = None, after_cursor: str | None = None) -> TeamTaskReadyResponse:
5343    def ready(
5344        self,
5345        team: str,
5346        *,
5347        user: str | None = None,
5348        org: str | None = None,
5349        explain: bool | None = None,
5350        assigned_to_me: bool | None = None,
5351        source_scope: str | None = None,
5352        source_type: str | None = None,
5353        source_id: str | None = None,
5354        epic: str | None = None,
5355        limit: int | None = None,
5356        after_cursor: str | None = None,
5357    ) -> TeamTaskReadyResponse:
5358        """
5359        List an owner's ready tasks
5360        Returns open tasks with no unfinished blockers and no active session lease.
5361        Readiness is calculated by the server from the current task projection. It is
5362        a snapshot, not a reservation; claim a task lease before starting work.
5363        Pass `explain=true` to include every open task with a stable readiness reason.
5364
5365        Args:
5366            team: Team ID (`tem_...`). Only tasks belonging to this team are returned.
5367            user: User ID (`usr_...`) owning the tasks.
5368            org: Optional organization context for privileged callers.
5369            explain: Include blocked and actively leased open tasks with exclusion reasons.
5370            assigned_to_me: Only include tasks assigned to the authenticated user.
5371            source_scope: Only include tasks whose source matches this container. Must be supplied with `source_type` and `source_id`.
5372            source_type: Only include tasks whose source matches this object kind.
5373            source_id: Only include tasks whose source matches this object identity.
5374            epic: Only include tasks with this exact epic label.
5375            limit: Maximum number of readiness entries to return. Capped at 100.
5376            after_cursor: Opaque cursor returned by the previous page.
5377
5378        Returns:
5379            Successful response
5380        """
5381        query: dict[str, object] = {}
5382        if user is not None:
5383            query["user"] = user
5384        if org is not None:
5385            query["org"] = org
5386        if explain is not None:
5387            query["explain"] = explain
5388        if assigned_to_me is not None:
5389            query["assigned_to_me"] = assigned_to_me
5390        if source_scope is not None:
5391            query["source_scope"] = source_scope
5392        if source_type is not None:
5393            query["source_type"] = source_type
5394        if source_id is not None:
5395            query["source_id"] = source_id
5396        if epic is not None:
5397            query["epic"] = epic
5398        if limit is not None:
5399            query["limit"] = limit
5400        if after_cursor is not None:
5401            query["after_cursor"] = after_cursor
5402        return self._http.request(
5403            f"/api/v1/teams/{team}/tasks/ready",
5404            query=query,
5405            response_type=TeamTaskReadyResponse,
5406        )

List an owner's ready tasks Returns open tasks with no unfinished blockers and no active session lease. Readiness is calculated by the server from the current task projection. It is a snapshot, not a reservation; claim a task lease before starting work. Pass explain=true to include every open task with a stable readiness reason.

Arguments:
  • team: Team ID (tem_...). Only tasks belonging to this team are returned.
  • user: User ID (usr_...) owning the tasks.
  • org: Optional organization context for privileged callers.
  • explain: Include blocked and actively leased open tasks with exclusion reasons.
  • assigned_to_me: Only include tasks assigned to the authenticated user.
  • source_scope: Only include tasks whose source matches this container. Must be supplied with source_type and source_id.
  • source_type: Only include tasks whose source matches this object kind.
  • source_id: Only include tasks whose source matches this object identity.
  • epic: Only include tasks with this exact epic label.
  • limit: Maximum number of readiness entries to return. Capped at 100.
  • after_cursor: Opaque cursor returned by the previous page.
Returns:

Successful response

def search( self, team: str, *, user: str | None = None, org: str | None = None, q: str | None = None, query: str | None = None, status: str | None = None, owner_user: str | None = None, owner_agent: str | None = None, priority: int | None = None, tag: str | None = None, parent: str | None = None, source_scope: str | None = None, source_type: str | None = None, source_id: str | None = None, epic: str | None = None, limit: int | None = None, after_cursor: str | None = None) -> TeamTaskSearchResponse:
5408    def search(
5409        self,
5410        team: str,
5411        *,
5412        user: str | None = None,
5413        org: str | None = None,
5414        q: str | None = None,
5415        query: str | None = None,
5416        status: str | None = None,
5417        owner_user: str | None = None,
5418        owner_agent: str | None = None,
5419        priority: int | None = None,
5420        tag: str | None = None,
5421        parent: str | None = None,
5422        source_scope: str | None = None,
5423        source_type: str | None = None,
5424        source_id: str | None = None,
5425        epic: str | None = None,
5426        limit: int | None = None,
5427        after_cursor: str | None = None,
5428    ) -> TeamTaskSearchResponse:
5429        """
5430        Search an owner's tasks
5431        Performs a full-text search over tasks owned by the specified user or team and returns
5432        matching results. Combine `q` with the optional filters to narrow the result set
5433        further. When no query is provided, the endpoint behaves like a filtered list.
5434        The `query` field in the response echoes the effective search query.
5435        User-authenticated callers may search their personal tasks or tasks for teams
5436        they have joined. Privileged callers provide the owner in the route; the owner's
5437        organization is implied by that principal. An explicit `org` is optional and,
5438        when set, must match the owner's organization.
5439
5440        Args:
5441            team: Team ID (`tem_...`). Only tasks belonging to this team are returned.
5442            user: User ID (`usr_...`) whose tasks are searched.
5443            org: Optional organization (`org_...`) for developer and server-to-server calls. When omitted, the org is taken from the owner principal (team, user, or agent). When set, it must match that principal's org; pass null for an owner outside an organization.
5444            q: Full-text search query matched against task names and descriptions. Takes precedence over `query` when both are provided.
5445            query: Alias for `q`. Use `q` when possible; this parameter exists for compatibility.
5446            status: Filter results by status. One of `"open"`, `"in_progress"`, or `"done"`. Omit to include all statuses.
5447            owner_user: Restrict results to tasks assigned to the user with this public ID (`usr_...`).
5448            owner_agent: Restrict results to tasks assigned to the agent with this public ID (`agi_...`).
5449            priority: Filter results by priority, from 0 (highest) to 4 (lowest).
5450            tag: Return only tasks carrying this tag (matched against the canonical lowercase form).
5451            parent: Return only subtasks of the given task (`tsk_...`), or pass `none` to return only top-level tasks.
5452            source_scope: Return only tasks whose source matches this container. Must be supplied with `source_type` and `source_id`.
5453            source_type: Return only tasks whose source matches this object kind.
5454            source_id: Return only tasks whose source matches this object identity.
5455            epic: Return only tasks with this exact epic label.
5456            limit: Maximum number of tasks to return. Capped at 100.
5457            after_cursor: Opaque cursor returned by the previous page.
5458
5459        Returns:
5460            Successful response
5461        """
5462        query: dict[str, object] = {}
5463        if user is not None:
5464            query["user"] = user
5465        if org is not None:
5466            query["org"] = org
5467        if q is not None:
5468            query["q"] = q
5469        if query is not None:
5470            query["query"] = query
5471        if status is not None:
5472            query["status"] = status
5473        if owner_user is not None:
5474            query["owner_user"] = owner_user
5475        if owner_agent is not None:
5476            query["owner_agent"] = owner_agent
5477        if priority is not None:
5478            query["priority"] = priority
5479        if tag is not None:
5480            query["tag"] = tag
5481        if parent is not None:
5482            query["parent"] = parent
5483        if source_scope is not None:
5484            query["source_scope"] = source_scope
5485        if source_type is not None:
5486            query["source_type"] = source_type
5487        if source_id is not None:
5488            query["source_id"] = source_id
5489        if epic is not None:
5490            query["epic"] = epic
5491        if limit is not None:
5492            query["limit"] = limit
5493        if after_cursor is not None:
5494            query["after_cursor"] = after_cursor
5495        return self._http.request(
5496            f"/api/v1/teams/{team}/tasks/search",
5497            query=query,
5498            response_type=TeamTaskSearchResponse,
5499        )

Search an owner's tasks Performs a full-text search over tasks owned by the specified user or team and returns matching results. Combine q with the optional filters to narrow the result set further. When no query is provided, the endpoint behaves like a filtered list. The query field in the response echoes the effective search query. User-authenticated callers may search their personal tasks or tasks for teams they have joined. Privileged callers provide the owner in the route; the owner's organization is implied by that principal. An explicit org is optional and, when set, must match the owner's organization.

Arguments:
  • team: Team ID (tem_...). Only tasks belonging to this team are returned.
  • user: User ID (usr_...) whose tasks are searched.
  • org: Optional organization (org_...) for developer and server-to-server calls. When omitted, the org is taken from the owner principal (team, user, or agent). When set, it must match that principal's org; pass null for an owner outside an organization.
  • q: Full-text search query matched against task names and descriptions. Takes precedence over query when both are provided.
  • query: Alias for q. Use q when possible; this parameter exists for compatibility.
  • status: Filter results by status. One of "open", "in_progress", or "done". Omit to include all statuses.
  • owner_user: Restrict results to tasks assigned to the user with this public ID (usr_...).
  • owner_agent: Restrict results to tasks assigned to the agent with this public ID (agi_...).
  • priority: Filter results by priority, from 0 (highest) to 4 (lowest).
  • tag: Return only tasks carrying this tag (matched against the canonical lowercase form).
  • parent: Return only subtasks of the given task (tsk_...), or pass none to return only top-level tasks.
  • source_scope: Return only tasks whose source matches this container. Must be supplied with source_type and source_id.
  • source_type: Return only tasks whose source matches this object kind.
  • source_id: Return only tasks whose source matches this object identity.
  • epic: Return only tasks with this exact epic label.
  • limit: Maximum number of tasks to return. Capped at 100.
  • after_cursor: Opaque cursor returned by the previous page.
Returns:

Successful response

class TeamThreadResource:
5502class TeamThreadResource:
5503    def __init__(self, http: SyncHttpClient):
5504        self._http = http
5505
5506    def list(self, team: str, *, tags: builtins.list[str] | None = None) -> TeamThreadListResponse:
5507        """
5508        List threads for a team
5509        Returns all threads owned by the specified team that the authenticated caller
5510        has permission to view. The caller must have access to the team; requests
5511        without team access are rejected with 404.
5512        Threads are returned in a single `data` array, ordered with the team's
5513        default thread first, then by most recent activity (newest first). Each
5514        thread carries a `last_activity` timestamp the most recent message's
5515        creation time, falling back to the thread's own creation time. Use the
5516        team-scoped thread endpoints to create, update, or delete individual
5517        threads.
5518
5519        Args:
5520            team: Team ID (`tem_...`) whose threads should be listed.
5521            tags: Optional: only return threads tagged with at least one of these tags (OR-match). Repeated query params, e.g. `?tags[]=blocked&tags[]=needs-review`.
5522
5523        Returns:
5524            Successful response
5525        """
5526        query: dict[str, object] = {}
5527        if tags is not None:
5528            query["tags"] = tags
5529        return self._http.request(
5530            f"/api/v1/teams/{team}/threads",
5531            query=query,
5532            response_type=TeamThreadListResponse,
5533        )
5534
5535    def create(self, team: str, input: TeamThreadCreateInput) -> Thread:
5536        """
5537        Create a thread for a team
5538        Creates a new thread owned by the specified team. The authenticated caller must
5539        have access to the team; requests from callers without team access are rejected
5540        with 404.
5541        If a `profile_picture` is provided in the thread params, it must be
5542        base64-encoded image data. The image is uploaded and associated with the thread
5543        before creation completes. Omit `profile_picture` to skip this step.
5544        By default the platform sends an automatic welcome message into the new thread.
5545        Pass `skip_welcome_message: true` to suppress this behavior, for example when
5546        creating threads programmatically in bulk or seeding test data.
5547
5548        Args:
5549            team: Team ID (`tem_...`) whose threads should be listed.
5550            input: Request body.
5551            input.skip_welcome_message: When `true`, suppresses the automatic welcome message that is otherwise sent into the thread on creation. Defaults to `false`.
5552            input.thread: Attributes for the new thread. See ThreadCreateParams for available fields.
5553
5554        Returns:
5555            The newly created thread.
5556        """
5557        return self._http.request(
5558            f"/api/v1/teams/{team}/threads",
5559            method="POST",
5560            body=input,
5561            response_type=Thread,
5562        )
5563
5564    def metrics(self, team: str, *, days: int | None = None) -> TeamThreadMetricsResponse:
5565        """
5566        Get threads-created count for a team
5567        Returns how many **network-public** team threads were created in the UTC-day
5568        window. Counts come from realtime SQL aggregation over append-only
5569        `network_activity_events` (`thread.created` rows co-committed with create):
5570        team- or restricted-visibility threads (plus legacy open-team rows), never
5571        private or mirror. Every Network member sees the same number. Hard-delete
5572        co-commits a separate `thread.deleted` transition event and does not remove
5573        create events (metric is "created", not "still present"). Visibility flips
5574        after insert are ignored in v1.
5575        Any authenticated team member may read this count-only Network summary.
5576        Requests from callers without team access return 404 so team existence is
5577        not disclosed.
5578
5579        Args:
5580            team: Team ID (`tem_...`) whose threads should be listed.
5581            days: UTC-day window. One of 7, 30, 90, or 365; defaults to 30.
5582
5583        Returns:
5584            Successful response
5585        """
5586        query: dict[str, object] = {}
5587        if days is not None:
5588            query["days"] = days
5589        return self._http.request(
5590            f"/api/v1/teams/{team}/threads/metrics",
5591            query=query,
5592            response_type=TeamThreadMetricsResponse,
5593        )
TeamThreadResource(http: archastro.platform.runtime.http_client.SyncHttpClient)
5503    def __init__(self, http: SyncHttpClient):
5504        self._http = http
def list( self, team: str, *, tags: list[str] | None = None) -> TeamThreadListResponse:
5506    def list(self, team: str, *, tags: builtins.list[str] | None = None) -> TeamThreadListResponse:
5507        """
5508        List threads for a team
5509        Returns all threads owned by the specified team that the authenticated caller
5510        has permission to view. The caller must have access to the team; requests
5511        without team access are rejected with 404.
5512        Threads are returned in a single `data` array, ordered with the team's
5513        default thread first, then by most recent activity (newest first). Each
5514        thread carries a `last_activity` timestamp the most recent message's
5515        creation time, falling back to the thread's own creation time. Use the
5516        team-scoped thread endpoints to create, update, or delete individual
5517        threads.
5518
5519        Args:
5520            team: Team ID (`tem_...`) whose threads should be listed.
5521            tags: Optional: only return threads tagged with at least one of these tags (OR-match). Repeated query params, e.g. `?tags[]=blocked&tags[]=needs-review`.
5522
5523        Returns:
5524            Successful response
5525        """
5526        query: dict[str, object] = {}
5527        if tags is not None:
5528            query["tags"] = tags
5529        return self._http.request(
5530            f"/api/v1/teams/{team}/threads",
5531            query=query,
5532            response_type=TeamThreadListResponse,
5533        )

List threads for a team Returns all threads owned by the specified team that the authenticated caller has permission to view. The caller must have access to the team; requests without team access are rejected with 404. Threads are returned in a single data array, ordered with the team's default thread first, then by most recent activity (newest first). Each thread carries a last_activity timestamp the most recent message's creation time, falling back to the thread's own creation time. Use the team-scoped thread endpoints to create, update, or delete individual threads.

Arguments:
  • team: Team ID (tem_...) whose threads should be listed.
  • tags: Optional: only return threads tagged with at least one of these tags (OR-match). Repeated query params, e.g. ?tags[]=blocked&tags[]=needs-review.
Returns:

Successful response

def create( self, team: str, input: TeamThreadCreateInput) -> archastro.platform.types.threads.Thread:
5535    def create(self, team: str, input: TeamThreadCreateInput) -> Thread:
5536        """
5537        Create a thread for a team
5538        Creates a new thread owned by the specified team. The authenticated caller must
5539        have access to the team; requests from callers without team access are rejected
5540        with 404.
5541        If a `profile_picture` is provided in the thread params, it must be
5542        base64-encoded image data. The image is uploaded and associated with the thread
5543        before creation completes. Omit `profile_picture` to skip this step.
5544        By default the platform sends an automatic welcome message into the new thread.
5545        Pass `skip_welcome_message: true` to suppress this behavior, for example when
5546        creating threads programmatically in bulk or seeding test data.
5547
5548        Args:
5549            team: Team ID (`tem_...`) whose threads should be listed.
5550            input: Request body.
5551            input.skip_welcome_message: When `true`, suppresses the automatic welcome message that is otherwise sent into the thread on creation. Defaults to `false`.
5552            input.thread: Attributes for the new thread. See ThreadCreateParams for available fields.
5553
5554        Returns:
5555            The newly created thread.
5556        """
5557        return self._http.request(
5558            f"/api/v1/teams/{team}/threads",
5559            method="POST",
5560            body=input,
5561            response_type=Thread,
5562        )

Create a thread for a team Creates a new thread owned by the specified team. The authenticated caller must have access to the team; requests from callers without team access are rejected with 404. If a profile_picture is provided in the thread params, it must be base64-encoded image data. The image is uploaded and associated with the thread before creation completes. Omit profile_picture to skip this step. By default the platform sends an automatic welcome message into the new thread. Pass skip_welcome_message: true to suppress this behavior, for example when creating threads programmatically in bulk or seeding test data.

Arguments:
  • team: Team ID (tem_...) whose threads should be listed.
  • input: Request body.
  • input.skip_welcome_message: When true, suppresses the automatic welcome message that is otherwise sent into the thread on creation. Defaults to false.
  • input.thread: Attributes for the new thread. See ThreadCreateParams for available fields.
Returns:

The newly created thread.

def metrics( self, team: str, *, days: int | None = None) -> TeamThreadMetricsResponse:
5564    def metrics(self, team: str, *, days: int | None = None) -> TeamThreadMetricsResponse:
5565        """
5566        Get threads-created count for a team
5567        Returns how many **network-public** team threads were created in the UTC-day
5568        window. Counts come from realtime SQL aggregation over append-only
5569        `network_activity_events` (`thread.created` rows co-committed with create):
5570        team- or restricted-visibility threads (plus legacy open-team rows), never
5571        private or mirror. Every Network member sees the same number. Hard-delete
5572        co-commits a separate `thread.deleted` transition event and does not remove
5573        create events (metric is "created", not "still present"). Visibility flips
5574        after insert are ignored in v1.
5575        Any authenticated team member may read this count-only Network summary.
5576        Requests from callers without team access return 404 so team existence is
5577        not disclosed.
5578
5579        Args:
5580            team: Team ID (`tem_...`) whose threads should be listed.
5581            days: UTC-day window. One of 7, 30, 90, or 365; defaults to 30.
5582
5583        Returns:
5584            Successful response
5585        """
5586        query: dict[str, object] = {}
5587        if days is not None:
5588            query["days"] = days
5589        return self._http.request(
5590            f"/api/v1/teams/{team}/threads/metrics",
5591            query=query,
5592            response_type=TeamThreadMetricsResponse,
5593        )

Get threads-created count for a team Returns how many network-public team threads were created in the UTC-day window. Counts come from realtime SQL aggregation over append-only network_activity_events (thread.created rows co-committed with create): team- or restricted-visibility threads (plus legacy open-team rows), never private or mirror. Every Network member sees the same number. Hard-delete co-commits a separate thread.deleted transition event and does not remove create events (metric is "created", not "still present"). Visibility flips after insert are ignored in v1. Any authenticated team member may read this count-only Network summary. Requests from callers without team access return 404 so team existence is not disclosed.

Arguments:
  • team: Team ID (tem_...) whose threads should be listed.
  • days: UTC-day window. One of 7, 30, 90, or 365; defaults to 30.
Returns:

Successful response

class TeamResource:
5596class TeamResource:
5597    def __init__(self, http: SyncHttpClient):
5598        self._http = http
5599        self.custom_objects = TeamCustomObjectResource(http)
5600        self.members = MemberResource(http)
5601        self.tasks = TeamTaskResource(http)
5602        self.threads = TeamThreadResource(http)
5603
5604    def list(
5605        self,
5606        *,
5607        page: int | None = None,
5608        page_size: int | None = None,
5609        search: str | None = None,
5610        metadata: dict[str, Any] | None = None,
5611        membership: str | None = None,
5612    ) -> TeamListResponse:
5613        """
5614        List teams
5615        Returns a paginated list of teams visible to the authenticated user, ordered
5616        by creation time descending. Use `membership` to narrow results to teams the
5617        caller has joined or teams they are eligible to join based on their ACL
5618        visibility.
5619        Supports full-text search across team name and description via `search`, and
5620        structured metadata filtering via `metadata`. When `app` is present, results
5621        are scoped to that app and the caller must hold the corresponding app scope.
5622
5623        Args:
5624            page: Page number to retrieve, starting at 1. Defaults to 1.
5625            page_size: Number of teams to return per page. Defaults to 25.
5626            search: Full-text search string matched against team name and description.
5627            metadata: Structured metadata filter expression. Only teams whose metadata satisfies the expression are returned.
5628            membership: Filter teams by membership status. `"joined"` returns only teams the caller is a member of. `"joinable"` returns ACL-visible teams the caller has not yet joined. Omit to return all visible teams.
5629
5630        Returns:
5631            Successful response
5632        """
5633        query: dict[str, object] = {}
5634        if page is not None:
5635            query["page"] = page
5636        if page_size is not None:
5637            query["page_size"] = page_size
5638        if search is not None:
5639            query["search"] = search
5640        if metadata is not None:
5641            query["metadata"] = metadata
5642        if membership is not None:
5643            query["membership"] = membership
5644        return self._http.request("/api/v1/teams", query=query, response_type=TeamListResponse)
5645
5646    def create(self, input: TeamCreateInput) -> Team:
5647        """
5648        Create a team
5649        Creates a new team and returns the created team object. The authenticated
5650        user becomes the team's owner.
5651        When `app` is supplied, the request is scoped to that app and the caller
5652        must hold the corresponding app scope. Omit `org` unless you want the team
5653        pinned to a specific organization. A default chat thread is provisioned for
5654        the team automatically after creation.
5655
5656        Args:
5657            input: Request body.
5658            input.acl: Access control configuration for the team. Controls who can discover and join the team.
5659            input.description: Optional human-readable description of the team's purpose.
5660            input.idempotency_key: Optional retry key. Replays in the same app, organization, and sandbox return the original team.
5661            input.metadata: Arbitrary key-value pairs you can attach to the team for your own use. Values must be strings.
5662            input.name: Display name for the team.
5663            input.org: Organization ID (`org_...`) to associate the team with. Omit to create the team without an org affiliation.
5664
5665        Returns:
5666            The newly created team.
5667        """
5668        return self._http.request("/api/v1/teams", method="POST", body=input, response_type=Team)
5669
5670    def join_by_code(self, input: TeamJoinByCodeInput) -> Team:
5671        """
5672        Join a team with an invite code
5673        Adds a principal to a team using a 12-character invite code. The invite
5674        code can be supplied as either `join_code` or `invite_code`; both are
5675        accepted for backwards compatibility.
5676        For user-authenticated requests, the currently authenticated user is added
5677        to the team. For server-to-server requests, you must supply either `agent`
5678        (to add an agent) or `user` (to add a specific user by ID). If the user
5679        is already a member of the team, the request succeeds without creating a
5680        duplicate membership.
5681        This endpoint is rate-limited to 10 requests per minute per IP address to
5682        prevent invite-code enumeration.
5683
5684        Args:
5685            input: Request body.
5686            input.agent: Agent ID (`agent_...`) to add to the team. When provided, the agent is joined instead of the authenticated user. Requires a server-to-server session.
5687            input.invite_code: 12-character invite code alias for `join_code` accepted for backwards compatibility.
5688            input.join_code: 12-character invite code that identifies the team. Mutually usable with `invite_code`.
5689            input.user: User ID (`user_...`) to add to the team. Required for server-to-server requests when `agent` is not supplied.
5690
5691        Returns:
5692            The team the principal has joined.
5693        """
5694        return self._http.request(
5695            "/api/v1/teams/join_by_code",
5696            method="POST",
5697            body=input,
5698            response_type=Team,
5699        )
5700
5701    def delete(self, team: str) -> None:
5702        """
5703        Delete a team
5704        Permanently deletes the team identified by `team`. This action is
5705        irreversible all team memberships, settings, and associated data are
5706        removed.
5707        The caller must be the team owner or an org admin. When `app` is present,
5708        the caller must also hold the corresponding app scope.
5709
5710        Args:
5711            team: Team ID (`team_...`) of the team to delete.
5712
5713        Returns:
5714            Empty response the team has been deleted.
5715        """
5716        self._http.request(f"/api/v1/teams/{team}", method="DELETE")
5717
5718    def get(self, team: str) -> Team:
5719        """
5720        Retrieve a team
5721        Returns the full team object for the given `team` ID, including its current
5722        member list and all associated threads.
5723        The authenticated user must be a member of the team or hold a role that
5724        grants visibility (org admin, app scope). When `app` is supplied, the
5725        caller must hold the corresponding app scope.
5726
5727        Args:
5728            team: Team ID (`team_...`) of the team to retrieve.
5729
5730        Returns:
5731            The requested team, including its members and threads.
5732        """
5733        return self._http.request(f"/api/v1/teams/{team}", response_type=Team)
5734
5735    def update(self, team: str, input: TeamUpdateInput) -> Team:
5736        """
5737        Update a team
5738        Updates one or more attributes of the team identified by `team`. Only the
5739        fields you provide are changed; omitted fields are left as-is.
5740        To replace the team's profile picture, supply the `profile_picture` object
5741        with base64-encoded image data. The previous picture is deleted after the
5742        new one is successfully uploaded. When `app` is present, the caller must hold
5743        the corresponding app scope. The caller must be a team owner or org admin.
5744
5745        Args:
5746            team: Team ID (`team_...`) of the team to update.
5747            input: Request body.
5748            input.acl: New access control configuration for the team. Replaces the existing ACL.
5749            input.description: New human-readable description of the team's purpose.
5750            input.metadata: Arbitrary key-value pairs to set on the team. Replaces the existing metadata map entirely.
5751            input.name: New display name for the team.
5752            input.profile_picture: New profile picture for the team. Provide this object to upload and replace the current picture.
5753
5754        Returns:
5755            The updated team with all changes applied.
5756        """
5757        return self._http.request(
5758            f"/api/v1/teams/{team}",
5759            method="PATCH",
5760            body=input,
5761            response_type=Team,
5762        )
5763
5764    def artifacts(self, team: str) -> TeamArtifactsResponse:
5765        """
5766        List a team's artifacts
5767        Returns all artifacts owned by the specified team. Artifacts represent
5768        AI-generated or user-uploaded files associated with agent sessions,
5769        threads, or sandboxes such as images, documents, and code outputs.
5770        The authenticated user must be a member of the team. Attempting to list
5771        artifacts for a team the caller does not have access to returns 404
5772        rather than 403 to avoid leaking team existence.
5773        Results are returned in a single page without cursor pagination. Each
5774        artifact in the response reflects the state of its current version,
5775        including a short-lived signed `file_url` for direct download.
5776
5777        Args:
5778            team: Team ID (`tea_...`). The authenticated user must be a member of this team.
5779
5780        Returns:
5781            Successful response
5782        """
5783        return self._http.request(
5784            f"/api/v1/teams/{team}/artifacts",
5785            response_type=TeamArtifactsResponse,
5786        )
5787
5788    def invite(self, team: str) -> TeamInvite:
5789        """
5790        Create a team invite
5791        Generates a new invite code for the specified team. The authenticated user
5792        must be a member of the team with the `owner` or `admin` role.
5793        The returned code is a short alphanumeric string that other users can
5794        present to join the team. Each call produces a new code; previously issued
5795        codes are not invalidated by this request.
5796
5797        Args:
5798            team: Team ID (`tm_...`) identifying the team for which to generate the invite code.
5799
5800        Returns:
5801            The newly created team invite containing the join code.
5802        """
5803        return self._http.request(
5804            f"/api/v1/teams/{team}/invite",
5805            method="POST",
5806            response_type=TeamInvite,
5807        )
5808
5809    def invites(self, team: str) -> TeamInvitesResponse:
5810        """
5811        Create a team invite (server-to-server)
5812        Generates a new invite code for the specified team using server-to-server
5813        authentication. Unlike the user-facing create endpoint, this variant does not
5814        require the caller to be a team member it is intended for privileged
5815        back-end services acting on behalf of your platform.
5816        The returned code is a short alphanumeric string that users can present to
5817        join the team. Each call produces a new code; previously issued codes are
5818        not invalidated by this request.
5819
5820        Args:
5821            team: Team ID (`tm_...`) identifying the team for which to generate the invite code.
5822
5823        Returns:
5824            Successful response
5825        """
5826        return self._http.request(
5827            f"/api/v1/teams/{team}/invites",
5828            method="POST",
5829            response_type=TeamInvitesResponse,
5830        )
5831
5832    def join(self, team: str, input: TeamJoinInput) -> None:
5833        """
5834        Join a team
5835        Adds a principal to a team that is visible to the authenticated user.
5836        By default, the currently authenticated user joins the team. Provide `agent`
5837        to add an agent to the team instead the caller must already be a member of
5838        the team to do so. Provide `user` (by ID) or `email` to add another user from
5839        your organization the caller must be a team owner, team admin, or org admin.
5840        Only one of `agent`, `user`, or `email` may be supplied per request.
5841        If the target principal is already a member of the team, the request succeeds
5842        without creating a duplicate membership. Server-to-server callers are not
5843        permitted to use this endpoint; use the invite-code endpoint instead.
5844
5845        Args:
5846            team: Team ID (`team_...`) to join.
5847            input: Request body.
5848            input.agent: Agent ID (`agent_...`) to add to the team. The caller must already be a member of the team.
5849            input.email: Email address of a member of the caller's organization to add to the team. Requires team-owner, team-admin, or org-admin role.
5850            input.user: User ID (`user_...`) of a member of the caller's organization to add to the team. Requires team-owner, team-admin, or org-admin role.
5851
5852        Returns:
5853            Empty response the principal is now a member of the team.
5854        """
5855        self._http.request(f"/api/v1/teams/{team}/join", method="POST", body=input)
5856
5857    def leave(self, team: str) -> None:
5858        """
5859        Leave a team
5860        Removes a principal from a team. By default, the authenticated user removes
5861        themselves from the team. Provide `agent` to remove an agent instead the
5862        caller must be a member of the team to do so.
5863        Team owners cannot leave their own team. To transfer ownership first, use
5864        the update-membership endpoint, then call this endpoint.
5865        For server-to-server requests, `user` is required to identify which user
5866        should be removed.
5867
5868        Args:
5869            team: Team ID (`team_...`) to leave.
5870
5871        Returns:
5872            Empty response the principal has been removed from the team.
5873        """
5874        self._http.request(f"/api/v1/teams/{team}/leave", method="DELETE")
5875
5876    def task_assignees(self, team: str, *, org: str | None = None) -> TeamTaskAssigneesResponse:
5877        """
5878        List task assignees for a team
5879        Returns the list of principals users and agents that can be assigned
5880        to tasks within the team. Results include both human members and AI agents
5881        and are sorted alphabetically by display name.
5882        This endpoint is only available for team-scoped contexts. Calling it with a
5883        user-scoped owner returns a 400 error. The authenticated user must be a
5884        member of the team or hold org-admin access. App-scoped developer and
5885        server-to-server callers may list assignees for teams in their app so they
5886        can select the explicit user or agent actor required by privileged task
5887        mutations.
5888
5889        Args:
5890            team: Team ID (`tem_...`).
5891            org: Explicit organization (`org_...`) for developer and server-to-server calls. Pass null for a team outside an organization.
5892
5893        Returns:
5894            Successful response
5895        """
5896        query: dict[str, object] = {}
5897        if org is not None:
5898            query["org"] = org
5899        return self._http.request(
5900            f"/api/v1/teams/{team}/task_assignees",
5901            query=query,
5902            response_type=TeamTaskAssigneesResponse,
5903        )
5597    def __init__(self, http: SyncHttpClient):
5598        self._http = http
5599        self.custom_objects = TeamCustomObjectResource(http)
5600        self.members = MemberResource(http)
5601        self.tasks = TeamTaskResource(http)
5602        self.threads = TeamThreadResource(http)
custom_objects
members
tasks
threads
def list( self, *, page: int | None = None, page_size: int | None = None, search: str | None = None, metadata: dict[str, typing.Any] | None = None, membership: str | None = None) -> TeamListResponse:
5604    def list(
5605        self,
5606        *,
5607        page: int | None = None,
5608        page_size: int | None = None,
5609        search: str | None = None,
5610        metadata: dict[str, Any] | None = None,
5611        membership: str | None = None,
5612    ) -> TeamListResponse:
5613        """
5614        List teams
5615        Returns a paginated list of teams visible to the authenticated user, ordered
5616        by creation time descending. Use `membership` to narrow results to teams the
5617        caller has joined or teams they are eligible to join based on their ACL
5618        visibility.
5619        Supports full-text search across team name and description via `search`, and
5620        structured metadata filtering via `metadata`. When `app` is present, results
5621        are scoped to that app and the caller must hold the corresponding app scope.
5622
5623        Args:
5624            page: Page number to retrieve, starting at 1. Defaults to 1.
5625            page_size: Number of teams to return per page. Defaults to 25.
5626            search: Full-text search string matched against team name and description.
5627            metadata: Structured metadata filter expression. Only teams whose metadata satisfies the expression are returned.
5628            membership: Filter teams by membership status. `"joined"` returns only teams the caller is a member of. `"joinable"` returns ACL-visible teams the caller has not yet joined. Omit to return all visible teams.
5629
5630        Returns:
5631            Successful response
5632        """
5633        query: dict[str, object] = {}
5634        if page is not None:
5635            query["page"] = page
5636        if page_size is not None:
5637            query["page_size"] = page_size
5638        if search is not None:
5639            query["search"] = search
5640        if metadata is not None:
5641            query["metadata"] = metadata
5642        if membership is not None:
5643            query["membership"] = membership
5644        return self._http.request("/api/v1/teams", query=query, response_type=TeamListResponse)

List teams Returns a paginated list of teams visible to the authenticated user, ordered by creation time descending. Use membership to narrow results to teams the caller has joined or teams they are eligible to join based on their ACL visibility. Supports full-text search across team name and description via search, and structured metadata filtering via metadata. When app is present, results are scoped to that app and the caller must hold the corresponding app scope.

Arguments:
  • page: Page number to retrieve, starting at 1. Defaults to 1.
  • page_size: Number of teams to return per page. Defaults to 25.
  • search: Full-text search string matched against team name and description.
  • metadata: Structured metadata filter expression. Only teams whose metadata satisfies the expression are returned.
  • membership: Filter teams by membership status. "joined" returns only teams the caller is a member of. "joinable" returns ACL-visible teams the caller has not yet joined. Omit to return all visible teams.
Returns:

Successful response

def create( self, input: TeamCreateInput) -> archastro.platform.types.teams.Team:
5646    def create(self, input: TeamCreateInput) -> Team:
5647        """
5648        Create a team
5649        Creates a new team and returns the created team object. The authenticated
5650        user becomes the team's owner.
5651        When `app` is supplied, the request is scoped to that app and the caller
5652        must hold the corresponding app scope. Omit `org` unless you want the team
5653        pinned to a specific organization. A default chat thread is provisioned for
5654        the team automatically after creation.
5655
5656        Args:
5657            input: Request body.
5658            input.acl: Access control configuration for the team. Controls who can discover and join the team.
5659            input.description: Optional human-readable description of the team's purpose.
5660            input.idempotency_key: Optional retry key. Replays in the same app, organization, and sandbox return the original team.
5661            input.metadata: Arbitrary key-value pairs you can attach to the team for your own use. Values must be strings.
5662            input.name: Display name for the team.
5663            input.org: Organization ID (`org_...`) to associate the team with. Omit to create the team without an org affiliation.
5664
5665        Returns:
5666            The newly created team.
5667        """
5668        return self._http.request("/api/v1/teams", method="POST", body=input, response_type=Team)

Create a team Creates a new team and returns the created team object. The authenticated user becomes the team's owner. When app is supplied, the request is scoped to that app and the caller must hold the corresponding app scope. Omit org unless you want the team pinned to a specific organization. A default chat thread is provisioned for the team automatically after creation.

Arguments:
  • input: Request body.
  • input.acl: Access control configuration for the team. Controls who can discover and join the team.
  • input.description: Optional human-readable description of the team's purpose.
  • input.idempotency_key: Optional retry key. Replays in the same app, organization, and sandbox return the original team.
  • input.metadata: Arbitrary key-value pairs you can attach to the team for your own use. Values must be strings.
  • input.name: Display name for the team.
  • input.org: Organization ID (org_...) to associate the team with. Omit to create the team without an org affiliation.
Returns:

The newly created team.

def join_by_code( self, input: TeamJoinByCodeInput) -> archastro.platform.types.teams.Team:
5670    def join_by_code(self, input: TeamJoinByCodeInput) -> Team:
5671        """
5672        Join a team with an invite code
5673        Adds a principal to a team using a 12-character invite code. The invite
5674        code can be supplied as either `join_code` or `invite_code`; both are
5675        accepted for backwards compatibility.
5676        For user-authenticated requests, the currently authenticated user is added
5677        to the team. For server-to-server requests, you must supply either `agent`
5678        (to add an agent) or `user` (to add a specific user by ID). If the user
5679        is already a member of the team, the request succeeds without creating a
5680        duplicate membership.
5681        This endpoint is rate-limited to 10 requests per minute per IP address to
5682        prevent invite-code enumeration.
5683
5684        Args:
5685            input: Request body.
5686            input.agent: Agent ID (`agent_...`) to add to the team. When provided, the agent is joined instead of the authenticated user. Requires a server-to-server session.
5687            input.invite_code: 12-character invite code alias for `join_code` accepted for backwards compatibility.
5688            input.join_code: 12-character invite code that identifies the team. Mutually usable with `invite_code`.
5689            input.user: User ID (`user_...`) to add to the team. Required for server-to-server requests when `agent` is not supplied.
5690
5691        Returns:
5692            The team the principal has joined.
5693        """
5694        return self._http.request(
5695            "/api/v1/teams/join_by_code",
5696            method="POST",
5697            body=input,
5698            response_type=Team,
5699        )

Join a team with an invite code Adds a principal to a team using a 12-character invite code. The invite code can be supplied as either join_code or invite_code; both are accepted for backwards compatibility. For user-authenticated requests, the currently authenticated user is added to the team. For server-to-server requests, you must supply either agent (to add an agent) or user (to add a specific user by ID). If the user is already a member of the team, the request succeeds without creating a duplicate membership. This endpoint is rate-limited to 10 requests per minute per IP address to prevent invite-code enumeration.

Arguments:
  • input: Request body.
  • input.agent: Agent ID (agent_...) to add to the team. When provided, the agent is joined instead of the authenticated user. Requires a server-to-server session.
  • input.invite_code: 12-character invite code alias for join_code accepted for backwards compatibility.
  • input.join_code: 12-character invite code that identifies the team. Mutually usable with invite_code.
  • input.user: User ID (user_...) to add to the team. Required for server-to-server requests when agent is not supplied.
Returns:

The team the principal has joined.

def delete(self, team: str) -> None:
5701    def delete(self, team: str) -> None:
5702        """
5703        Delete a team
5704        Permanently deletes the team identified by `team`. This action is
5705        irreversible all team memberships, settings, and associated data are
5706        removed.
5707        The caller must be the team owner or an org admin. When `app` is present,
5708        the caller must also hold the corresponding app scope.
5709
5710        Args:
5711            team: Team ID (`team_...`) of the team to delete.
5712
5713        Returns:
5714            Empty response the team has been deleted.
5715        """
5716        self._http.request(f"/api/v1/teams/{team}", method="DELETE")

Delete a team Permanently deletes the team identified by team. This action is irreversible all team memberships, settings, and associated data are removed. The caller must be the team owner or an org admin. When app is present, the caller must also hold the corresponding app scope.

Arguments:
  • team: Team ID (team_...) of the team to delete.
Returns:

Empty response the team has been deleted.

def get(self, team: str) -> archastro.platform.types.teams.Team:
5718    def get(self, team: str) -> Team:
5719        """
5720        Retrieve a team
5721        Returns the full team object for the given `team` ID, including its current
5722        member list and all associated threads.
5723        The authenticated user must be a member of the team or hold a role that
5724        grants visibility (org admin, app scope). When `app` is supplied, the
5725        caller must hold the corresponding app scope.
5726
5727        Args:
5728            team: Team ID (`team_...`) of the team to retrieve.
5729
5730        Returns:
5731            The requested team, including its members and threads.
5732        """
5733        return self._http.request(f"/api/v1/teams/{team}", response_type=Team)

Retrieve a team Returns the full team object for the given team ID, including its current member list and all associated threads. The authenticated user must be a member of the team or hold a role that grants visibility (org admin, app scope). When app is supplied, the caller must hold the corresponding app scope.

Arguments:
  • team: Team ID (team_...) of the team to retrieve.
Returns:

The requested team, including its members and threads.

def update( self, team: str, input: TeamUpdateInput) -> archastro.platform.types.teams.Team:
5735    def update(self, team: str, input: TeamUpdateInput) -> Team:
5736        """
5737        Update a team
5738        Updates one or more attributes of the team identified by `team`. Only the
5739        fields you provide are changed; omitted fields are left as-is.
5740        To replace the team's profile picture, supply the `profile_picture` object
5741        with base64-encoded image data. The previous picture is deleted after the
5742        new one is successfully uploaded. When `app` is present, the caller must hold
5743        the corresponding app scope. The caller must be a team owner or org admin.
5744
5745        Args:
5746            team: Team ID (`team_...`) of the team to update.
5747            input: Request body.
5748            input.acl: New access control configuration for the team. Replaces the existing ACL.
5749            input.description: New human-readable description of the team's purpose.
5750            input.metadata: Arbitrary key-value pairs to set on the team. Replaces the existing metadata map entirely.
5751            input.name: New display name for the team.
5752            input.profile_picture: New profile picture for the team. Provide this object to upload and replace the current picture.
5753
5754        Returns:
5755            The updated team with all changes applied.
5756        """
5757        return self._http.request(
5758            f"/api/v1/teams/{team}",
5759            method="PATCH",
5760            body=input,
5761            response_type=Team,
5762        )

Update a team Updates one or more attributes of the team identified by team. Only the fields you provide are changed; omitted fields are left as-is. To replace the team's profile picture, supply the profile_picture object with base64-encoded image data. The previous picture is deleted after the new one is successfully uploaded. When app is present, the caller must hold the corresponding app scope. The caller must be a team owner or org admin.

Arguments:
  • team: Team ID (team_...) of the team to update.
  • input: Request body.
  • input.acl: New access control configuration for the team. Replaces the existing ACL.
  • input.description: New human-readable description of the team's purpose.
  • input.metadata: Arbitrary key-value pairs to set on the team. Replaces the existing metadata map entirely.
  • input.name: New display name for the team.
  • input.profile_picture: New profile picture for the team. Provide this object to upload and replace the current picture.
Returns:

The updated team with all changes applied.

def artifacts( self, team: str) -> TeamArtifactsResponse:
5764    def artifacts(self, team: str) -> TeamArtifactsResponse:
5765        """
5766        List a team's artifacts
5767        Returns all artifacts owned by the specified team. Artifacts represent
5768        AI-generated or user-uploaded files associated with agent sessions,
5769        threads, or sandboxes such as images, documents, and code outputs.
5770        The authenticated user must be a member of the team. Attempting to list
5771        artifacts for a team the caller does not have access to returns 404
5772        rather than 403 to avoid leaking team existence.
5773        Results are returned in a single page without cursor pagination. Each
5774        artifact in the response reflects the state of its current version,
5775        including a short-lived signed `file_url` for direct download.
5776
5777        Args:
5778            team: Team ID (`tea_...`). The authenticated user must be a member of this team.
5779
5780        Returns:
5781            Successful response
5782        """
5783        return self._http.request(
5784            f"/api/v1/teams/{team}/artifacts",
5785            response_type=TeamArtifactsResponse,
5786        )

List a team's artifacts Returns all artifacts owned by the specified team. Artifacts represent AI-generated or user-uploaded files associated with agent sessions, threads, or sandboxes such as images, documents, and code outputs. The authenticated user must be a member of the team. Attempting to list artifacts for a team the caller does not have access to returns 404 rather than 403 to avoid leaking team existence. Results are returned in a single page without cursor pagination. Each artifact in the response reflects the state of its current version, including a short-lived signed file_url for direct download.

Arguments:
  • team: Team ID (tea_...). The authenticated user must be a member of this team.
Returns:

Successful response

def invite(self, team: str) -> archastro.platform.types.teams.TeamInvite:
5788    def invite(self, team: str) -> TeamInvite:
5789        """
5790        Create a team invite
5791        Generates a new invite code for the specified team. The authenticated user
5792        must be a member of the team with the `owner` or `admin` role.
5793        The returned code is a short alphanumeric string that other users can
5794        present to join the team. Each call produces a new code; previously issued
5795        codes are not invalidated by this request.
5796
5797        Args:
5798            team: Team ID (`tm_...`) identifying the team for which to generate the invite code.
5799
5800        Returns:
5801            The newly created team invite containing the join code.
5802        """
5803        return self._http.request(
5804            f"/api/v1/teams/{team}/invite",
5805            method="POST",
5806            response_type=TeamInvite,
5807        )

Create a team invite Generates a new invite code for the specified team. The authenticated user must be a member of the team with the owner or admin role. The returned code is a short alphanumeric string that other users can present to join the team. Each call produces a new code; previously issued codes are not invalidated by this request.

Arguments:
  • team: Team ID (tm_...) identifying the team for which to generate the invite code.
Returns:

The newly created team invite containing the join code.

def invites( self, team: str) -> TeamInvitesResponse:
5809    def invites(self, team: str) -> TeamInvitesResponse:
5810        """
5811        Create a team invite (server-to-server)
5812        Generates a new invite code for the specified team using server-to-server
5813        authentication. Unlike the user-facing create endpoint, this variant does not
5814        require the caller to be a team member it is intended for privileged
5815        back-end services acting on behalf of your platform.
5816        The returned code is a short alphanumeric string that users can present to
5817        join the team. Each call produces a new code; previously issued codes are
5818        not invalidated by this request.
5819
5820        Args:
5821            team: Team ID (`tm_...`) identifying the team for which to generate the invite code.
5822
5823        Returns:
5824            Successful response
5825        """
5826        return self._http.request(
5827            f"/api/v1/teams/{team}/invites",
5828            method="POST",
5829            response_type=TeamInvitesResponse,
5830        )

Create a team invite (server-to-server) Generates a new invite code for the specified team using server-to-server authentication. Unlike the user-facing create endpoint, this variant does not require the caller to be a team member it is intended for privileged back-end services acting on behalf of your platform. The returned code is a short alphanumeric string that users can present to join the team. Each call produces a new code; previously issued codes are not invalidated by this request.

Arguments:
  • team: Team ID (tm_...) identifying the team for which to generate the invite code.
Returns:

Successful response

def join( self, team: str, input: TeamJoinInput) -> None:
5832    def join(self, team: str, input: TeamJoinInput) -> None:
5833        """
5834        Join a team
5835        Adds a principal to a team that is visible to the authenticated user.
5836        By default, the currently authenticated user joins the team. Provide `agent`
5837        to add an agent to the team instead the caller must already be a member of
5838        the team to do so. Provide `user` (by ID) or `email` to add another user from
5839        your organization the caller must be a team owner, team admin, or org admin.
5840        Only one of `agent`, `user`, or `email` may be supplied per request.
5841        If the target principal is already a member of the team, the request succeeds
5842        without creating a duplicate membership. Server-to-server callers are not
5843        permitted to use this endpoint; use the invite-code endpoint instead.
5844
5845        Args:
5846            team: Team ID (`team_...`) to join.
5847            input: Request body.
5848            input.agent: Agent ID (`agent_...`) to add to the team. The caller must already be a member of the team.
5849            input.email: Email address of a member of the caller's organization to add to the team. Requires team-owner, team-admin, or org-admin role.
5850            input.user: User ID (`user_...`) of a member of the caller's organization to add to the team. Requires team-owner, team-admin, or org-admin role.
5851
5852        Returns:
5853            Empty response the principal is now a member of the team.
5854        """
5855        self._http.request(f"/api/v1/teams/{team}/join", method="POST", body=input)

Join a team Adds a principal to a team that is visible to the authenticated user. By default, the currently authenticated user joins the team. Provide agent to add an agent to the team instead the caller must already be a member of the team to do so. Provide user (by ID) or email to add another user from your organization the caller must be a team owner, team admin, or org admin. Only one of agent, user, or email may be supplied per request. If the target principal is already a member of the team, the request succeeds without creating a duplicate membership. Server-to-server callers are not permitted to use this endpoint; use the invite-code endpoint instead.

Arguments:
  • team: Team ID (team_...) to join.
  • input: Request body.
  • input.agent: Agent ID (agent_...) to add to the team. The caller must already be a member of the team.
  • input.email: Email address of a member of the caller's organization to add to the team. Requires team-owner, team-admin, or org-admin role.
  • input.user: User ID (user_...) of a member of the caller's organization to add to the team. Requires team-owner, team-admin, or org-admin role.
Returns:

Empty response the principal is now a member of the team.

def leave(self, team: str) -> None:
5857    def leave(self, team: str) -> None:
5858        """
5859        Leave a team
5860        Removes a principal from a team. By default, the authenticated user removes
5861        themselves from the team. Provide `agent` to remove an agent instead the
5862        caller must be a member of the team to do so.
5863        Team owners cannot leave their own team. To transfer ownership first, use
5864        the update-membership endpoint, then call this endpoint.
5865        For server-to-server requests, `user` is required to identify which user
5866        should be removed.
5867
5868        Args:
5869            team: Team ID (`team_...`) to leave.
5870
5871        Returns:
5872            Empty response the principal has been removed from the team.
5873        """
5874        self._http.request(f"/api/v1/teams/{team}/leave", method="DELETE")

Leave a team Removes a principal from a team. By default, the authenticated user removes themselves from the team. Provide agent to remove an agent instead the caller must be a member of the team to do so. Team owners cannot leave their own team. To transfer ownership first, use the update-membership endpoint, then call this endpoint. For server-to-server requests, user is required to identify which user should be removed.

Arguments:
  • team: Team ID (team_...) to leave.
Returns:

Empty response the principal has been removed from the team.

def task_assignees( self, team: str, *, org: str | None = None) -> TeamTaskAssigneesResponse:
5876    def task_assignees(self, team: str, *, org: str | None = None) -> TeamTaskAssigneesResponse:
5877        """
5878        List task assignees for a team
5879        Returns the list of principals users and agents that can be assigned
5880        to tasks within the team. Results include both human members and AI agents
5881        and are sorted alphabetically by display name.
5882        This endpoint is only available for team-scoped contexts. Calling it with a
5883        user-scoped owner returns a 400 error. The authenticated user must be a
5884        member of the team or hold org-admin access. App-scoped developer and
5885        server-to-server callers may list assignees for teams in their app so they
5886        can select the explicit user or agent actor required by privileged task
5887        mutations.
5888
5889        Args:
5890            team: Team ID (`tem_...`).
5891            org: Explicit organization (`org_...`) for developer and server-to-server calls. Pass null for a team outside an organization.
5892
5893        Returns:
5894            Successful response
5895        """
5896        query: dict[str, object] = {}
5897        if org is not None:
5898            query["org"] = org
5899        return self._http.request(
5900            f"/api/v1/teams/{team}/task_assignees",
5901            query=query,
5902            response_type=TeamTaskAssigneesResponse,
5903        )

List task assignees for a team Returns the list of principals users and agents that can be assigned to tasks within the team. Results include both human members and AI agents and are sorted alphabetically by display name. This endpoint is only available for team-scoped contexts. Calling it with a user-scoped owner returns a 400 error. The authenticated user must be a member of the team or hold org-admin access. App-scoped developer and server-to-server callers may list assignees for teams in their app so they can select the explicit user or agent actor required by privileged task mutations.

Arguments:
  • team: Team ID (tem_...).
  • org: Explicit organization (org_...) for developer and server-to-server calls. Pass null for a team outside an organization.
Returns:

Successful response