Update Run Schedule
agents.schedules.update(strschedule_id, ScheduleUpdateParams**kwargs) -> ScheduleUpdateResponse
PATCH/agents/{agent_id}/schedules/{schedule_id}
Partially update a run schedule’s definition (cadence, window, input, etc.).
Update Run Schedule
import os
from agentex import Agentex
client = Agentex(
api_key=os.environ.get("AGENTEX_SDK_API_KEY"), # This is the default and can be omitted
)
schedule = client.agents.schedules.update(
schedule_id="schedule_id",
agent_id="agent_id",
)
print(schedule.id){
"id": "id",
"agent_id": "agent_id",
"initial_input": {
"content": "content",
"author": "user",
"type": "text"
},
"initial_input_method": "initial_input_method",
"name": "name",
"created_at": "2019-12-27T18:11:19.117Z",
"creator_principal": {
"account_id": "account_id",
"principal_type": "principal_type",
"service_account_id": "service_account_id",
"user_id": "user_id"
},
"cron_expression": "cron_expression",
"description": "description",
"end_at": "2019-12-27T18:11:19.117Z",
"interval_seconds": 0,
"last_action_time": "2019-12-27T18:11:19.117Z",
"live_data_available": true,
"next_action_times": [
"2019-12-27T18:11:19.117Z"
],
"num_actions_taken": 0,
"paused": true,
"skipped_action_times": [
"2019-12-27T18:11:19.117Z"
],
"start_at": "2019-12-27T18:11:19.117Z",
"state": "ACTIVE",
"task_metadata": {
"foo": "bar"
},
"task_params": {
"foo": "bar"
},
"timezone": "timezone",
"updated_at": "2019-12-27T18:11:19.117Z"
}Returns Examples
{
"id": "id",
"agent_id": "agent_id",
"initial_input": {
"content": "content",
"author": "user",
"type": "text"
},
"initial_input_method": "initial_input_method",
"name": "name",
"created_at": "2019-12-27T18:11:19.117Z",
"creator_principal": {
"account_id": "account_id",
"principal_type": "principal_type",
"service_account_id": "service_account_id",
"user_id": "user_id"
},
"cron_expression": "cron_expression",
"description": "description",
"end_at": "2019-12-27T18:11:19.117Z",
"interval_seconds": 0,
"last_action_time": "2019-12-27T18:11:19.117Z",
"live_data_available": true,
"next_action_times": [
"2019-12-27T18:11:19.117Z"
],
"num_actions_taken": 0,
"paused": true,
"skipped_action_times": [
"2019-12-27T18:11:19.117Z"
],
"start_at": "2019-12-27T18:11:19.117Z",
"state": "ACTIVE",
"task_metadata": {
"foo": "bar"
},
"task_params": {
"foo": "bar"
},
"timezone": "timezone",
"updated_at": "2019-12-27T18:11:19.117Z"
}