-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathstate.py
More file actions
35 lines (21 loc) · 867 Bytes
/
state.py
File metadata and controls
35 lines (21 loc) · 867 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing import Dict, Optional
from datetime import datetime
from .._models import BaseModel
__all__ = ["State"]
class State(BaseModel):
"""Represents a state in the agent system.
A state is associated uniquely with a task and an agent.
This entity is used to store states in MongoDB, with each state
associated with a specific task and agent. The combination of task_id and agent_id is globally unique.
The state is a dictionary of arbitrary data.
"""
id: str
"""The task state's unique id"""
agent_id: str
created_at: datetime
"""The timestamp when the state was created"""
state: Dict[str, object]
task_id: str
updated_at: Optional[datetime] = None
"""The timestamp when the state was last updated"""