archastro.platform.v1.resources.activity_feed
1# Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. 2# This file is auto-generated by @archastro/sdk-generator. Do not edit. 3# Content hash: 6290aa699b6a 4 5from __future__ import annotations 6 7import builtins 8from datetime import datetime 9from typing import Any 10 11from pydantic import BaseModel, Field 12 13from ...runtime.http_client import HttpClient, SyncHttpClient 14 15 16class ActivityFeedListResponseDataItem(BaseModel): 17 agent: str | dict[str, Any] | None = Field( 18 default=None, 19 description="The agent that produced this event. Returns an agent ID (`agi_...`) by default, or an expanded agent object when the association is loaded. `null` if no agent is associated.", 20 ) 21 app: str | None = Field( 22 default=None, 23 description="ID of the application that produced this entry (`dap_...`). `null` if not scoped to an app.", 24 ) 25 attachments: list[dict[str, Any]] | None = Field( 26 default=None, 27 description='Array of attachment objects associated with this entry. Each attachment has a `type` field (e.g. `"file"`, `"task"`, `"artifact"`) and type-specific additional fields. Empty array when there are no attachments.', 28 ) 29 automation_run: str | None = Field( 30 default=None, 31 description="ID of the automation run that produced this entry (`atr_...`). `null` if not produced by an automation run.", 32 ) 33 content: str | None = Field( 34 default=None, 35 description="A longer explanation of the event rendered as Markdown. `null` if no additional content is available.", 36 ) 37 correlation_id: str | None = Field( 38 default=None, 39 description="An opaque string used to group related entries together. Entries sharing the same `correlation_id` belong to a single logical operation. `null` if not correlated.", 40 ) 41 created_at: datetime | None = Field( 42 default=None, description="When this activity feed entry was created (ISO 8601)." 43 ) 44 id: str = Field(..., description="Activity feed entry ID (`afe_...`).") 45 kind: str | None = Field( 46 default=None, 47 description='The type of event this entry represents, e.g. `"agent_step"` or `"tool_call"`. Determines how `title`, `content`, and `attachments` should be interpreted.', 48 ) 49 level: str | None = Field( 50 default=None, 51 description='Severity level of the event. One of `"info"`, `"warning"`, or `"error"`. `null` if no severity is set.', 52 ) 53 metadata: dict[str, Any] | None = Field( 54 default=None, 55 description="Arbitrary key-value metadata stored on this entry. Returns an empty object when no metadata is set.", 56 ) 57 org: str | None = Field( 58 default=None, 59 description="ID of the organization this entry belongs to (`org_...`). `null` if not org-scoped.", 60 ) 61 routine_run: str | None = Field( 62 default=None, 63 description="ID of the agent routine run that produced this entry (`arr_...`). `null` if not produced by a routine run.", 64 ) 65 sandbox: str | None = Field( 66 default=None, 67 description="Identifier of the sandbox environment this entry was generated in. `null` in production contexts.", 68 ) 69 session_record: str | None = Field( 70 default=None, 71 description="ID of the agent session record this entry belongs to (`ase_...`). `null` if not part of an agent session.", 72 ) 73 team: str | None = Field( 74 default=None, 75 description="ID of the team this entry is associated with (`tem_...`). `null` if not team-scoped.", 76 ) 77 thread: str | None = Field( 78 default=None, 79 description="ID of the thread this entry is associated with (`thr_...`). `null` if not linked to a thread.", 80 ) 81 title: str | None = Field( 82 default=None, 83 description="A one-line human-readable summary of the event. `null` if the entry has no title.", 84 ) 85 updated_at: datetime | None = Field( 86 default=None, description="When this activity feed entry was last modified (ISO 8601)." 87 ) 88 user: str | dict[str, Any] | None = Field( 89 default=None, 90 description="The user who triggered this event. Returns a user ID (`usr_...`) by default, or an expanded user object when the association is loaded. `null` if no user is associated.", 91 ) 92 93 94class ActivityFeedListResponse(BaseModel): 95 """ 96 Successful response 97 """ 98 99 after_cursor: str | None = Field( 100 default=None, 101 description="Opaque cursor to pass as `after_cursor` to retrieve the next newer page. Absent when no newer entries exist.", 102 ) 103 before_cursor: str | None = Field( 104 default=None, 105 description="Opaque cursor to pass as `before_cursor` to retrieve the next older page. Absent when no older entries exist.", 106 ) 107 data: list[ActivityFeedListResponseDataItem] = Field( 108 ..., 109 description="Array of activity feed entry objects for the current page, ordered newest first.", 110 ) 111 has_more: bool = Field( 112 ..., 113 description="`true` when additional entries exist beyond this page in the requested direction.", 114 ) 115 116 117class AsyncActivityFeedResource: 118 def __init__(self, http: HttpClient): 119 self._http = http 120 121 async def list( 122 self, 123 *, 124 kind: builtins.list[str] | None = None, 125 level: builtins.list[str] | None = None, 126 agent: builtins.list[str] | None = None, 127 thread: builtins.list[str] | None = None, 128 team: builtins.list[str] | None = None, 129 org: builtins.list[str] | None = None, 130 correlation_id: str | None = None, 131 limit: int | None = None, 132 before_cursor: str | None = None, 133 after_cursor: str | None = None, 134 ) -> ActivityFeedListResponse: 135 """ 136 List activity feed entries 137 Returns a cursor-paginated list of activity feed entries visible to the 138 authenticated user. Entries are ordered from newest to oldest by default. 139 Use `before_cursor` to page backward and `after_cursor` to page forward. 140 Results are scoped to the caller's app. All filter params are optional and 141 can be combined. Passing multiple values in an array filter returns entries 142 matching any of the supplied values (OR semantics). 143 Invalid `kind` or `level` values return a 400 error listing the accepted 144 values rather than being silently ignored. 145 146 Args: 147 kind: One or more entry kinds to include. Accepted values: routine_run, automation_run, thread_story, agent_quality_verdict, generic. Omit to return all kinds. 148 level: One or more severity levels to include. Accepted values: debug, info, warn, error, audit. Omit to return all levels. 149 agent: Restrict results to entries associated with these agent IDs (`agt_...`). Accepts multiple values. 150 thread: Restrict results to entries associated with these thread IDs (`thr_...`). Accepts multiple values. 151 team: Restrict results to entries associated with these team IDs (`tem_...`). Accepts multiple values. 152 org: Restrict results to entries associated with these organization IDs (`org_...`). Accepts multiple values. 153 correlation_id: Restrict results to entries that share this correlation group identifier. Useful for tracing a chain of related events. 154 limit: Maximum number of entries to return per page. Defaults to 50; maximum is 100. 155 before_cursor: Opaque cursor from a previous response's `before_cursor` field. Returns entries older than the cursor's position. 156 after_cursor: Opaque cursor from a previous response's `after_cursor` field. Returns entries newer than the cursor's position. 157 158 Returns: 159 Successful response 160 """ 161 query: dict[str, object] = {} 162 if kind is not None: 163 query["kind"] = kind 164 if level is not None: 165 query["level"] = level 166 if agent is not None: 167 query["agent"] = agent 168 if thread is not None: 169 query["thread"] = thread 170 if team is not None: 171 query["team"] = team 172 if org is not None: 173 query["org"] = org 174 if correlation_id is not None: 175 query["correlation_id"] = correlation_id 176 if limit is not None: 177 query["limit"] = limit 178 if before_cursor is not None: 179 query["before_cursor"] = before_cursor 180 if after_cursor is not None: 181 query["after_cursor"] = after_cursor 182 return await self._http.request( 183 "/api/v1/activity_feed", 184 query=query, 185 response_type=ActivityFeedListResponse, 186 ) 187 188 189class ActivityFeedResource: 190 def __init__(self, http: SyncHttpClient): 191 self._http = http 192 193 def list( 194 self, 195 *, 196 kind: builtins.list[str] | None = None, 197 level: builtins.list[str] | None = None, 198 agent: builtins.list[str] | None = None, 199 thread: builtins.list[str] | None = None, 200 team: builtins.list[str] | None = None, 201 org: builtins.list[str] | None = None, 202 correlation_id: str | None = None, 203 limit: int | None = None, 204 before_cursor: str | None = None, 205 after_cursor: str | None = None, 206 ) -> ActivityFeedListResponse: 207 """ 208 List activity feed entries 209 Returns a cursor-paginated list of activity feed entries visible to the 210 authenticated user. Entries are ordered from newest to oldest by default. 211 Use `before_cursor` to page backward and `after_cursor` to page forward. 212 Results are scoped to the caller's app. All filter params are optional and 213 can be combined. Passing multiple values in an array filter returns entries 214 matching any of the supplied values (OR semantics). 215 Invalid `kind` or `level` values return a 400 error listing the accepted 216 values rather than being silently ignored. 217 218 Args: 219 kind: One or more entry kinds to include. Accepted values: routine_run, automation_run, thread_story, agent_quality_verdict, generic. Omit to return all kinds. 220 level: One or more severity levels to include. Accepted values: debug, info, warn, error, audit. Omit to return all levels. 221 agent: Restrict results to entries associated with these agent IDs (`agt_...`). Accepts multiple values. 222 thread: Restrict results to entries associated with these thread IDs (`thr_...`). Accepts multiple values. 223 team: Restrict results to entries associated with these team IDs (`tem_...`). Accepts multiple values. 224 org: Restrict results to entries associated with these organization IDs (`org_...`). Accepts multiple values. 225 correlation_id: Restrict results to entries that share this correlation group identifier. Useful for tracing a chain of related events. 226 limit: Maximum number of entries to return per page. Defaults to 50; maximum is 100. 227 before_cursor: Opaque cursor from a previous response's `before_cursor` field. Returns entries older than the cursor's position. 228 after_cursor: Opaque cursor from a previous response's `after_cursor` field. Returns entries newer than the cursor's position. 229 230 Returns: 231 Successful response 232 """ 233 query: dict[str, object] = {} 234 if kind is not None: 235 query["kind"] = kind 236 if level is not None: 237 query["level"] = level 238 if agent is not None: 239 query["agent"] = agent 240 if thread is not None: 241 query["thread"] = thread 242 if team is not None: 243 query["team"] = team 244 if org is not None: 245 query["org"] = org 246 if correlation_id is not None: 247 query["correlation_id"] = correlation_id 248 if limit is not None: 249 query["limit"] = limit 250 if before_cursor is not None: 251 query["before_cursor"] = before_cursor 252 if after_cursor is not None: 253 query["after_cursor"] = after_cursor 254 return self._http.request( 255 "/api/v1/activity_feed", 256 query=query, 257 response_type=ActivityFeedListResponse, 258 )
17class ActivityFeedListResponseDataItem(BaseModel): 18 agent: str | dict[str, Any] | None = Field( 19 default=None, 20 description="The agent that produced this event. Returns an agent ID (`agi_...`) by default, or an expanded agent object when the association is loaded. `null` if no agent is associated.", 21 ) 22 app: str | None = Field( 23 default=None, 24 description="ID of the application that produced this entry (`dap_...`). `null` if not scoped to an app.", 25 ) 26 attachments: list[dict[str, Any]] | None = Field( 27 default=None, 28 description='Array of attachment objects associated with this entry. Each attachment has a `type` field (e.g. `"file"`, `"task"`, `"artifact"`) and type-specific additional fields. Empty array when there are no attachments.', 29 ) 30 automation_run: str | None = Field( 31 default=None, 32 description="ID of the automation run that produced this entry (`atr_...`). `null` if not produced by an automation run.", 33 ) 34 content: str | None = Field( 35 default=None, 36 description="A longer explanation of the event rendered as Markdown. `null` if no additional content is available.", 37 ) 38 correlation_id: str | None = Field( 39 default=None, 40 description="An opaque string used to group related entries together. Entries sharing the same `correlation_id` belong to a single logical operation. `null` if not correlated.", 41 ) 42 created_at: datetime | None = Field( 43 default=None, description="When this activity feed entry was created (ISO 8601)." 44 ) 45 id: str = Field(..., description="Activity feed entry ID (`afe_...`).") 46 kind: str | None = Field( 47 default=None, 48 description='The type of event this entry represents, e.g. `"agent_step"` or `"tool_call"`. Determines how `title`, `content`, and `attachments` should be interpreted.', 49 ) 50 level: str | None = Field( 51 default=None, 52 description='Severity level of the event. One of `"info"`, `"warning"`, or `"error"`. `null` if no severity is set.', 53 ) 54 metadata: dict[str, Any] | None = Field( 55 default=None, 56 description="Arbitrary key-value metadata stored on this entry. Returns an empty object when no metadata is set.", 57 ) 58 org: str | None = Field( 59 default=None, 60 description="ID of the organization this entry belongs to (`org_...`). `null` if not org-scoped.", 61 ) 62 routine_run: str | None = Field( 63 default=None, 64 description="ID of the agent routine run that produced this entry (`arr_...`). `null` if not produced by a routine run.", 65 ) 66 sandbox: str | None = Field( 67 default=None, 68 description="Identifier of the sandbox environment this entry was generated in. `null` in production contexts.", 69 ) 70 session_record: str | None = Field( 71 default=None, 72 description="ID of the agent session record this entry belongs to (`ase_...`). `null` if not part of an agent session.", 73 ) 74 team: str | None = Field( 75 default=None, 76 description="ID of the team this entry is associated with (`tem_...`). `null` if not team-scoped.", 77 ) 78 thread: str | None = Field( 79 default=None, 80 description="ID of the thread this entry is associated with (`thr_...`). `null` if not linked to a thread.", 81 ) 82 title: str | None = Field( 83 default=None, 84 description="A one-line human-readable summary of the event. `null` if the entry has no title.", 85 ) 86 updated_at: datetime | None = Field( 87 default=None, description="When this activity feed entry was last modified (ISO 8601)." 88 ) 89 user: str | dict[str, Any] | None = Field( 90 default=None, 91 description="The user who triggered this event. Returns a user ID (`usr_...`) by default, or an expanded user object when the association is loaded. `null` if no user is associated.", 92 )
!!! 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__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem 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-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused 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.
The agent that produced this event. Returns an agent ID (agi_...) by default, or an expanded agent object when the association is loaded. null if no agent is associated.
ID of the application that produced this entry (dap_...). null if not scoped to an app.
Array of attachment objects associated with this entry. Each attachment has a type field (e.g. "file", "task", "artifact") and type-specific additional fields. Empty array when there are no attachments.
ID of the automation run that produced this entry (atr_...). null if not produced by an automation run.
A longer explanation of the event rendered as Markdown. null if no additional content is available.
An opaque string used to group related entries together. Entries sharing the same correlation_id belong to a single logical operation. null if not correlated.
The type of event this entry represents, e.g. "agent_step" or "tool_call". Determines how title, content, and attachments should be interpreted.
Severity level of the event. One of "info", "warning", or "error". null if no severity is set.
Arbitrary key-value metadata stored on this entry. Returns an empty object when no metadata is set.
ID of the organization this entry belongs to (org_...). null if not org-scoped.
ID of the agent routine run that produced this entry (arr_...). null if not produced by a routine run.
Identifier of the sandbox environment this entry was generated in. null in production contexts.
ID of the agent session record this entry belongs to (ase_...). null if not part of an agent session.
ID of the team this entry is associated with (tem_...). null if not team-scoped.
ID of the thread this entry is associated with (thr_...). null if not linked to a thread.
A one-line human-readable summary of the event. null if the entry has no title.
95class ActivityFeedListResponse(BaseModel): 96 """ 97 Successful response 98 """ 99 100 after_cursor: str | None = Field( 101 default=None, 102 description="Opaque cursor to pass as `after_cursor` to retrieve the next newer page. Absent when no newer entries exist.", 103 ) 104 before_cursor: str | None = Field( 105 default=None, 106 description="Opaque cursor to pass as `before_cursor` to retrieve the next older page. Absent when no older entries exist.", 107 ) 108 data: list[ActivityFeedListResponseDataItem] = Field( 109 ..., 110 description="Array of activity feed entry objects for the current page, ordered newest first.", 111 ) 112 has_more: bool = Field( 113 ..., 114 description="`true` when additional entries exist beyond this page in the requested direction.", 115 )
Successful response
Opaque cursor to pass as after_cursor to retrieve the next newer page. Absent when no newer entries exist.
Opaque cursor to pass as before_cursor to retrieve the next older page. Absent when no older entries exist.
118class AsyncActivityFeedResource: 119 def __init__(self, http: HttpClient): 120 self._http = http 121 122 async def list( 123 self, 124 *, 125 kind: builtins.list[str] | None = None, 126 level: builtins.list[str] | None = None, 127 agent: builtins.list[str] | None = None, 128 thread: builtins.list[str] | None = None, 129 team: builtins.list[str] | None = None, 130 org: builtins.list[str] | None = None, 131 correlation_id: str | None = None, 132 limit: int | None = None, 133 before_cursor: str | None = None, 134 after_cursor: str | None = None, 135 ) -> ActivityFeedListResponse: 136 """ 137 List activity feed entries 138 Returns a cursor-paginated list of activity feed entries visible to the 139 authenticated user. Entries are ordered from newest to oldest by default. 140 Use `before_cursor` to page backward and `after_cursor` to page forward. 141 Results are scoped to the caller's app. All filter params are optional and 142 can be combined. Passing multiple values in an array filter returns entries 143 matching any of the supplied values (OR semantics). 144 Invalid `kind` or `level` values return a 400 error listing the accepted 145 values rather than being silently ignored. 146 147 Args: 148 kind: One or more entry kinds to include. Accepted values: routine_run, automation_run, thread_story, agent_quality_verdict, generic. Omit to return all kinds. 149 level: One or more severity levels to include. Accepted values: debug, info, warn, error, audit. Omit to return all levels. 150 agent: Restrict results to entries associated with these agent IDs (`agt_...`). Accepts multiple values. 151 thread: Restrict results to entries associated with these thread IDs (`thr_...`). Accepts multiple values. 152 team: Restrict results to entries associated with these team IDs (`tem_...`). Accepts multiple values. 153 org: Restrict results to entries associated with these organization IDs (`org_...`). Accepts multiple values. 154 correlation_id: Restrict results to entries that share this correlation group identifier. Useful for tracing a chain of related events. 155 limit: Maximum number of entries to return per page. Defaults to 50; maximum is 100. 156 before_cursor: Opaque cursor from a previous response's `before_cursor` field. Returns entries older than the cursor's position. 157 after_cursor: Opaque cursor from a previous response's `after_cursor` field. Returns entries newer than the cursor's position. 158 159 Returns: 160 Successful response 161 """ 162 query: dict[str, object] = {} 163 if kind is not None: 164 query["kind"] = kind 165 if level is not None: 166 query["level"] = level 167 if agent is not None: 168 query["agent"] = agent 169 if thread is not None: 170 query["thread"] = thread 171 if team is not None: 172 query["team"] = team 173 if org is not None: 174 query["org"] = org 175 if correlation_id is not None: 176 query["correlation_id"] = correlation_id 177 if limit is not None: 178 query["limit"] = limit 179 if before_cursor is not None: 180 query["before_cursor"] = before_cursor 181 if after_cursor is not None: 182 query["after_cursor"] = after_cursor 183 return await self._http.request( 184 "/api/v1/activity_feed", 185 query=query, 186 response_type=ActivityFeedListResponse, 187 )
122 async def list( 123 self, 124 *, 125 kind: builtins.list[str] | None = None, 126 level: builtins.list[str] | None = None, 127 agent: builtins.list[str] | None = None, 128 thread: builtins.list[str] | None = None, 129 team: builtins.list[str] | None = None, 130 org: builtins.list[str] | None = None, 131 correlation_id: str | None = None, 132 limit: int | None = None, 133 before_cursor: str | None = None, 134 after_cursor: str | None = None, 135 ) -> ActivityFeedListResponse: 136 """ 137 List activity feed entries 138 Returns a cursor-paginated list of activity feed entries visible to the 139 authenticated user. Entries are ordered from newest to oldest by default. 140 Use `before_cursor` to page backward and `after_cursor` to page forward. 141 Results are scoped to the caller's app. All filter params are optional and 142 can be combined. Passing multiple values in an array filter returns entries 143 matching any of the supplied values (OR semantics). 144 Invalid `kind` or `level` values return a 400 error listing the accepted 145 values rather than being silently ignored. 146 147 Args: 148 kind: One or more entry kinds to include. Accepted values: routine_run, automation_run, thread_story, agent_quality_verdict, generic. Omit to return all kinds. 149 level: One or more severity levels to include. Accepted values: debug, info, warn, error, audit. Omit to return all levels. 150 agent: Restrict results to entries associated with these agent IDs (`agt_...`). Accepts multiple values. 151 thread: Restrict results to entries associated with these thread IDs (`thr_...`). Accepts multiple values. 152 team: Restrict results to entries associated with these team IDs (`tem_...`). Accepts multiple values. 153 org: Restrict results to entries associated with these organization IDs (`org_...`). Accepts multiple values. 154 correlation_id: Restrict results to entries that share this correlation group identifier. Useful for tracing a chain of related events. 155 limit: Maximum number of entries to return per page. Defaults to 50; maximum is 100. 156 before_cursor: Opaque cursor from a previous response's `before_cursor` field. Returns entries older than the cursor's position. 157 after_cursor: Opaque cursor from a previous response's `after_cursor` field. Returns entries newer than the cursor's position. 158 159 Returns: 160 Successful response 161 """ 162 query: dict[str, object] = {} 163 if kind is not None: 164 query["kind"] = kind 165 if level is not None: 166 query["level"] = level 167 if agent is not None: 168 query["agent"] = agent 169 if thread is not None: 170 query["thread"] = thread 171 if team is not None: 172 query["team"] = team 173 if org is not None: 174 query["org"] = org 175 if correlation_id is not None: 176 query["correlation_id"] = correlation_id 177 if limit is not None: 178 query["limit"] = limit 179 if before_cursor is not None: 180 query["before_cursor"] = before_cursor 181 if after_cursor is not None: 182 query["after_cursor"] = after_cursor 183 return await self._http.request( 184 "/api/v1/activity_feed", 185 query=query, 186 response_type=ActivityFeedListResponse, 187 )
List activity feed entries
Returns a cursor-paginated list of activity feed entries visible to the
authenticated user. Entries are ordered from newest to oldest by default.
Use before_cursor to page backward and after_cursor to page forward.
Results are scoped to the caller's app. All filter params are optional and
can be combined. Passing multiple values in an array filter returns entries
matching any of the supplied values (OR semantics).
Invalid kind or level values return a 400 error listing the accepted
values rather than being silently ignored.
Arguments:
- kind: One or more entry kinds to include. Accepted values: routine_run, automation_run, thread_story, agent_quality_verdict, generic. Omit to return all kinds.
- level: One or more severity levels to include. Accepted values: debug, info, warn, error, audit. Omit to return all levels.
- agent: Restrict results to entries associated with these agent IDs (
agt_...). Accepts multiple values. - thread: Restrict results to entries associated with these thread IDs (
thr_...). Accepts multiple values. - team: Restrict results to entries associated with these team IDs (
tem_...). Accepts multiple values. - org: Restrict results to entries associated with these organization IDs (
org_...). Accepts multiple values. - correlation_id: Restrict results to entries that share this correlation group identifier. Useful for tracing a chain of related events.
- limit: Maximum number of entries to return per page. Defaults to 50; maximum is 100.
- before_cursor: Opaque cursor from a previous response's
before_cursorfield. Returns entries older than the cursor's position. - after_cursor: Opaque cursor from a previous response's
after_cursorfield. Returns entries newer than the cursor's position.
Returns:
Successful response
190class ActivityFeedResource: 191 def __init__(self, http: SyncHttpClient): 192 self._http = http 193 194 def list( 195 self, 196 *, 197 kind: builtins.list[str] | None = None, 198 level: builtins.list[str] | None = None, 199 agent: builtins.list[str] | None = None, 200 thread: builtins.list[str] | None = None, 201 team: builtins.list[str] | None = None, 202 org: builtins.list[str] | None = None, 203 correlation_id: str | None = None, 204 limit: int | None = None, 205 before_cursor: str | None = None, 206 after_cursor: str | None = None, 207 ) -> ActivityFeedListResponse: 208 """ 209 List activity feed entries 210 Returns a cursor-paginated list of activity feed entries visible to the 211 authenticated user. Entries are ordered from newest to oldest by default. 212 Use `before_cursor` to page backward and `after_cursor` to page forward. 213 Results are scoped to the caller's app. All filter params are optional and 214 can be combined. Passing multiple values in an array filter returns entries 215 matching any of the supplied values (OR semantics). 216 Invalid `kind` or `level` values return a 400 error listing the accepted 217 values rather than being silently ignored. 218 219 Args: 220 kind: One or more entry kinds to include. Accepted values: routine_run, automation_run, thread_story, agent_quality_verdict, generic. Omit to return all kinds. 221 level: One or more severity levels to include. Accepted values: debug, info, warn, error, audit. Omit to return all levels. 222 agent: Restrict results to entries associated with these agent IDs (`agt_...`). Accepts multiple values. 223 thread: Restrict results to entries associated with these thread IDs (`thr_...`). Accepts multiple values. 224 team: Restrict results to entries associated with these team IDs (`tem_...`). Accepts multiple values. 225 org: Restrict results to entries associated with these organization IDs (`org_...`). Accepts multiple values. 226 correlation_id: Restrict results to entries that share this correlation group identifier. Useful for tracing a chain of related events. 227 limit: Maximum number of entries to return per page. Defaults to 50; maximum is 100. 228 before_cursor: Opaque cursor from a previous response's `before_cursor` field. Returns entries older than the cursor's position. 229 after_cursor: Opaque cursor from a previous response's `after_cursor` field. Returns entries newer than the cursor's position. 230 231 Returns: 232 Successful response 233 """ 234 query: dict[str, object] = {} 235 if kind is not None: 236 query["kind"] = kind 237 if level is not None: 238 query["level"] = level 239 if agent is not None: 240 query["agent"] = agent 241 if thread is not None: 242 query["thread"] = thread 243 if team is not None: 244 query["team"] = team 245 if org is not None: 246 query["org"] = org 247 if correlation_id is not None: 248 query["correlation_id"] = correlation_id 249 if limit is not None: 250 query["limit"] = limit 251 if before_cursor is not None: 252 query["before_cursor"] = before_cursor 253 if after_cursor is not None: 254 query["after_cursor"] = after_cursor 255 return self._http.request( 256 "/api/v1/activity_feed", 257 query=query, 258 response_type=ActivityFeedListResponse, 259 )
194 def list( 195 self, 196 *, 197 kind: builtins.list[str] | None = None, 198 level: builtins.list[str] | None = None, 199 agent: builtins.list[str] | None = None, 200 thread: builtins.list[str] | None = None, 201 team: builtins.list[str] | None = None, 202 org: builtins.list[str] | None = None, 203 correlation_id: str | None = None, 204 limit: int | None = None, 205 before_cursor: str | None = None, 206 after_cursor: str | None = None, 207 ) -> ActivityFeedListResponse: 208 """ 209 List activity feed entries 210 Returns a cursor-paginated list of activity feed entries visible to the 211 authenticated user. Entries are ordered from newest to oldest by default. 212 Use `before_cursor` to page backward and `after_cursor` to page forward. 213 Results are scoped to the caller's app. All filter params are optional and 214 can be combined. Passing multiple values in an array filter returns entries 215 matching any of the supplied values (OR semantics). 216 Invalid `kind` or `level` values return a 400 error listing the accepted 217 values rather than being silently ignored. 218 219 Args: 220 kind: One or more entry kinds to include. Accepted values: routine_run, automation_run, thread_story, agent_quality_verdict, generic. Omit to return all kinds. 221 level: One or more severity levels to include. Accepted values: debug, info, warn, error, audit. Omit to return all levels. 222 agent: Restrict results to entries associated with these agent IDs (`agt_...`). Accepts multiple values. 223 thread: Restrict results to entries associated with these thread IDs (`thr_...`). Accepts multiple values. 224 team: Restrict results to entries associated with these team IDs (`tem_...`). Accepts multiple values. 225 org: Restrict results to entries associated with these organization IDs (`org_...`). Accepts multiple values. 226 correlation_id: Restrict results to entries that share this correlation group identifier. Useful for tracing a chain of related events. 227 limit: Maximum number of entries to return per page. Defaults to 50; maximum is 100. 228 before_cursor: Opaque cursor from a previous response's `before_cursor` field. Returns entries older than the cursor's position. 229 after_cursor: Opaque cursor from a previous response's `after_cursor` field. Returns entries newer than the cursor's position. 230 231 Returns: 232 Successful response 233 """ 234 query: dict[str, object] = {} 235 if kind is not None: 236 query["kind"] = kind 237 if level is not None: 238 query["level"] = level 239 if agent is not None: 240 query["agent"] = agent 241 if thread is not None: 242 query["thread"] = thread 243 if team is not None: 244 query["team"] = team 245 if org is not None: 246 query["org"] = org 247 if correlation_id is not None: 248 query["correlation_id"] = correlation_id 249 if limit is not None: 250 query["limit"] = limit 251 if before_cursor is not None: 252 query["before_cursor"] = before_cursor 253 if after_cursor is not None: 254 query["after_cursor"] = after_cursor 255 return self._http.request( 256 "/api/v1/activity_feed", 257 query=query, 258 response_type=ActivityFeedListResponse, 259 )
List activity feed entries
Returns a cursor-paginated list of activity feed entries visible to the
authenticated user. Entries are ordered from newest to oldest by default.
Use before_cursor to page backward and after_cursor to page forward.
Results are scoped to the caller's app. All filter params are optional and
can be combined. Passing multiple values in an array filter returns entries
matching any of the supplied values (OR semantics).
Invalid kind or level values return a 400 error listing the accepted
values rather than being silently ignored.
Arguments:
- kind: One or more entry kinds to include. Accepted values: routine_run, automation_run, thread_story, agent_quality_verdict, generic. Omit to return all kinds.
- level: One or more severity levels to include. Accepted values: debug, info, warn, error, audit. Omit to return all levels.
- agent: Restrict results to entries associated with these agent IDs (
agt_...). Accepts multiple values. - thread: Restrict results to entries associated with these thread IDs (
thr_...). Accepts multiple values. - team: Restrict results to entries associated with these team IDs (
tem_...). Accepts multiple values. - org: Restrict results to entries associated with these organization IDs (
org_...). Accepts multiple values. - correlation_id: Restrict results to entries that share this correlation group identifier. Useful for tracing a chain of related events.
- limit: Maximum number of entries to return per page. Defaults to 50; maximum is 100.
- before_cursor: Opaque cursor from a previous response's
before_cursorfield. Returns entries older than the cursor's position. - after_cursor: Opaque cursor from a previous response's
after_cursorfield. Returns entries newer than the cursor's position.
Returns:
Successful response