BaseModel
Class Attributes
| Attribute | Type | Default |
|---|---|---|
id | str | — |
created_at | AwareDatetime | — |
updated_at | AwareDatetime | — |
last_active_at | AwareDatetime | — |
created_by | str | — |
provider_id | str | None | None |
metadata | Metadata | None | None |
Methods
async staticmethod create
async staticmethod create
Parameters
Returns:
| Name | Type | Default |
|---|---|---|
metadata | Metadata | None | None |
provider_id | str | None | None |
client | PlatformClient | None | None |
'Context'async staticmethod list
async staticmethod list
Parameters
Returns:
| Name | Type | Default |
|---|---|---|
client | PlatformClient | None | None |
page_token | str | None | None |
limit | int | None | None |
order | Literal['asc'] | Literal['desc'] | None | None |
order_by | Literal['created_at'] | Literal['updated_at'] | None | None |
include_empty | bool | True |
provider_id | str | None | None |
PaginatedResult['Context']async get
async get
Parameters
Returns:
| Name | Type | Default |
|---|---|---|
client | PlatformClient | None | None |
'Context'async update
async update
Parameters
Returns:
| Name | Type | Default |
|---|---|---|
metadata | Metadata | None | — |
client | PlatformClient | None | None |
'Context'async patch_metadata
async patch_metadata
Parameters
Returns:
| Name | Type | Default |
|---|---|---|
metadata | MetadataPatch | None | — |
client | PlatformClient | None | None |
'Context'async delete
async delete
Parameters
Returns:
| Name | Type | Default |
|---|---|---|
client | PlatformClient | None | None |
Noneasync generate_token
Generate token for agent authentication
async generate_token
Generate token for agent authentication
Generate token for agent authentication@param grant_global_permissions: Global permissions granted by the token. Must be subset of the users permissions
@param grant_context_permissions: Context permissions granted by the token. Must be subset of the users permissions
Parameters
Returns:
| Name | Type | Default |
|---|---|---|
providers | builtins.list[str] | builtins.list[Provider] | None | None |
client | PlatformClient | None | None |
grant_global_permissions | Permissions | None | None |
grant_context_permissions | ContextPermissions | None | None |
ContextTokenasync add_history_item
Add a Message or Artifact to the context history (append-only)
async add_history_item
Add a Message or Artifact to the context history (append-only)
Add a Message or Artifact to the context history (append-only)
Parameters
Returns:
| Name | Type | Default |
|---|---|---|
data | Message | Artifact | — |
client | PlatformClient | None | None |
Noneasync delete_history_from_id
Delete all history items from a specific item onwards (inclusive)
async delete_history_from_id
Delete all history items from a specific item onwards (inclusive)
Delete all history items from a specific item onwards (inclusive)
Parameters
Returns:
| Name | Type | Default |
|---|---|---|
from_id | UUID | str | — |
client | PlatformClient | None | None |
Noneasync list_history
List all history items for this context in chronological order
async list_history
List all history items for this context in chronological order
List all history items for this context in chronological order
Parameters
Returns:
| Name | Type | Default |
|---|---|---|
page_token | str | None | None |
limit | int | None | None |
order | Literal['asc'] | Literal['desc'] | None | 'asc' |
order_by | Literal['created_at'] | Literal['updated_at'] | None | None |
client | PlatformClient | None | None |
PaginatedResult[ContextHistoryItem]async list_all_history
async list_all_history
Parameters
Returns:
| Name | Type | Default |
|---|---|---|
client | PlatformClient | None | None |
AsyncIterator[ContextHistoryItem]